20. Constructing the ASC and AS
This commit is contained in:
4
Project/Source/Gasa/AbilitySystem/GasaAbilitySystem.h
Normal file
4
Project/Source/Gasa/AbilitySystem/GasaAbilitySystem.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include "GasaCommon.h"
|
||||
|
@ -1,12 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "AbilitySystemInterface.h"
|
||||
|
||||
#include "GasaCommon.h"
|
||||
|
||||
#include "GasaAbilitySystemComponent.generated.h"
|
||||
|
||||
|
||||
UCLASS()
|
||||
class GASA_API UGasaAbilitySystemComp : public UAbilitySystemComponent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
};
|
||||
|
||||
namespace Gasa
|
||||
{
|
||||
inline
|
||||
UGasaAbilitySystemComp* GetAbilitySystem(UObject* Object)
|
||||
{
|
||||
if (Object->Implements<UAbilitySystemInterface>())
|
||||
{
|
||||
return Cast<UGasaAbilitySystemComp>( Cast<IAbilitySystemInterface>(Object)->GetAbilitySystemComponent() );
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user