public override void Destroy()
        {
            //spawn powerup
            if (Utility.RandomDouble() < BombermanSettings.UPGRADE_SPAWN_CHANCE)
            {
                if (BoardGameControlItem.State == BoardGameState.Active)
                {
                    BombermanUpgrade upgrade = BombermanUpgrade.GetRandomUpgrade();
                    upgrade.RegisterToBoardGameControlItem(BoardGameControlItem, new Point3D(Offset.X, Offset.Y, Offset.Z + 3));
                }
            }

            base.Destroy();
        }
Esempio n. 2
0
        public override void Destroy()
        {
            //spawn powerup
            if (Utility.RandomDouble() < BombermanSettings.UPGRADE_SPAWN_CHANCE)
            {
                if (BoardGameControlItem.State == BoardGameState.Active)
                {
                    //BombermanUpgrade upgrade = BombermanUpgrade.GetRandomUpgrade();
                    BombermanUpgrade upgrade = BombermanUpgrade.GetRandomUpgrade(BoardGameControlItem._AllowSpeedUpgrade, BoardGameControlItem._AllowDetonatorUpgrade,
                                                                                 BoardGameControlItem._AllowBaddaBoomUpgrade, BoardGameControlItem._AllowBlastStrengthUpgrade);
                    upgrade.RegisterToBoardGameControlItem(BoardGameControlItem, new Point3D(Offset.X, Offset.Y, Offset.Z + 3));
                }
            }

            base.Destroy();
        }
Esempio n. 3
0
 public DecayTimer(BombermanUpgrade upgrade) : base(TimeSpan.FromSeconds(BombermanSettings.UPGRADE_DECAY_DELAY), TimeSpan.FromSeconds(1.0))
 {
     _BombermanUpgrade = upgrade;
 }
			public DecayTimer( BombermanUpgrade upgrade ) : base( TimeSpan.FromSeconds( BombermanSettings.UPGRADE_DECAY_DELAY ), TimeSpan.FromSeconds( 1.0 ) )
			{
				_BombermanUpgrade = upgrade;
			}