Пример #1
0
		public BombermanStone( bool destructable, BombermanGame game ) : base( 0x1363 )
		{
            m_Game = game;
			Movable = false;
			Weight = 1.0;
			Name = "Bomberman stone";
			if(destructable)
				Hue = 1301;
			m_Destructable = destructable;
			
			switch( Utility.Random( 22 ) )
			{
				case 1:
				m_UpgradeType = BombermanUpgrade.BombermanUpgradeType.Strength;
				break;
				case 2:
				m_UpgradeType = BombermanUpgrade.BombermanUpgradeType.BombAmount;
				break;
                case 3:
                m_UpgradeType = BombermanUpgrade.BombermanUpgradeType.Strength;
                break;
                case 4:
                m_UpgradeType = BombermanUpgrade.BombermanUpgradeType.BombAmount;
                break;
                case 5:
                m_UpgradeType = BombermanUpgrade.BombermanUpgradeType.SpreadSpeed;
                break;
                case 6:
                m_UpgradeType = BombermanUpgrade.BombermanUpgradeType.KickBombPlacer;
                break;
				default:
				m_UpgradeType = BombermanUpgrade.BombermanUpgradeType.None;
				break;
			}
		}
Пример #2
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch ( version )
			{
                case 1:
                    m_Game = reader.ReadItem() as BombermanGame;
                    goto case 0;
				case 0:
				{
					m_Destructable = reader.ReadBool();
					m_UpgradeType = (BombermanUpgrade.BombermanUpgradeType)reader.ReadByte();

					break;
				}
			}
		}