コード例 #1
0
		private void Hatch()
		{
			if ( Deleted )
				return;

			BaseCreature hatch;

			if ( m_Type == 1 )
			{
				if ( Utility.RandomBool() )
					hatch = new RedSolenWarrior();
				else
					hatch = new RedSolenWorker();
			}
			else
			{
				if ( Utility.RandomBool() )
					hatch = new BlackSolenWarrior();
				else
					hatch = new BlackSolenWorker();
			}

			hatch.MoveToWorld( this.Location, this.Map );
			Delete();
		}
コード例 #2
0
            protected override void OnTick()
            {
                if (m_Item.Deleted)
                {
                    return;
                }

                Mobile spawn;

                switch (Utility.Random(2))
                {
                case 0:
                    spawn = new BlackSolenWarrior();
                    spawn.MoveToWorld(m_Item.Location, m_Item.Map);
                    m_Item.Delete();
                    break;

                case 1:
                    spawn = new BlackSolenWorker();
                    spawn.MoveToWorld(m_Item.Location, m_Item.Map);
                    m_Item.Delete();
                    break;
                }
            }
コード例 #3
0
            protected override void OnTick()
            {
                if ( m_EggSack.Deleted )
                    return;

                Mobile spawn;

                int number = Utility.Random( 2 );
                if( m_EggSack.m_EggType == AntEggType.BlackEgg )
                    number+=2;

                switch( number )
                {
                    default:
                    case 0: spawn = new RedSolenWarrior(); break;
                    case 1: spawn = new RedSolenWorker(); break;
                    case 2: spawn = new BlackSolenWarrior(); break;
                    case 3: spawn = new BlackSolenWorker(); break;
                }

                spawn.Map = m_EggSack.Map;
                spawn.Location = m_EggSack.Location;

                m_EggSack.Delete();
            }