Add basic class files
This commit is contained in:
41
Source/MyProject3/EnemySpaceship.h
Normal file
41
Source/MyProject3/EnemySpaceship.h
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user