/// <summary> /// Initialize this HurtableSprite. /// </summary> public override void Initialize() { base.Initialize(); AnimationsManager animationsManager = GameScreen.Services.GetService(typeof(AnimationsManager)) as AnimationsManager; animationsManager.InheritAnimation(this, m_animationName); }
/// <summary> /// Turning off the quit animation. /// </summary> protected override void turnOffAnimation() { base.turnOffAnimation(); if (Souls == 1) { m_AnimationsLibrary.Pause(); m_AnimationsLibrary.Clear(); AnimationsManager animationsManager = GameScreen.Services.GetService(typeof(AnimationsManager)) as AnimationsManager; m_animationName = "Spaceship Dying"; bool v_Override = true; animationsManager.InheritAnimation(this, m_animationName, v_Override); m_isFiniteSprite = true; } else if (IsDead && OutOfSouls != null) { OutOfSouls.Invoke(); } }