Compare commits
No commits in common. "22aee515edbf55c67c658a7cb3e76d339c2d0fdf" and "3a58e9080217375bc574d02145f8685a152b70e5" have entirely different histories.
22aee515ed
...
3a58e90802
BIN
Project/Binaries/Win64/UnrealEditor-GasaEditor.dll
(Stored with Git LFS)
BIN
Project/Binaries/Win64/UnrealEditor-GasaEditor.dll
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Core/AbilitySystem/GE_CrystalHeal.uasset
(Stored with Git LFS)
BIN
Project/Content/Core/AbilitySystem/GE_CrystalHeal.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Core/AbilitySystem/GE_CrystalMana.uasset
(Stored with Git LFS)
BIN
Project/Content/Core/AbilitySystem/GE_CrystalMana.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Core/Pickups/BP_HealthCrystal.uasset
(Stored with Git LFS)
BIN
Project/Content/Core/Pickups/BP_HealthCrystal.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Core/Pickups/BP_HealthPotion_RawEffect.uasset
(Stored with Git LFS)
BIN
Project/Content/Core/Pickups/BP_HealthPotion_RawEffect.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Core/Pickups/BP_ManaCrystal.uasset
(Stored with Git LFS)
BIN
Project/Content/Core/Pickups/BP_ManaCrystal.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Core/Pickups/BP_ManaPotion_RawEffect.uasset
(Stored with Git LFS)
BIN
Project/Content/Core/Pickups/BP_ManaPotion_RawEffect.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Levels/StartupMap.umap
(Stored with Git LFS)
BIN
Project/Content/Levels/StartupMap.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/MaterialLibrary/M_Crystal.uasset
(Stored with Git LFS)
BIN
Project/Content/MaterialLibrary/M_Crystal.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Pickups/HealthCrystal/Materials/MI_HealthCrystal.uasset
(Stored with Git LFS)
BIN
Project/Content/Pickups/HealthCrystal/Materials/MI_HealthCrystal.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Project/Content/Pickups/HealthCrystal/Materials/M_HealthCrystal.uasset
(Stored with Git LFS)
Normal file
BIN
Project/Content/Pickups/HealthCrystal/Materials/M_HealthCrystal.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Project/Content/Pickups/MI_CrystalMana.uasset
(Stored with Git LFS)
BIN
Project/Content/Pickups/MI_CrystalMana.uasset
(Stored with Git LFS)
Binary file not shown.
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
UGasaAttributeSet::UGasaAttributeSet()
|
UGasaAttributeSet::UGasaAttributeSet()
|
||||||
{
|
{
|
||||||
InitHealth( 50.f );
|
InitHealth( 100.f );
|
||||||
InitMaxHealth( 100.f );
|
InitMaxHealth( 100.f );
|
||||||
InitMana( 25.f );
|
InitMana( 50.f );
|
||||||
InitMaxMana( 50.f );
|
InitMaxMana( 50.f );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ void AGasaEffectActor::ApplyEffectToActor(AActor* Actor, TSubclassOf<UGameplayEf
|
|||||||
FGameplayEffectContextHandle
|
FGameplayEffectContextHandle
|
||||||
Context = AS->MakeEffectContext();
|
Context = AS->MakeEffectContext();
|
||||||
Context.AddSourceObject(Actor);
|
Context.AddSourceObject(Actor);
|
||||||
|
|
||||||
FGameplayEffectSpecHandle Spec = AS->MakeOutgoingSpec( EffectClass, 1.0f, Context );
|
FGameplayEffectSpecHandle Spec = AS->MakeOutgoingSpec( EffectClass, 1.0f, Context );
|
||||||
AS->ApplyGameplayEffectSpecToSelf( * Spec.Data );
|
AS->ApplyGameplayEffectSpecToSelf( * Spec.Data );
|
||||||
}
|
}
|
||||||
|
@ -13,10 +13,7 @@ class GASA_API AGasaEffectActor : public AGasaActor
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects")
|
||||||
TSubclassOf<UGameplayEffect> InstantEffectClass;
|
TSoftClassPtr<UGameplayEffect> InstantEffectClass;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects")
|
|
||||||
TSubclassOf<UGameplayEffect> DurationEffectClass;
|
|
||||||
|
|
||||||
AGasaEffectActor();
|
AGasaEffectActor();
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ AGasaGameState::AGasaGameState()
|
|||||||
void AGasaGameState::OnGameFrameworkInitialized()
|
void AGasaGameState::OnGameFrameworkInitialized()
|
||||||
{
|
{
|
||||||
NetLog("Received gameplay framework initialization.");
|
NetLog("Received gameplay framework initialization.");
|
||||||
|
|
||||||
if (IsServer())
|
if (IsServer())
|
||||||
{
|
{
|
||||||
if (PlayerArray.Num() > 0)
|
if (PlayerArray.Num() > 0)
|
||||||
@ -40,6 +41,7 @@ void AGasaGameState::OnGameFrameworkInitialized()
|
|||||||
NetLog("Was not able to assign HostingPlayer!", ELogV::Error);
|
NetLog("Was not able to assign HostingPlayer!", ELogV::Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BP_OnGameFrameworkInitialized();
|
BP_OnGameFrameworkInitialized();
|
||||||
}
|
}
|
||||||
#pragma endregion GameFramework
|
#pragma endregion GameFramework
|
||||||
@ -69,6 +71,7 @@ void AGasaGameState::HandleBeginPlay()
|
|||||||
void AGasaGameState::SeamlessTravelTransitionCheckpoint(bool bToTransitionMap)
|
void AGasaGameState::SeamlessTravelTransitionCheckpoint(bool bToTransitionMap)
|
||||||
{
|
{
|
||||||
Super::SeamlessTravelTransitionCheckpoint(bToTransitionMap);
|
Super::SeamlessTravelTransitionCheckpoint(bToTransitionMap);
|
||||||
|
|
||||||
NetLog("SeamlessTravelTransitionCheckpoint");
|
NetLog("SeamlessTravelTransitionCheckpoint");
|
||||||
NetLog(FString("ToTransitionMap: ") + FString(bToTransitionMap ? "true" : "false"));
|
NetLog(FString("ToTransitionMap: ") + FString(bToTransitionMap ? "true" : "false"));
|
||||||
|
|
||||||
@ -87,6 +90,7 @@ void AGasaGameState::SeamlessTravelTransitionCheckpoint(bool bToTransitionMap)
|
|||||||
void AGasaGameState::BeginPlay()
|
void AGasaGameState::BeginPlay()
|
||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
NetLog("BeginPlay");
|
NetLog("BeginPlay");
|
||||||
|
|
||||||
// Notified as initialized here as any possible components should also be initialized by this point.
|
// Notified as initialized here as any possible components should also be initialized by this point.
|
||||||
@ -96,17 +100,18 @@ void AGasaGameState::BeginPlay()
|
|||||||
GI->NotifyGameFrameworkClassReady(EGameFrameworkClassFlag::GameState);
|
GI->NotifyGameFrameworkClassReady(EGameFrameworkClassFlag::GameState);
|
||||||
|
|
||||||
#if ENABLE_COG
|
#if ENABLE_COG
|
||||||
CogWindowManager = NewObject<UCogWindowManager>(this);
|
CogWindowManager = NewObject<UCogWindowManager>(this);
|
||||||
CogWindowManagerRef = CogWindowManager;
|
CogWindowManagerRef = CogWindowManager;
|
||||||
|
|
||||||
// Add all the built-in windows
|
// Add all the built-in windows
|
||||||
Cog::AddAllWindows(*CogWindowManager);
|
Cog::AddAllWindows(*CogWindowManager);
|
||||||
#endif //ENABLE_COG
|
#endif //ENABLE_COG
|
||||||
}
|
}
|
||||||
|
|
||||||
void AGasaGameState::PostInitializeComponents()
|
void AGasaGameState::PostInitializeComponents()
|
||||||
{
|
{
|
||||||
NetLog("PostInitializeComponents");
|
NetLog("PostInitializeComponents");
|
||||||
|
|
||||||
Super::PostInitializeComponents();
|
Super::PostInitializeComponents();
|
||||||
|
|
||||||
if ( ! GetWorld()->IsEditorWorld() && IsServer())
|
if ( ! GetWorld()->IsEditorWorld() && IsServer())
|
||||||
@ -130,8 +135,7 @@ void AGasaGameState::Tick(float DeltaSeconds)
|
|||||||
Super::Tick(DeltaSeconds);
|
Super::Tick(DeltaSeconds);
|
||||||
|
|
||||||
#if ENABLE_COG
|
#if ENABLE_COG
|
||||||
if (CogWindowManager)
|
CogWindowManager->Tick(DeltaSeconds);
|
||||||
CogWindowManager->Tick(DeltaSeconds);
|
|
||||||
#endif //ENABLE_COG
|
#endif //ENABLE_COG
|
||||||
}
|
}
|
||||||
#pragma endregion Actor
|
#pragma endregion Actor
|
||||||
|
@ -1,147 +0,0 @@
|
|||||||
#include "GasaGameState.h"
|
|
||||||
|
|
||||||
#include "CogAll.h"
|
|
||||||
#include "CogWindowManager.h"
|
|
||||||
#include "GasaPlayerState.h"
|
|
||||||
#include "GasaGameInstance.h"
|
|
||||||
#include "Net/UnrealNetwork.h"
|
|
||||||
#include "Networking/GasaNetLibrary_Inlines.h"
|
|
||||||
using namespace Gasa;
|
|
||||||
|
|
||||||
AGasaGameState::AGasaGameState()
|
|
||||||
{
|
|
||||||
// Enable ticking
|
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
|
||||||
PrimaryActorTick.SetTickFunctionEnable(true);
|
|
||||||
PrimaryActorTick.bStartWithTickEnabled = true;
|
|
||||||
|
|
||||||
// Replication
|
|
||||||
bReplicates = true;
|
|
||||||
bNetLoadOnClient = false;
|
|
||||||
NetDormancy = DORM_Awake;
|
|
||||||
NetCullDistanceSquared = NetCullDist_Default;
|
|
||||||
NetUpdateFrequency = 10.0f;
|
|
||||||
MinNetUpdateFrequency = 1.0f;
|
|
||||||
NetPriority = 5.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma region GameFramework
|
|
||||||
void AGasaGameState::OnGameFrameworkInitialized()
|
|
||||||
{
|
|
||||||
NetLog("Received gameplay framework initialization.");
|
|
||||||
if (IsServer())
|
|
||||||
{
|
|
||||||
if (PlayerArray.Num() > 0)
|
|
||||||
{
|
|
||||||
ListenServerHost = Cast<AGasaPlayerState>(PlayerArray[0]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NetLog("Was not able to assign HostingPlayer!", ELogV::Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BP_OnGameFrameworkInitialized();
|
|
||||||
}
|
|
||||||
#pragma endregion GameFramework
|
|
||||||
|
|
||||||
#pragma region Networking
|
|
||||||
void AGasaGameState::Client_OnRep_OnlinePlayers()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#pragma endregion Networking
|
|
||||||
|
|
||||||
#pragma region Seamless Travel
|
|
||||||
void AGasaGameState::Multicast_R_NotifySeamlessTravelEnd_Implementation()
|
|
||||||
{
|
|
||||||
NetLog("Multicast_R_NotifySeamlessTravelEnd_Implementation");
|
|
||||||
BP_Event_OnSeamlessTravelEnd.Broadcast();
|
|
||||||
Event_OnSeamlessTravelEnd.Broadcast();
|
|
||||||
}
|
|
||||||
#pragma endregion Seamless Travel
|
|
||||||
|
|
||||||
#pragma region GameStateBase
|
|
||||||
void AGasaGameState::HandleBeginPlay()
|
|
||||||
{
|
|
||||||
Super::HandleBeginPlay();
|
|
||||||
NetLog("HandleBeginPlay: Directly called from GM");
|
|
||||||
}
|
|
||||||
|
|
||||||
void AGasaGameState::SeamlessTravelTransitionCheckpoint(bool bToTransitionMap)
|
|
||||||
{
|
|
||||||
Super::SeamlessTravelTransitionCheckpoint(bToTransitionMap);
|
|
||||||
NetLog("SeamlessTravelTransitionCheckpoint");
|
|
||||||
NetLog(FString("ToTransitionMap: ") + FString(bToTransitionMap ? "true" : "false"));
|
|
||||||
|
|
||||||
if (bToTransitionMap)
|
|
||||||
{
|
|
||||||
Event_OnSeamlessTravelStart.Broadcast();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Multicast_R_NotifySeamlessTravelEnd();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#pragma endregion GameStateBase
|
|
||||||
|
|
||||||
#pragma region Actor
|
|
||||||
void AGasaGameState::BeginPlay()
|
|
||||||
{
|
|
||||||
Super::BeginPlay();
|
|
||||||
NetLog("BeginPlay");
|
|
||||||
|
|
||||||
// Notified as initialized here as any possible components should also be initialized by this point.
|
|
||||||
UGasaGameInstance*
|
|
||||||
GI = GetGameInstance<UGasaGameInstance>();
|
|
||||||
GI->Event_OnGameFrameworkInitialized.AddDynamic(this, & ThisClass::OnGameFrameworkInitialized);
|
|
||||||
GI->NotifyGameFrameworkClassReady(EGameFrameworkClassFlag::GameState);
|
|
||||||
|
|
||||||
#if ENABLE_COG
|
|
||||||
CogWindowManager = NewObject<UCogWindowManager>(this);
|
|
||||||
CogWindowManagerRef = CogWindowManager;
|
|
||||||
|
|
||||||
// Add all the built-in windows
|
|
||||||
Cog::AddAllWindows(*CogWindowManager);
|
|
||||||
#endif //ENABLE_COG
|
|
||||||
}
|
|
||||||
|
|
||||||
void AGasaGameState::PostInitializeComponents()
|
|
||||||
{
|
|
||||||
NetLog("PostInitializeComponents");
|
|
||||||
Super::PostInitializeComponents();
|
|
||||||
|
|
||||||
if ( ! GetWorld()->IsEditorWorld() && IsServer())
|
|
||||||
{
|
|
||||||
OnlinePlayers.Empty();
|
|
||||||
#if 0
|
|
||||||
const auto GI = Cast<UGasaGameInstance>(GetGameInstance());
|
|
||||||
if (GI != nullptr)
|
|
||||||
{
|
|
||||||
int32 NumConnections = GI->SessionSettings.bPublicGame
|
|
||||||
? GI->SessionSettings.PublicConnections
|
|
||||||
: GI->SessionSettings.PrivateConnections;
|
|
||||||
OnlinePlayers.Init(nullptr, NumConnections);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AGasaGameState::Tick(float DeltaSeconds)
|
|
||||||
{
|
|
||||||
Super::Tick(DeltaSeconds);
|
|
||||||
|
|
||||||
#if ENABLE_COG
|
|
||||||
if (CogWindowManager)
|
|
||||||
CogWindowManager->Tick(DeltaSeconds);
|
|
||||||
#endif //ENABLE_COG
|
|
||||||
}
|
|
||||||
#pragma endregion Actor
|
|
||||||
|
|
||||||
#pragma region UObject
|
|
||||||
void AGasaGameState::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
|
|
||||||
{
|
|
||||||
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
|
|
||||||
|
|
||||||
DOREPLIFETIME(AGasaGameState, ListenServerHost);
|
|
||||||
DOREPLIFETIME(AGasaGameState, OnlinePlayers);
|
|
||||||
}
|
|
||||||
#pragma endregion UObject
|
|
@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
#pragma region Actor
|
#pragma region Actor
|
||||||
void BeginPlay() override;
|
void BeginPlay() override;
|
||||||
#pragma endregion endActor
|
#pragma region endActor
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Gasa
|
namespace Gasa
|
||||||
|
Loading…
x
Reference in New Issue
Block a user