I am having some problems with my code could you look at it for me`
BaseCharacter.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/Character.h"
#include "BaseCharacter.generated.h"
UCLASS(Blueprintable)
class TWINSTICKSHOOTER_API ABaseCharacter : public ACharacter
{
GENERATED_BODY()
public:
//Make a health property
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Base Character")
float Health = 100;
//Make an isdead property
UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "BaseCharacter")
bool isDead = False;
//Calculate death funtion (helper)
virtual void CalculateDead();
//Calculate health funtion
UFUNCTION(BlueprintCallable, Category = "BaseCharacter")
ABaseCharacter();
virtual void CalculateHealth(float delta);
#if WITH_EDITOR
//Editior-centric code for changing properties
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent
override;)
#endif
public:
// Sets default values for this character's properties
ABaseCharacter();
// 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;
#endif
BaseCharecter.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "TwinStickShooter.h"
#include "BaseCharacter.h"
// Sets default values
ABaseCharacter::ABaseCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void ABaseCharacter::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ABaseCharacter::Tick( float DeltaTime )
{
Super::Tick( DeltaTime );
}
// Called to bind functionality to input
void ABaseCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
Super::SetupPlayerInputComponent(InputComponent);
}
//CalculateHealth
void ABaseCharacter::CalculateHealth(float Delta)
{
Health += Delta;
CalculateDead();
}
//Implement CalculateDead
{
if (Health <= 0)
isDead = true;
else
isDead = false;
}
// Implement PostEditChange Property
{
#if WITH_EDITOR
void ABaseCharacter::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
isDead = false;
Health = 100;
Super::PostEditChangeProperty(PropertyChangedEvent);
CalculateDead();
}
#endif
Microsoft.MakeFile.Targets
<TargetPath Condition="'$(NMakeOutput)' != ''">$([System.IO.Path]::Combine('$(ProjectDir)','$(NMakeOutput)'))</TargetPath>
<LocalDebuggerCommand Condition="'$(LocalDebuggerCommand)'==''">$(TargetPath)</LocalDebuggerCommand>
<!-- Create the directories for intermediate and final build products, and any other arbitrary directories. -->
<MakeDir Directories="$(OutDir);$(IntDir);$(TargetDir)"/>
<VCMessage Code="MSB8005" Type="Warning" Arguments="NMakeCleanCommandLine" Condition="'$(NMakeCleanCommandLine)'==''"/>
<Exec Command="$(NMakeCleanCommandLine)" Condition="'$(NMakeCleanCommandLine)'!=''"/>
<VCMessage Code="MSB8005" Type="Warning" Arguments="NMakeBuildCommandLine" Condition="'$(NMakeBuildCommandLine)'==''"/>
<Exec Command="$(NMakeBuildCommandLine)" Condition="'$(NMakeBuildCommandLine)'!=''"/>
<VCMessage Code="MSB8005" Type="Warning" Arguments="NMakeReBuildCommandLine" Condition="'$(NMakeReBuildCommandLine)'=='' and ('$(NMakeCleanCommandLine)'=='' or '$(NMakeBuildCommandLine)'=='')"/>
<Exec Command="$(NMakeReBuildCommandLine)" Condition="'$(NMakeReBuildCommandLine)'!=''"/>
<Exec Command="$(NMakeCleanCommandLine)" Condition="'$(NMakeReBuildCommandLine)'=='' and '$(NMakeCleanCommandLine)'!='' and '$(NMakeBuildCommandLine)'!=''" />
<Exec Command="$(NMakeBuildCommandLine)" Condition="'$(NMakeReBuildCommandLine)'=='' and '$(NMakeCleanCommandLine)'!='' and '$(NMakeBuildCommandLine)'!=''" />
<ItemGroup>
<ProjectReference>
<Targets>%(Targets);Rebuild</Targets>
</ProjectReference>
</ItemGroup>
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\ProjectItemsSchema.xml" />
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\directories.xml" />
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\debugger_*.xml" />
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\nmake.xml" />
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\cl_nmake.xml" >
<Context>File</Context>
</PropertyPageSchema>
<!-- project only rules -->
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\general_makefile.xml">
<Context>Project</Context>
</PropertyPageSchema>
<!-- Property sheet only rules -->
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\general_makefile_ps.xml;$(VCTargetsPath)$(LangID)\usermacros.xml">
<Context>PropertySheet</Context>
</PropertyPageSchema>
<!-- File only rules -->
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\general_file.xml">
<Context>File</Context>
</PropertyPageSchema>
<AppTypeMakefileTarget Condition="'$(AppTypeMakefileTarget)' == ''">$(VCTargetsPath)\Application Type\$(ApplicationType)\$(ApplicationTypeRevision)\$(ApplicationType).Makefile.Targets</AppTypeMakefileTarget>