// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/Character.h"
#include "MyCharacter.generated.h"
UCLASS(Blueprintable)
class CONCEPTS_API AMyCharacter : public ACharacter
{
GENERATED_BODY()
public:
//make a health property
UPROPERTY(BlueprintReadWrite, Edit Anywhere, Catergory = "My Character")
float Health = 100;
//make a isDead property
UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Catergory = "My Character")
bool isDead = false;
//calculate death function (helper)
virtual void CalculateDead();
//calculate health function
UFUNCTION(BlueprintCallable, Catergory = "My Character")
virtual void CalculateHealth(float delta);
#if WITH_EDITOR
//editor-centric code for changing properties
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)override;
#endif
public:
// Sets default values for this character's properties
AMyCharacter();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
};