Implement enemy shooting and scale down for more arcade game feel

This commit is contained in:
2025-04-15 22:21:28 +05:30
parent ca23fd129e
commit e2e709bffd
14 changed files with 886 additions and 41 deletions

View File

@@ -55,7 +55,10 @@ protected:
int32 MaxEnemies = 10;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawning")
float ScreenSpawnMargin = 100.0f;
float ScreenSpawnMargin = 300.0f; // Increased from 100.0f
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawning")
float MinimumSpawnDistance = 4000.0f; // New property to ensure minimum spawn distance
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawning")
TArray<FSpawnZone> SpawnZones;
@@ -93,4 +96,7 @@ private:
FVector GetPlayerLocation();
TArray<FVector2D> GetScreenBounds();
void RotateTowardsPlayer(AEnemySpaceship* Enemy, const FVector& PlayerLocation);
// New helper method to ensure minimum spawn distance
FVector EnsureMinimumSpawnDistance(const FVector& ProposedLocation, const FVector& PlayerLocation);
};