Beispiel #1
0
        private bool HandleCollision(PowerupCell cell)
        {
            int powerup = cell.powerup;

            TryAddPowerup(powerup);

            cell.RemoveFromField();
            return(true);
        }
Beispiel #2
0
        //////////////////////////////////////////////////////////////////////////////

        #region Bombs

        public void SetBomb(Bomb bomb)
        {
            AddCell(bomb);

            FieldCellSlot slot    = GetSlot(bomb);
            PowerupCell   powerup = slot.GetPowerup();

            if (powerup != null)
            {
                powerup.RemoveFromField();
            }
            else
            {
                FlameCell flame = slot.GetFlame();
                if (flame != null)
                {
                    bomb.Blow();
                }
            }
        }