Example #1
0
        /// <summary>
        /// Restores the activeHero to the starting point to try the level again.
        /// </summary>
        public void StartNewLife()
        {
            if (!activeHero.Equals(Heroes[0]) && Heroes[0].IsAlive)
            {
                Heroes[0].SwapIn();
                activeHero = (Hero)Heroes[0];
            }
            else if (!activeHero.Equals(Heroes[1]) && Heroes[1].IsAlive)
            {
                Heroes[1].SwapIn();
                activeHero = (Hero)Heroes[1];
            }
            else if (!activeHero.Equals(Heroes[2]) && Heroes[2].IsAlive)
            {
                Heroes[2].SwapIn();
                activeHero = (Hero)Heroes[2];
            }
            else
            {
                return;
            }

            ActiveHero.Reset(start);
        }