Add basic class files

This commit is contained in:
2025-02-15 21:30:02 +05:30
parent 07ed6f8876
commit bb4d1bef59
6 changed files with 352 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "EnemySpaceship.generated.h"
UCLASS()
class MYPROJECT3_API AEnemySpaceship : public APawn
{
GENERATED_BODY()
public:
AEnemySpaceship();
virtual void Tick(float DeltaTime) override;
protected:
virtual void BeginPlay() override;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
class UStaticMeshComponent* ShipMesh;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AI")
float DetectionRange = 1500.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AI")
float FireRate = 2.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Movement")
float MovementSpeed = 500.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat")
float MaxHealth = 100.0f;
float CurrentHealth;
FTimerHandle FireTimerHandle;
class ASpaceshipPawn* PlayerPawn;
void FireAtPlayer();
virtual float TakeDamage(float Damage, struct FDamageEvent const& DamageEvent,
AController* EventInstigator, AActor* DamageCauser) override;
};