43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
// Project Lab - NHTV Igad
|
|
|
|
#pragma once
|
|
|
|
#include "Blueprint/UserWidget.h"
|
|
#include "SpellInfo.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class UNREALPROJECT_API USpellInfo : public UUserWidget
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
USpellInfo(const FObjectInitializer& init);
|
|
void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
|
|
|
|
UFUNCTION(BlueprintCallable, Category="GUI")
|
|
void Set(class UAbilityInfo* info, int32 level, float power, class USpellInfoDisplay* parent);
|
|
UFUNCTION(BlueprintCallable, Category = "GUI")
|
|
float GetLifeTimeRate() const;
|
|
UFUNCTION(BlueprintCallable, Category = "Ability")
|
|
int32 GetLevel() const;
|
|
UFUNCTION(BlueprintCallable, Category = "Ability")
|
|
float GetPower() const;
|
|
|
|
UFUNCTION(BlueprintNativeEvent)
|
|
void OnSetAbility(class UAbilityInfo* info, bool isNew);
|
|
UFUNCTION(BlueprintNativeEvent)
|
|
void SetButtonHint(int32 buttonSlot, bool alt);
|
|
|
|
UPROPERTY(EditDefaultsOnly)
|
|
float showDuration;
|
|
|
|
private:
|
|
UAbilityInfo* m_ability;
|
|
class USpellInfoDisplay* m_parent;
|
|
float m_life;
|
|
int32 m_level;
|
|
float m_power;
|
|
};
|