Exemplo n.º 1
0
		//master constructor
		public Bomb( BombBag bombbag ) : base( 0x2256, bombbag == null ? "Bomb" : bombbag.Owner.Name + "'s Bomb" )
		{
			Hue = 1;
			
			//link this bomb up to the bomb bag it came from
			BombBag = bombbag;
			Planter = BombBag.Owner;
			
			_Strength = BombBag.BombStrength;
			
			
			
			if( BombBag.BaddaBoom )
			{
				_BaddaBoom = new BaddaBoom( this );
			}
			else
			{
				_Candle = new BombCandle( this );
			}
			
			if( BombBag.Detonator != null )
			{
				_Detonator = new DetonatorReceiver( this );
			}
			else
			{
				StartFuse();
			}
		}
Exemplo n.º 2
0
        //master constructor
        public Bomb(BombBag bombbag) : base(0x2256, bombbag == null ? "Bomb" : bombbag.Owner.Name + "'s Bomb")
        {
            Hue = 1;

            //link this bomb up to the bomb bag it came from
            BombBag = bombbag;
            Planter = BombBag.Owner;

            _Strength = BombBag.BombStrength;


            if (BombBag.BaddaBoom)
            {
                _BaddaBoom = new BaddaBoom(this);
            }
            else
            {
                _Candle = new BombCandle(this);
            }

            if (BombBag.Detonator != null)
            {
                _Detonator = new DetonatorReceiver(this);
            }
            else
            {
                StartFuse();
            }
        }
Exemplo n.º 3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            BombBag = (BombBag)reader.ReadItem();

            _Strength  = reader.ReadInt();
            _Candle    = (BombCandle)reader.ReadItem();
            _Detonator = (DetonatorReceiver)reader.ReadItem();

            _BaddaBoom = (BaddaBoom)reader.ReadItem();


            if (_Detonator == null)
            {
                StartFuse();
            }
        }
Exemplo n.º 4
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
			
			BombBag = (BombBag)reader.ReadItem();
			
			_Strength = reader.ReadInt();
			_Candle = (BombCandle)reader.ReadItem();
			_Detonator = (DetonatorReceiver)reader.ReadItem();

			_BaddaBoom = (BaddaBoom)reader.ReadItem();
			
			
			if( _Detonator == null )
			{
				StartFuse();
			}

		}