Added OnRep to health componenet
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "Camera/CameraComponent.h"
|
||||
#include "Components/DDIHealth.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "Net/UnrealNetwork.h"
|
||||
#include "DDICharacter.generated.h"
|
||||
|
||||
|
||||
@@ -28,7 +29,7 @@ public:
|
||||
/*Properties*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Camera")
|
||||
UCameraComponent* CameraComponent;
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Health")
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Health", ReplicatedUsing=OnRep_Health)
|
||||
UDDIHealth* HealthComponent;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Projectile")
|
||||
@@ -50,6 +51,9 @@ public:
|
||||
UFUNCTION(Server, Reliable, WithValidation, BlueprintCallable)
|
||||
void Server_CharacterHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
|
||||
|
||||
UFUNCTION()
|
||||
void OnRep_Health();
|
||||
|
||||
/*C++ only declarations*/
|
||||
private:
|
||||
/*Properties*/
|
||||
|
||||
Reference in New Issue
Block a user