#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 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 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 WeaponPreviewClass; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) TSubclassOf 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& 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 GetWeaponViewClass() const; UFUNCTION(BlueprintCallable, BlueprintPure) static AGrenade* GetGrenadeDefaultObject(TSubclassOf 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 GetLoadoutItemClass() const override PURE_VIRTUAL(GetLoadoutItemClass, return NULL;); };