-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProjectile.h
47 lines (38 loc) · 1.32 KB
/
Projectile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Projectile.generated.h"
class USoundBase;
UCLASS()
class TOONTANKS_API AProjectile : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AProjectile();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
private:
UPROPERTY(EditDefaultsOnly, Category = "Combat")
UStaticMeshComponent* ProjectileMesh;
UPROPERTY(VisibleAnywhere, Category = "Movement")
class UProjectileMovementComponent* ProjectileMovementComponent;
UFUNCTION()
void OnHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
UPROPERTY(EditAnywhere)
float Damage = 50.f;
UPROPERTY(EditAnywhere, Category = "Combat")
class UParticleSystem* HitParticles;
UPROPERTY(VisibleAnywhere, Category = "Combat")
class UParticleSystemComponent* TrailParticles;
UPROPERTY(EditAnywhere, Category = "Combat")
USoundBase* LaunchSound;
UPROPERTY(EditAnywhere, Category = "Combat")
USoundBase* HitSound;
UPROPERTY(EditAnywhere, Category = "Combat")
TSubclassOf<class UCameraShakeBase> HitCameraShakeClass;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};