Cog Sample: Adding more gameplay

Cog Sample: Make Area a component instead of an actor
Cog Sample: Add Basic actor for Projectiles, Areas, etc...
Cog Sample: Start to add Projectile
Cog Sample: Start to add SpawnPrediction
This commit is contained in:
Arnaud Jamin
2023-10-26 12:33:50 -04:00
parent 07e9db10af
commit 42ca1afc6a
67 changed files with 2462 additions and 669 deletions
+41
View File
@@ -0,0 +1,41 @@
#include "CogSampleBasicActor.h"
#include "Net/Core/PushModel/PushModel.h"
#include "Net/UnrealNetwork.h"
//--------------------------------------------------------------------------------------------------------------------------
ACogSampleBasicActor::ACogSampleBasicActor(const FObjectInitializer& ObjectInitializer)
{
}
//--------------------------------------------------------------------------------------------------------------------------
void ACogSampleBasicActor::GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
FDoRepLifetimeParams Params;
Params.bIsPushBased = true;
DOREPLIFETIME_WITH_PARAMS_FAST(ACogSampleBasicActor, Team, Params);
DOREPLIFETIME_WITH_PARAMS_FAST(ACogSampleBasicActor, ProgressionLevel, Params);
DOREPLIFETIME_WITH_PARAMS_FAST(ACogSampleBasicActor, Creator, Params);
}
//--------------------------------------------------------------------------------------------------------------------------
void ACogSampleBasicActor::SetTeam(int32 Value)
{
COMPARE_ASSIGN_AND_MARK_PROPERTY_DIRTY(ACogSampleBasicActor, Team, Value, this);
}
//--------------------------------------------------------------------------------------------------------------------------
void ACogSampleBasicActor::SetProgressionLevel(int32 Value)
{
COMPARE_ASSIGN_AND_MARK_PROPERTY_DIRTY(ACogSampleBasicActor, ProgressionLevel, Value, this);
}
//--------------------------------------------------------------------------------------------------------------------------
void ACogSampleBasicActor::SetCreator(AActor* Value)
{
COMPARE_ASSIGN_AND_MARK_PROPERTY_DIRTY(ACogSampleBasicActor, Creator, Value, this);
}