Add basic class files
This commit is contained in:
33
Source/MyProject3/SpaceshipProjectile.h
Normal file
33
Source/MyProject3/SpaceshipProjectile.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "SpaceshipProjectile.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class MYPROJECT3_API ASpaceshipProjectile : public AActor
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
ASpaceshipProjectile();
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
|
||||
class UStaticMeshComponent* ProjectileMesh;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
|
||||
class UProjectileMovementComponent* ProjectileMovement;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Projectile")
|
||||
float ProjectileSpeed = 3000.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Projectile")
|
||||
float DamageAmount = 20.0f;
|
||||
|
||||
UFUNCTION()
|
||||
void OnHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp,
|
||||
FVector NormalImpulse, const FHitResult& Hit);
|
||||
};
|
||||
Reference in New Issue
Block a user