129 lines
4.4 KiB
C++
Executable file
129 lines
4.4 KiB
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/NoExportTypes.h"
|
|
#include "UObject/NoExportTypes.h"
|
|
#include "UObject/NoExportTypes.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "Engine/EngineTypes.h"
|
|
#include "ItemIDInterface.h"
|
|
#include "LoadoutItem.h"
|
|
#include "SaveGameIDInterface.h"
|
|
#include "Templates/SubclassOf.h"
|
|
#include "Grenade.generated.h"
|
|
|
|
class AGrenade;
|
|
class AItem;
|
|
class ALoadoutItemProxy;
|
|
class UGrenadeAnimationSet;
|
|
class UGrenadeProjectionSettings;
|
|
class UItemID;
|
|
class UParticleSystem;
|
|
class UProjectileMovementComponent;
|
|
class USoundCue;
|
|
class UStaticMesh;
|
|
class UUserWidget;
|
|
|
|
UCLASS(Blueprintable)
|
|
class AGrenade : public AActor, public ISaveGameIDInterface, public IItemIDInterface, public ILoadoutItem {
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
TSubclassOf<UUserWidget> CrossHairType;
|
|
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UProjectileMovementComponent* Movement;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float CoolDown;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, meta=(AllowPrivateAccess=true))
|
|
float Duration;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool CanCook;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float cookTime;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
TArray<FVector2D> CookTickTimeline;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
USoundCue* CookingSound;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float ExplosionDelay;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool ExplodeOnImpact;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
FRotator ThrowDirectionOffset;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
int32 MaxGrenades;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_HasExploded, meta=(AllowPrivateAccess=true))
|
|
bool HasExploded;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UItemID* ItemID;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
TSubclassOf<AActor> WeaponPreviewClass;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
TSubclassOf<ALoadoutItemProxy> LoadoutProxy;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UStaticMesh* HandAttachMesh;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UGrenadeProjectionSettings* ProjectionSettings;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
USoundCue* ImpactGroundSound;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UParticleSystem* ImpactGroundParticles;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UGrenadeAnimationSet* GrenadeAnimationSetOverride;
|
|
|
|
public:
|
|
AGrenade();
|
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_HasExploded();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnExploded();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
|
bool IsNonFriendlyPawn(AActor* Actor) const;
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
|
bool IsNonFriendly(AActor* Actor) const;
|
|
|
|
public:
|
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
|
TSubclassOf<AActor> GetWeaponViewClass() const;
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
|
static AGrenade* GetGrenadeDefaultObject(TSubclassOf<AGrenade> GrenadeClass);
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable)
|
|
void ActorWasHit(AActor* SelfActor, AActor* OtherActor, FVector NormalImpulse, const FHitResult& Hit);
|
|
|
|
|
|
// Fix for true pure virtual functions not being implemented
|
|
public:
|
|
UFUNCTION(BlueprintCallable)
|
|
TSubclassOf<AItem> GetLoadoutItemClass() const override PURE_VIRTUAL(GetLoadoutItemClass, return NULL;);
|
|
|
|
};
|
|
|