Added the mite enemy and started working on AI for melee

feature/melee
Jers 11 months ago
parent 057e6f9602
commit 94eeccde07

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Levels/MainMenu.umap (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -35,6 +35,7 @@ int32 UPartySubsystem::SpawnParty(const float InVerticalSpacing, const float InH
this->NumRows = InNumRows; this->NumRows = InNumRows;
this->HorizontalSpacing = InHorizontalSpacing; this->HorizontalSpacing = InHorizontalSpacing;
CurrentColumn = 0; CurrentColumn = 0;
LastSpawnIndex = 0;
SpawnQueue.Empty(); SpawnQueue.Empty();
TArray<AActor*> SpawnPoints; TArray<AActor*> SpawnPoints;
@ -43,7 +44,8 @@ int32 UPartySubsystem::SpawnParty(const float InVerticalSpacing, const float InH
for (FPartyMember &Unit : GetMembers()) for (FPartyMember &Unit : GetMembers())
{ {
for(auto i = 0; i < GetMemberAllocated(Unit); i++) const int32 Allocated = GetMemberAllocated(Unit);
for(auto i = 0; i < Allocated; i++)
{ {
SpawnQueue.Add(GetMemberUnitInfo(Unit)->GetCharacterClass()); SpawnQueue.Add(GetMemberUnitInfo(Unit)->GetCharacterClass());
} }
@ -135,7 +137,7 @@ bool UPartySubsystem::AllocateMember(FPartyMember& Member)
return true; return true;
} }
bool UPartySubsystem::DeallocateMember(FPartyMember& Member) bool UPartySubsystem::DeallocateMember(FPartyMember &Member)
{ {
Member.Allocated--; Member.Allocated--;

@ -19,6 +19,7 @@ int32 UWaveSubsystem::SpawnWave(const float InVerticalSpacing, const float InHor
SpawnQueue = Waves[CurrentWave]->GetUnits(); SpawnQueue = Waves[CurrentWave]->GetUnits();
const auto NumUnits = SpawnQueue.Num(); const auto NumUnits = SpawnQueue.Num();
CurrentColumn = 0; CurrentColumn = 0;
LastSpawnIndex = 0;
TArray<AActor*> SpawnPoints; TArray<AActor*> SpawnPoints;
UGameplayStatics::GetAllActorsWithTag(GetWorld(), "EnemySpawn", SpawnPoints); UGameplayStatics::GetAllActorsWithTag(GetWorld(), "EnemySpawn", SpawnPoints);
@ -75,4 +76,5 @@ void UWaveSubsystem::SpawnUnits()
} }
LastSpawnIndex += NumRows; LastSpawnIndex += NumRows;
CurrentColumn++;
} }

@ -38,7 +38,7 @@ public:
bool AllocateMember(UPARAM(ref) FPartyMember& Member); bool AllocateMember(UPARAM(ref) FPartyMember& Member);
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
bool DeallocateMember(UPARAM(ref) FPartyMember& Member); bool DeallocateMember(UPARAM(ref) FPartyMember &Member);
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
void SetMemberMax(UPARAM(ref) FPartyMember& Member); void SetMemberMax(UPARAM(ref) FPartyMember& Member);

@ -39,9 +39,15 @@ protected:
UPROPERTY(BlueprintReadWrite, EditAnywhere) UPROPERTY(BlueprintReadWrite, EditAnywhere)
bool IsRanged; bool IsRanged;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
float IsFlying;
UPROPERTY(BlueprintReadWrite, EditAnywhere) UPROPERTY(BlueprintReadWrite, EditAnywhere)
float Range; float Range;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
float Speed;
UPROPERTY(BlueprintReadWrite, EditAnywhere) UPROPERTY(BlueprintReadWrite, EditAnywhere)
int32 Tier; int32 Tier;

Loading…
Cancel
Save