Add spell interactable door
This commit is contained in:
@@ -288,6 +288,16 @@ void ALumiCharacter::AddSpellTemplateToTable(const FString& Name)
|
||||
HideTrainWidget();
|
||||
}
|
||||
|
||||
void ALumiCharacter::OnSpellCast_Implementation(const FString& SpellName)
|
||||
{
|
||||
UE_LOG(
|
||||
LogLumiCharacter,
|
||||
Log,
|
||||
TEXT("ALumiCharacter::OnSpellCast_Implementation() Spell: %s"),
|
||||
*SpellName
|
||||
);
|
||||
}
|
||||
|
||||
bool ALumiCharacter::GetPlayerController(APlayerController*& LumiController) const
|
||||
{
|
||||
LumiController = Cast<APlayerController>(this->Controller);
|
||||
@@ -323,6 +333,8 @@ void ALumiCharacter::CastSpell()
|
||||
{
|
||||
bHasMatch = true;
|
||||
UE_LOG(LogLumiCharacter, Log, TEXT("ALumiCharacter::CastSpell() Spell: %s"), *Result.Name);
|
||||
|
||||
OnSpellCast(Result.Name);
|
||||
}
|
||||
|
||||
// TODO: Handle Spell Casting
|
||||
|
||||
@@ -201,6 +201,10 @@ protected:
|
||||
virtual void
|
||||
BeginPlay() override;
|
||||
|
||||
UFUNCTION(BlueprintNativeEvent, Category = "Spell")
|
||||
void
|
||||
OnSpellCast(const FString& SpellName);
|
||||
|
||||
private:
|
||||
bool
|
||||
GetPlayerController(APlayerController*& LumiController) const;
|
||||
|
||||
Reference in New Issue
Block a user