44 lines
978 B
C++
44 lines
978 B
C++
// Project Lab - NHTV Igad
|
|
|
|
#pragma once
|
|
|
|
#include "Creatures/NetworkPossessable.h"
|
|
#include "NetworkGhost.generated.h"
|
|
|
|
UCLASS()
|
|
class UNREALPROJECT_API ANetworkGhost : public ANetworkPossessable
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
ANetworkGhost();
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
virtual void Tick(float DeltaSeconds) override;
|
|
|
|
|
|
bool CanRespawn() const;
|
|
|
|
UPROPERTY(BlueprintReadonly, Category = "Respawn")
|
|
int32 shrinesInRange;
|
|
|
|
// Range to ally for respawn
|
|
UPROPERTY(EditAnywhere, Category = "Respawn")
|
|
float allyRespawnRange;
|
|
|
|
// Time it takes before the player is allowed to respawn
|
|
UPROPERTY(EditAnywhere, Category = "Respawn")
|
|
float respawnDuration;
|
|
|
|
// Get time it takes before respawning
|
|
UFUNCTION(BlueprintCallable, Category = "Respawn")
|
|
float RespawnTime() const;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "PostProcess")
|
|
UPostProcessComponent* postProcess;
|
|
|
|
private:
|
|
UPROPERTY(Replicated)
|
|
float m_respawnTime;
|
|
}; |