mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 08:02:23 -07:00
42ca1afc6a
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
53 lines
1.7 KiB
C++
53 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "CogSampleProgressionLevelInterface.h"
|
|
#include "CogSampleTeamInterface.h"
|
|
#include "CogSampleSpawnableInterface.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "CogSampleBasicActor.generated.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------
|
|
UCLASS(config=Game)
|
|
class ACogSampleBasicActor : public AActor
|
|
, public ICogSampleProgressionLevelInterface
|
|
, public ICogSampleSpawnableInterface
|
|
, public ICogSampleTeamInterface
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
ACogSampleBasicActor(const FObjectInitializer& ObjectInitializer);
|
|
|
|
UFUNCTION(BlueprintPure)
|
|
virtual int32 GetTeam() const override { return Team; }
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
virtual void SetTeam(int32 Value) override;
|
|
|
|
UFUNCTION(BlueprintPure)
|
|
virtual int32 GetProgressionLevel() const override { return ProgressionLevel; }
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
virtual void SetProgressionLevel(int32 Value) override;
|
|
|
|
UFUNCTION(BlueprintPure)
|
|
virtual AActor* GetCreator() const override { return Creator.Get(); }
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
virtual void SetCreator(AActor* Value) override;
|
|
|
|
protected:
|
|
|
|
UPROPERTY(Replicated, EditAnywhere, BlueprintReadOnly, Category = Team, meta = (AllowPrivateAccess, ExposeOnSpawn))
|
|
int32 Team = 0;
|
|
|
|
UPROPERTY(Replicated, EditAnywhere, BlueprintReadOnly, Category = Team, meta = (AllowPrivateAccess, ExposeOnSpawn))
|
|
int32 ProgressionLevel = 0;
|
|
|
|
UPROPERTY(Replicated, EditAnywhere, BlueprintReadOnly, Category = Team, meta = (AllowPrivateAccess, ExposeOnSpawn))
|
|
TWeakObjectPtr<AActor> Creator = nullptr;
|
|
};
|
|
|