mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 15:05:53 +00:00
Death animations and spawner
This commit is contained in:
parent
4fd31d7988
commit
16b7d936c9
13 changed files with 286 additions and 11 deletions
|
|
@ -15,7 +15,7 @@ public partial class AnimationHandler : ActorModule
|
|||
public override void Init(Actor parent)
|
||||
{
|
||||
_parent = parent;
|
||||
|
||||
_parent.OnDeath += ParentOnOnDeath;
|
||||
// var children = GetChildren();
|
||||
// foreach (var child in children) {
|
||||
// if (child is InputProvider inputProvider)
|
||||
|
|
@ -25,6 +25,12 @@ public partial class AnimationHandler : ActorModule
|
|||
// }
|
||||
}
|
||||
|
||||
protected virtual void ParentOnOnDeath()
|
||||
{
|
||||
_animatedSprite.SpeedScale = 0;
|
||||
_animatedSprite.Hide();
|
||||
}
|
||||
|
||||
public override void Update(double delta)
|
||||
{
|
||||
if (IsDestroyed) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue