blaster/Source/Blaster/PlayerState/BlasterPlayerState.h

36 lines
757 B
C
Raw Normal View History

2022-05-09 14:33:48 +00:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/PlayerState.h"
#include "BlasterPlayerState.generated.h"
/**
*
*/
UCLASS()
class BLASTER_API ABlasterPlayerState : public APlayerState
{
GENERATED_BODY()
public:
2022-05-09 15:16:41 +00:00
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
2022-05-09 14:33:48 +00:00
virtual void OnRep_Score() override;
2022-05-10 20:34:28 +00:00
2022-05-09 15:16:41 +00:00
UFUNCTION()
virtual void OnRep_Defeats();
2022-05-10 20:34:28 +00:00
void AddToScore(float ScoreAmount);
void AddToDefeats(int32 DefeatsAmount);
2022-05-09 14:33:48 +00:00
private:
2022-05-09 15:16:41 +00:00
UPROPERTY()
2022-05-09 14:33:48 +00:00
class ABlasterCharacter* Character;
2022-05-09 15:16:41 +00:00
UPROPERTY()
2022-05-09 14:33:48 +00:00
class ABlasterPlayerController* Controller;
2022-05-09 15:16:41 +00:00
UPROPERTY(ReplicatedUsing = OnRep_Defeats)
int32 Defeats;
2022-05-09 14:33:48 +00:00
};