Add Basic Spell System (#9)

Co-authored-by: alhashij <alhashimy.janna@gmail.com>
Reviewed-on: #9
Co-authored-by: Lance1416 <lanceli1416@gmail.com>
Co-committed-by: Lance1416 <lanceli1416@gmail.com>
This commit was merged in pull request #9.
This commit is contained in:
2025-05-22 01:44:20 -04:00
committed by Lance Li
parent c040d71325
commit f3b2cf8c32
24 changed files with 196 additions and 76 deletions
@@ -30,6 +30,11 @@ void ALumiController::GetLumiCharacter(ALumiCharacter*& OutLumiCharacter) const
OutLumiCharacter = LumiCharacter;
}
ALumiCharacter* ALumiController::GetLumiCharacter() const
{
return LumiCharacter;
}
void ALumiController::OnPossess(APawn* InPawn)
{
Super::OnPossess(InPawn);
@@ -99,8 +104,8 @@ void ALumiController::OnPossess(APawn* InPawn)
{
EnhancedInputComponent->BindAction(SpellAction,
ETriggerEvent::Started,
LumiCharacter,
&ALumiCharacter::OnSpellActionStarted);
this,
&ALumiController::OnSpellActionStarted);
EnhancedInputComponent->BindAction(SpellAction,
ETriggerEvent::Completed,
this,
@@ -128,12 +133,12 @@ void ALumiController::OnUnPossess()
void ALumiController::OnSpellActionStarted()
{
ShowMouseCursor();
// ShowMouseCursor();
LumiCharacter->OnSpellActionStarted();
}
void ALumiController::OnSpellActionCompleted()
{
LumiCharacter->OnSpellActionCompleted();
HideMouseCursor();
// HideMouseCursor();
}