finalization
This commit is contained in:
parent
6da4620dc5
commit
8c01cab7c8
@ -139,7 +139,8 @@ ManualIPAddress=
|
|||||||
+Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.")
|
+Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.")
|
||||||
+Profiles=(Name="UI",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility"),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ")
|
+Profiles=(Name="UI",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility"),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ")
|
||||||
+Profiles=(Name="Interactable",CollisionEnabled=QueryAndPhysics,bCanModify=True,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Interactable")),HelpMessage="WorldDynamic objects derived from AInteractable.")
|
+Profiles=(Name="Interactable",CollisionEnabled=QueryAndPhysics,bCanModify=True,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Interactable")),HelpMessage="WorldDynamic objects derived from AInteractable.")
|
||||||
+Profiles=(Name="AgeOfWarUnit",CollisionEnabled=QueryOnly,bCanModify=True,ObjectTypeName="Vehicle",CustomResponses=((Channel="WorldStatic",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Minigame object")
|
+Profiles=(Name="AgeOfWarUnitPlayer",CollisionEnabled=QueryOnly,bCanModify=True,ObjectTypeName="Vehicle",CustomResponses=((Channel="WorldStatic",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Interactable")),HelpMessage="Minigame object")
|
||||||
|
+Profiles=(Name="AgeOfWarUnitComputer",CollisionEnabled=QueryOnly,bCanModify=True,ObjectTypeName="Destructible",CustomResponses=((Channel="WorldStatic",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore),(Channel="Interactable")),HelpMessage="Minigame object")
|
||||||
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Ignore,bTraceType=True,bStaticObject=False,Name="Interactable")
|
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Ignore,bTraceType=True,bStaticObject=False,Name="Interactable")
|
||||||
-ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall")
|
-ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall")
|
||||||
-ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn")
|
-ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn")
|
||||||
@ -151,6 +152,9 @@ ManualIPAddress=
|
|||||||
+ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic")
|
+ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic")
|
||||||
+ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor")
|
+ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor")
|
||||||
+ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic")
|
+ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic")
|
||||||
|
+ProfileRedirects=(OldName="AgeOfWarUnitComputer",NewName="AgeOfWarUnitPlayerZone")
|
||||||
|
+ProfileRedirects=(OldName="AgeOfWarUnit",NewName="AgeOfWarUnitPlayer")
|
||||||
|
+ProfileRedirects=(OldName="AgeOfWarUnitPlayerZone",NewName="AgeOfWarUnitComputer")
|
||||||
-CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic")
|
-CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic")
|
||||||
-CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic")
|
-CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic")
|
||||||
-CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle")
|
-CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle")
|
||||||
|
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Minigames/AgeOfWar/BP_Minigame_AgeOfWar.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Minigames/AgeOfWar/BP_Minigame_AgeOfWar.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Minigames/AgeOfWar/UI_Minigame_AgeOfWar.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Minigames/AgeOfWar/UI_Minigame_AgeOfWar.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Minigames/AgeOfWar/Units/BP_Minigame_AgeOfWarUnit_Base.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Minigames/AgeOfWar/Units/BP_Minigame_AgeOfWarUnit_Base.uasset
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap
(Stored with Git LFS)
Binary file not shown.
@ -39,6 +39,18 @@ void UCommonFunctions::DestroyActorRecursively(AActor* actor)
|
|||||||
actor->Destroy();
|
actor->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<int32> UCommonFunctions::GetRandomIntArray(int32 size, int32 min, int32 max)
|
||||||
|
{
|
||||||
|
if(size <= 0)
|
||||||
|
return {};
|
||||||
|
|
||||||
|
TArray<int32> arr;
|
||||||
|
arr.Reserve(size);
|
||||||
|
for(int32 i = 0; i < size; ++i)
|
||||||
|
arr.Add(FMath::RandRange(min, max));
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ALevelBase* UCommonFunctions::GetCurrentLevelScript(UObject* obj)
|
ALevelBase* UCommonFunctions::GetCurrentLevelScript(UObject* obj)
|
||||||
|
@ -21,6 +21,8 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, Category = Actor)
|
UFUNCTION(BlueprintCallable, Category = Actor)
|
||||||
static void DestroyActorRecursively(class AActor* actor);
|
static void DestroyActorRecursively(class AActor* actor);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure)
|
||||||
|
static TArray<int32> GetRandomIntArray(int32 size = 16, int32 min = 0, int32 max = 16);
|
||||||
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = Level)
|
UFUNCTION(BlueprintCallable, Category = Level)
|
||||||
|
@ -15,6 +15,11 @@ TMap<UClass*, FAgeOfWarUnitStats> AAgeOfWarManager::unitStats = {};
|
|||||||
const FAgeOfWarUnitStats& AAgeOfWarManager::UnitGetStats(TSubclassOf<AAgeOfWarUnit> unitClass)
|
const FAgeOfWarUnitStats& AAgeOfWarManager::UnitGetStats(TSubclassOf<AAgeOfWarUnit> unitClass)
|
||||||
{
|
{
|
||||||
check(unitStats.Contains(*unitClass));
|
check(unitStats.Contains(*unitClass));
|
||||||
|
//if(!unitStats.Contains(*unitClass))
|
||||||
|
//{
|
||||||
|
// static FAgeOfWarUnitStats empty;
|
||||||
|
// return empty;
|
||||||
|
//}
|
||||||
|
|
||||||
return unitStats[unitClass];
|
return unitStats[unitClass];
|
||||||
}
|
}
|
||||||
@ -52,6 +57,10 @@ void AAgeOfWarManager::Start(APlayerBase* playerPawn, FMinigameEndCallback deleg
|
|||||||
|
|
||||||
void AAgeOfWarManager::End()
|
void AAgeOfWarManager::End()
|
||||||
{
|
{
|
||||||
|
for(auto& unit : spawnedUnits)
|
||||||
|
unit->Destroy();
|
||||||
|
spawnedUnits.Empty();
|
||||||
|
|
||||||
unitStats.Empty();
|
unitStats.Empty();
|
||||||
|
|
||||||
player->ReturnPlayerView();
|
player->ReturnPlayerView();
|
||||||
@ -60,6 +69,12 @@ void AAgeOfWarManager::End()
|
|||||||
AMinigame::End();
|
AMinigame::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AAgeOfWarManager::UnitKill(AAgeOfWarUnit* unit)
|
||||||
|
{
|
||||||
|
OnUnitKill(unit);
|
||||||
|
spawnedUnits.Remove(unit);
|
||||||
|
}
|
||||||
|
|
||||||
void AAgeOfWarManager::AddUnitStats(TSubclassOf<AAgeOfWarUnit> unitClass, FAgeOfWarUnitStats stats)
|
void AAgeOfWarManager::AddUnitStats(TSubclassOf<AAgeOfWarUnit> unitClass, FAgeOfWarUnitStats stats)
|
||||||
{
|
{
|
||||||
unitStats.Add(unitClass, stats);
|
unitStats.Add(unitClass, stats);
|
||||||
@ -77,4 +92,6 @@ void AAgeOfWarManager::SpawnUnit(TSubclassOf<AAgeOfWarUnit> unitClass, FTransfor
|
|||||||
auto unit = GetWorld()->SpawnActor<AAgeOfWarUnit>(*unitClass, transform, spawnParams);
|
auto unit = GetWorld()->SpawnActor<AAgeOfWarUnit>(*unitClass, transform, spawnParams);
|
||||||
unit->team = computer ? UnitTeam::AI : UnitTeam::Player;
|
unit->team = computer ? UnitTeam::AI : UnitTeam::Player;
|
||||||
unit->manager = this;
|
unit->manager = this;
|
||||||
|
unit->UpdateStats();
|
||||||
|
spawnedUnits.Add(unit);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ public:
|
|||||||
virtual void Start(class APlayerBase* playerPawn, FMinigameEndCallback delegate) override;
|
virtual void Start(class APlayerBase* playerPawn, FMinigameEndCallback delegate) override;
|
||||||
virtual void End() override;
|
virtual void End() override;
|
||||||
|
|
||||||
|
void UnitKill(class AAgeOfWarUnit* unit);
|
||||||
UFUNCTION(BlueprintImplementableEvent)
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
void OnUnitKill(class AAgeOfWarUnit* unit);
|
void OnUnitKill(class AAgeOfWarUnit* unit);
|
||||||
|
|
||||||
@ -38,4 +39,5 @@ protected:
|
|||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
class UCameraComponent* camera;
|
class UCameraComponent* camera;
|
||||||
|
|
||||||
|
TSet<AAgeOfWarUnit*> spawnedUnits;
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,13 @@
|
|||||||
#include "AgeOfWarManager.h"
|
#include "AgeOfWarManager.h"
|
||||||
#include <Components/BoxComponent.h>
|
#include <Components/BoxComponent.h>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
constexpr auto PlayerCollision = TEXT("AgeOfWarUnitPlayer");
|
||||||
|
constexpr auto ComputerCollision = TEXT("AgeOfWarUnitComputer");
|
||||||
|
constexpr auto TagNoAuto = TEXT("NoAuto");
|
||||||
|
}
|
||||||
|
|
||||||
const FAgeOfWarUnitStats& AAgeOfWarUnit::GetStats()
|
const FAgeOfWarUnitStats& AAgeOfWarUnit::GetStats()
|
||||||
{
|
{
|
||||||
if(!stats)
|
if(!stats)
|
||||||
@ -19,6 +26,25 @@ const FAgeOfWarUnitStats& AAgeOfWarUnit::GetStats()
|
|||||||
void AAgeOfWarUnit::UpdateStats()
|
void AAgeOfWarUnit::UpdateStats()
|
||||||
{
|
{
|
||||||
health = GetStats().health;
|
health = GetStats().health;
|
||||||
|
attackStartRange = GetStats().attackStartRange;
|
||||||
|
|
||||||
|
switch(team)
|
||||||
|
{
|
||||||
|
case UnitTeam::AI:
|
||||||
|
root->SetCollisionProfileName(ComputerCollision);
|
||||||
|
allyblocker->SetCollisionProfileName(PlayerCollision);
|
||||||
|
break;
|
||||||
|
case UnitTeam::Player:
|
||||||
|
root->SetCollisionProfileName(PlayerCollision);
|
||||||
|
allyblocker->SetCollisionProfileName(ComputerCollision);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
allyblocker->SetBoxExtent(root->GetUnscaledBoxExtent(), false);
|
||||||
|
allyblocker->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
||||||
|
|
||||||
|
OnUpdateStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AAgeOfWarUnit::BeginPlay()
|
void AAgeOfWarUnit::BeginPlay()
|
||||||
@ -29,6 +55,8 @@ void AAgeOfWarUnit::BeginPlay()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
world = GetWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AAgeOfWarUnit::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
void AAgeOfWarUnit::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
||||||
@ -38,10 +66,12 @@ void AAgeOfWarUnit::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
|||||||
|
|
||||||
AAgeOfWarUnit::AAgeOfWarUnit()
|
AAgeOfWarUnit::AAgeOfWarUnit()
|
||||||
{
|
{
|
||||||
//auto root = CreateDefaultSubobject<USceneComponent>(TEXT("Scene"));
|
root = CreateDefaultSubobject<UBoxComponent>(TEXT("Collision"));
|
||||||
//
|
allyblocker = CreateDefaultSubobject<UBoxComponent>(TEXT("AllyBlocker"));
|
||||||
//collision = CreateDefaultSubobject<UBoxComponent>(TEXT("Collision"));
|
allyblocker->SetupAttachment(root);
|
||||||
//collision->SetCollisionProfileName(TEXT("AgeOfWarUnit"));
|
traceStart = CreateDefaultSubobject<USceneComponent>(TEXT("TraceStart"));
|
||||||
|
traceStart->SetupAttachment(root);
|
||||||
|
traceStart->AddRelativeLocation(FVector(0, 0, 200));
|
||||||
|
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
PrimaryActorTick.bStartWithTickEnabled = true;
|
PrimaryActorTick.bStartWithTickEnabled = true;
|
||||||
@ -54,10 +84,26 @@ void AAgeOfWarUnit::Tick(float deltaTime)
|
|||||||
if(!manager || GetStats().moveSpeed <= 0)
|
if(!manager || GetStats().moveSpeed <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// move unit forward
|
// try move
|
||||||
|
FHitResult moveHit;
|
||||||
auto moveStep = GetActorForwardVector() * GetStats().moveSpeed;
|
auto moveStep = GetActorForwardVector() * GetStats().moveSpeed;
|
||||||
|
this->AddActorWorldOffset(moveStep, true, &moveHit, ETeleportType::None);
|
||||||
|
if(moveHit.bBlockingHit)
|
||||||
|
allyblocker->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
else
|
||||||
|
allyblocker->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
||||||
|
|
||||||
|
// look for units forward
|
||||||
FHitResult hit;
|
FHitResult hit;
|
||||||
this->AddActorWorldOffset(moveStep, true, &hit, ETeleportType::None);
|
auto startLocation = traceStart->GetComponentLocation();
|
||||||
|
auto endLocation = startLocation + (GetActorRotation().Vector() * attackStartRange * (moveHit.bBlockingHit ? 5 : 1));
|
||||||
|
world->LineTraceSingleByChannel(
|
||||||
|
hit,
|
||||||
|
startLocation,
|
||||||
|
endLocation,
|
||||||
|
ECollisionChannel::ECC_GameTraceChannel1
|
||||||
|
);
|
||||||
|
DrawDebugLine(GetWorld(), startLocation, endLocation, FColor::Red, false, deltaTime * 10, 0, 4.0f);
|
||||||
|
|
||||||
// check if blocked
|
// check if blocked
|
||||||
if(!hit.bBlockingHit)
|
if(!hit.bBlockingHit)
|
||||||
@ -71,7 +117,7 @@ void AAgeOfWarUnit::Tick(float deltaTime)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// iterate to attackable unit
|
// iterate to attackable unit
|
||||||
for(int i = 1; forwardUnit->team == team && i < GetStats().attackDistance; i += forwardUnit->GetStats().unitSize)
|
for(int i = 1; forwardUnit->team == team && i < GetStats().attackUnitDistance; i += forwardUnit->GetStats().unitSize)
|
||||||
forwardUnit = forwardUnit->forwardUnit;
|
forwardUnit = forwardUnit->forwardUnit;
|
||||||
|
|
||||||
// if forward unit is in the same team skip attack
|
// if forward unit is in the same team skip attack
|
||||||
@ -89,15 +135,24 @@ void AAgeOfWarUnit::Tick(float deltaTime)
|
|||||||
|
|
||||||
void AAgeOfWarUnit::Damage(const int32 damage)
|
void AAgeOfWarUnit::Damage(const int32 damage)
|
||||||
{
|
{
|
||||||
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Yellow, FString::Printf(TEXT("Damage %d taken by %s"), damage, *GetClass()->GetName()));
|
if(killed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
GEngine->AddOnScreenDebugMessage((int32)GetClass()->GetUniqueID(), 5.0f, FColor::Yellow, FString::Printf(TEXT("%d"), health));
|
||||||
|
|
||||||
health -= damage;
|
health -= damage;
|
||||||
|
|
||||||
if(health > 0)
|
if(health > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
killed = true;
|
||||||
|
|
||||||
if(IsValid(manager))
|
if(IsValid(manager))
|
||||||
manager->OnUnitKill(this);
|
{
|
||||||
|
manager->UnitKill(this);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -27,7 +27,10 @@ struct FAgeOfWarUnitStats
|
|||||||
int32 attackDamage = 1;
|
int32 attackDamage = 1;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
int32 attackDistance = 1;
|
int32 attackUnitDistance = 1;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
float attackStartRange = 100;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
float attackRate = 1.0f;
|
float attackRate = 1.0f;
|
||||||
@ -69,17 +72,28 @@ protected:
|
|||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void OnUpdateStats();
|
||||||
|
|
||||||
void Damage(const int32 damage);
|
void Damage(const int32 damage);
|
||||||
|
|
||||||
AAgeOfWarUnit* forwardUnit = nullptr;
|
AAgeOfWarUnit* forwardUnit = nullptr;
|
||||||
|
|
||||||
private:
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
UPROPERTY(EditAnywhere)
|
class UBoxComponent* root;
|
||||||
class UBoxComponent* collision;
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
class UBoxComponent* allyblocker;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
class USceneComponent* traceStart;
|
||||||
|
|
||||||
|
private:
|
||||||
int32 health;
|
int32 health;
|
||||||
|
float attackStartRange;
|
||||||
FTimerHandle attackTimer;
|
FTimerHandle attackTimer;
|
||||||
double lastAttackTimestamp = 0;
|
double lastAttackTimestamp = 0;
|
||||||
|
|
||||||
|
UWorld* world;
|
||||||
|
bool killed = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user