Example #1
0
        public override void SpawnMob()
        {
            int num = Globals.rand.Next(0, 100 + 1);

            Mob tempMob = null;
            int total   = 0;

            for (int i = 0; i < mobChoices.Count; i++)
            {
                total += mobChoices[i].rate;


                if (num < total)
                {
                    Type sType = Type.GetType("ShooterGame200." + mobChoices[i].mobStr, true);

                    tempMob = (Mob)(Activator.CreateInstance(sType, new Vector2(pos.X, pos.Y), new Vector2(1, 1), ownerId));

                    break;
                }
            }
            if (tempMob != null)
            {
                GameGlobals.PassMob(tempMob);
            }
        }
Example #2
0
 public virtual void SpawnMob()
 {
     GameGlobals.PassMob(new Imp(new Vector2(pos.X, pos.Y), new Vector2(1, 1), ownerId));
 }