325 lines
11 KiB
C++
Executable file
325 lines
11 KiB
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/EngineTypes.h"
|
|
#include "Curves/CurveFloat.h"
|
|
#include "EDeepMovementState.h"
|
|
#include "EPatrolBotControlState.h"
|
|
#include "EPatrolBotState.h"
|
|
#include "EnemyDeepPathfinderCharacter.h"
|
|
#include "PatrolBot.generated.h"
|
|
|
|
class AActor;
|
|
class UAudioComponent;
|
|
class UAvoidCeilingComponent;
|
|
class UDamageComponent;
|
|
class UEnemyComponent;
|
|
class UFakeMoverSettings;
|
|
class UHackingUsableComponent;
|
|
class UHealthComponentBase;
|
|
class UParticleSystemComponent;
|
|
class UPawnAlertComponent;
|
|
class UPawnSensingComponent;
|
|
class UPlayerImpactCooldownComponent;
|
|
class UPrimitiveComponent;
|
|
class UProjectileAttackComponent;
|
|
class USoundCue;
|
|
class USphereComponent;
|
|
|
|
UCLASS(Abstract, Blueprintable)
|
|
class FSD_API APatrolBot : public AEnemyDeepPathfinderCharacter {
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UHackingUsableComponent* HackingUsable;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UPawnSensingComponent* PawnSensing;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
USphereComponent* CollisionSphere;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
USphereComponent* NearTargetSphere;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UParticleSystemComponent* LaserBeam;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UParticleSystemComponent* TearingGroundParticles;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UEnemyComponent* EnemyComponent;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UDamageComponent* Damage;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UDamageComponent* BumpDamage;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UPawnAlertComponent* Alert;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UPlayerImpactCooldownComponent* ImpactCooldown;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UAvoidCeilingComponent* CeilingAvoidance;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UAudioComponent* RollingAudio;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UAudioComponent* FlyingAudio;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UProjectileAttackComponent* RollingRangedAttack;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UProjectileAttackComponent* FlyingRangedAttack;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UProjectileAttackComponent* MissileAttack;
|
|
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxMotionSoundVelThresholdFlying;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxMotionSoundVelThreshold;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxTurningMotionSoundVelThreshold;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool DebugAudio;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float HackedAttackMultiplier;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_IsLockedOn, meta=(AllowPrivateAccess=true))
|
|
bool IsLockedOn;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float DelayAfterLockOn;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
USoundCue* ImpactCue;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
USoundCue* JumpSound;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
USoundCue* StartupAccelerationSound;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float LaunchPower;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float SpawnRocketsTime;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_State, meta=(AllowPrivateAccess=true))
|
|
EPatrolBotState State;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_ControlState, meta=(AllowPrivateAccess=true))
|
|
EPatrolBotControlState ControlState;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float HackedAttackSpeedMultiplier;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float LaserPenetrationDistance;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MinTurretAngle;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxTurretAngle;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float SpawnRocketsChance;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float GunRange;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float RollingAttackCooldown;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float FlyingAttackCooldown;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float TurretLerpSpeed;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float AimDownwardsOffset;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float AccelerationThreshold;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float LowSpeedThreshold;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
FRuntimeFloatCurve SpeedTiltCurve;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UFakeMoverSettings* RollSettings;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UFakeMoverSettings* JumpSettings;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UFakeMoverSettings* SpawnRocketsSettings;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool CanJump;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float JumpForce;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float StartFlyingTimer;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MinRollingTime;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxRollingTime;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MinFlyingTime;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxFlyingTime;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float SinSpeed;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float SinSize;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float FlyingDampOmega;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float RollingDampOmega;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_FiringRockets, meta=(AllowPrivateAccess=true))
|
|
bool FiringRockets;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, Transient, meta=(AllowPrivateAccess=true))
|
|
bool Alerted;
|
|
|
|
private:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, Transient, meta=(AllowPrivateAccess=true))
|
|
AActor* CurrentTarget;
|
|
|
|
public:
|
|
APatrolBot();
|
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void SetIsPatrolling(bool patroling);
|
|
|
|
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
|
|
void SetHacked();
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
|
|
void SetFiringRockets(bool firing);
|
|
|
|
public:
|
|
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
|
|
void ReviveDrone();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnStateChangedEvent(EPatrolBotState CurrentState);
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnSpawnRocketsEvent();
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnRocketsEnded();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnRevived();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_State();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_IsLockedOn();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_FiringRockets();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_ControlState(EPatrolBotControlState oldState);
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnProjectileSpawned();
|
|
|
|
public:
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnMovementStateChanged(EDeepMovementState NewState);
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnLockedOn();
|
|
|
|
public:
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnLandedEvent();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnJumpEvent();
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnFireRockets();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnDroneHacked();
|
|
|
|
public:
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnDroneAlerted();
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnDisabled();
|
|
|
|
private:
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnDeath(UHealthComponentBase* aHealthComponent);
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnControlStateChanged(EPatrolBotControlState NewControlState);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnCollided(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
|
|
|
|
UFUNCTION(BlueprintCallable, NetMulticast, Unreliable)
|
|
void Jumped();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
|
bool IsHacked() const;
|
|
|
|
UFUNCTION(BlueprintCallable, NetMulticast, Unreliable)
|
|
void ImpactSound();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void EndFireRockets();
|
|
|
|
public:
|
|
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
|
|
void DisableDrone();
|
|
|
|
private:
|
|
UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
|
|
void All_SetLaserBeamActive(bool Active);
|
|
|
|
};
|
|
|