Esempio n. 1
0
        public void KillThePlayer()
        {
            PlayerBlock player = Blocks.OfType <PlayerBlock>().FirstOrDefault();

            if (player != null)
            {
                player.ExplodeNeighbour(Directions.None);
            }
        }
Esempio n. 2
0
        public bool UpdatePlayer(Directions playerDirection)
        {
            PlayerBlock player = Blocks.OfType <PlayerBlock>().FirstOrDefault();

            if (player != null)
            {
                player.UpdatePosition(this, playerDirection);
            }
            if (HeartsToComplete == HeartsTaken)
            {
                this.Blocks.OfType <ExitBlock>().ToList().ForEach(e => e.levelOpen());
            }

            return(true);
        }