|
|
|
|
| #pragma once
|
|
|
| #include "Cosmetics/LyraCosmeticAnimationTypes.h"
|
| #include "Equipment/LyraEquipmentInstance.h"
|
| #include "GameFramework/InputDevicePropertyHandle.h"
|
|
|
| #include "LyraWeaponInstance.generated.h"
|
|
|
| #define UE_API LYRAGAME_API
|
|
|
| class UAnimInstance;
|
| class UObject;
|
| struct FFrame;
|
| struct FGameplayTagContainer;
|
| class UInputDeviceProperty;
|
|
|
| |
| |
| |
| |
|
|
| UCLASS(MinimalAPI)
|
| class ULyraWeaponInstance : public ULyraEquipmentInstance
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
| UE_API ULyraWeaponInstance(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
|
|
|
|
|
| UE_API virtual void OnEquipped() override;
|
| UE_API virtual void OnUnequipped() override;
|
|
|
|
|
| UFUNCTION(BlueprintCallable)
|
| UE_API void UpdateFiringTime();
|
|
|
|
|
| UFUNCTION(BlueprintPure)
|
| UE_API float GetTimeSinceLastInteractedWith() const;
|
|
|
| protected:
|
| UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Animation)
|
| FLyraAnimLayerSelectionSet EquippedAnimSet;
|
|
|
| UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Animation)
|
| FLyraAnimLayerSelectionSet UneuippedAnimSet;
|
|
|
| |
| |
| |
| |
|
|
| UPROPERTY(EditDefaultsOnly, Instanced, BlueprintReadOnly, Category = "Input Devices")
|
| TArray<TObjectPtr<UInputDeviceProperty>> ApplicableDeviceProperties;
|
|
|
|
|
| UFUNCTION(BlueprintCallable, BlueprintPure=false, Category=Animation)
|
| UE_API TSubclassOf<UAnimInstance> PickBestAnimLayer(bool bEquipped, const FGameplayTagContainer& CosmeticTags) const;
|
|
|
|
|
| UFUNCTION(BlueprintCallable)
|
| UE_API const FPlatformUserId GetOwningUserId() const;
|
|
|
|
|
| UFUNCTION()
|
| UE_API void OnDeathStarted(AActor* OwningActor);
|
|
|
| |
| |
| |
| |
| |
|
|
| UE_API void ApplyDeviceProperties();
|
|
|
|
|
| UE_API void RemoveDeviceProperties();
|
|
|
| private:
|
|
|
|
|
| UPROPERTY(Transient)
|
| TSet<FInputDevicePropertyHandle> DevicePropertyHandles;
|
|
|
| double TimeLastEquipped = 0.0;
|
| double TimeLastFired = 0.0;
|
| };
|
|
|
| #undef UE_API
|
|
|