-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathProjectile.h
103 lines (72 loc) · 2.18 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#pragma once
#include "GameFramework/Actor.h"
#include "ParticleSource.h"
#include "Engine/GameInstance.h"
#include "MyGameInstance.h"
#include "Projectile.generated.h"
UCLASS()
class LEVIATHAN_API AProjectile : public AActor
{
GENERATED_BODY()
public:
AProjectile();
virtual void BeginPlay() override;
virtual void Tick( float DeltaSeconds ) override;
UPROPERTY(EditDefaultsOnly)
bool bSplashDamage = false;
UPROPERTY(EditDefaultsOnly)
float SplashRadius = 300.0f;
UPROPERTY(EditDefaultsOnly)
bool bHoming = false;
UPROPERTY(EditDefaultsOnly)
float HomingAccelScalar = 1000.0f;
UPROPERTY(EditDefaultsOnly)
bool bIsPellet;
UPROPERTY(EditDefaultsOnly)
bool bChangeSize;
UPROPERTY(EditDefaultsOnly)
float SizeChangeSpeed = 10.0f;
UPROPERTY(EditDefaultsOnly)
FVector InitialSize;
UPROPERTY(EditDefaultsOnly)
FVector FinalSize;
UPROPERTY(EditDefaultsOnly)
bool bDestroyOnHit;
UPROPERTY(EditDefaultsOnly)
float ParticleSpawnSize = 1.0f;
UPROPERTY(EditDefaultsOnly)
bool bAccelerating = false;
UPROPERTY(EditDefaultsOnly)
float AccelerationScalar;
UPROPERTY(EditDefaultsOnly)
TSubclassOf<AParticleSource> P_Explosion;
UPROPERTY(EditDefaultsOnly)
TSubclassOf<AParticleSource> P_ShipExplosion;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
UStaticMeshComponent* StaticMesh;
UPROPERTY(EditDefaultsOnly)
UProjectileMovementComponent* MovementComponent;
UPROPERTY(EditDefaultsOnly)
UParticleSystemComponent* ParticleComponent;
UPROPERTY(EditDefaultsOnly)
UBoxComponent* ColliderComponent;
UPROPERTY(EditDefaultsOnly)
USceneComponent* HomingComponent;
UPROPERTY(EditDefaultsOnly)
float Damage = 1;
UPROPERTY(EditDefaultsOnly)
float ImpactForce;
protected:
UFUNCTION()
void OnOverlapBegin(AActor* OverlappedActor, AActor* OtherActor);
bool bSpeedSet = false;
bool bDmgDelivered = false;
bool bSparkedOnSelf = false;
bool bReflected = false;
class AParticleSource* ExplosionActual;
float LifeTime = 0.0f;
UPROPERTY(EditAnywhere, Category = Sound)
USoundBase* ImpactSoundBase;
UPROPERTY(EditDefaultsOnly)
TSubclassOf<AAmbientSound> ImpactSound;
};