setup hits on character
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Camera/CameraComponent.h"
|
||||
#include "Components/DDIHealth.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "DDICharacter.generated.h"
|
||||
|
||||
@@ -12,20 +13,50 @@ UCLASS()
|
||||
class OPENCONFLICT_API ADDICharacter : public ACharacter
|
||||
{
|
||||
GENERATED_BODY()
|
||||
/*UPROPERTY and UFUNCTION declarations*/
|
||||
private:
|
||||
/*Properties*/
|
||||
|
||||
public:
|
||||
// Sets default values for this character's properties
|
||||
ADDICharacter();
|
||||
/*Functions*/
|
||||
|
||||
protected:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
public:
|
||||
/*Properties*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Camera")
|
||||
UCameraComponent* CameraComponent;
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Health")
|
||||
UDDIHealth* HealthComponent;
|
||||
|
||||
/*Functions*/
|
||||
UFUNCTION()
|
||||
void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
|
||||
|
||||
|
||||
/*C++ only declarations*/
|
||||
private:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
protected:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
public:
|
||||
public:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
// Sets default values for this character's properties
|
||||
ADDICharacter();
|
||||
// Called every frame
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Camera")
|
||||
UCameraComponent* CameraComponent;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user