Add some on-screen FX for some items
This commit is contained in:
@@ -34,6 +34,7 @@ public partial class DummyPlayer : CharacterBody3D, IPlayer
|
||||
public void LevelUp() => throw new NotImplementedException();
|
||||
public void ModifyHealthTimerSpeed(float newModifier) => throw new NotImplementedException();
|
||||
public void PlayJumpScareAnimation() => throw new NotImplementedException();
|
||||
public void PlaySpellFX(SpellFXEnum spellEnum) => throw new NotImplementedException();
|
||||
public void ResetPlayerData() => throw new NotImplementedException();
|
||||
public void SetHealthTimerStatus(bool isActive) => throw new NotImplementedException();
|
||||
public void TakeDamage(AttackData damage) => throw new NotImplementedException();
|
||||
|
||||
@@ -75,6 +75,8 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
#endregion
|
||||
|
||||
#region Node Dependencies
|
||||
[Node] public IAnimationPlayer SpellFXAnimations { get; set; } = default!;
|
||||
|
||||
[Node] private IAnimationPlayer WeaponAnimations { get; set; } = default!;
|
||||
|
||||
[Node] private IAnimationPlayer PlayerFXAnimations { get; set; } = default!;
|
||||
@@ -596,6 +598,12 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
}
|
||||
}
|
||||
|
||||
public void PlaySpellFX(SpellFXEnum spellEnum)
|
||||
{
|
||||
SpellFXAnimations.Stop();
|
||||
SpellFXAnimations.Play(spellEnum.ToString());
|
||||
}
|
||||
|
||||
private void OnLevelUp()
|
||||
{
|
||||
BoostPlayerHPFromLevelUp();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1
Zennysoft.Game.Ma/src/player/SpellFXEnum.cs.uid
Normal file
1
Zennysoft.Game.Ma/src/player/SpellFXEnum.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dpq4n4gtxktx3
|
||||
Reference in New Issue
Block a user