Ejemplo n.º 1
0
 public override void onCommand(object sender, string text, string[] args, Player player, bool isBotMod, Bot bot)
 {
     switch (args[0])
     {
         case "zombie":
             if(isBotMod)
             {
                 Zombie zombie = new Zombie(player.blockX * 16, player.blockY * 16);
                 lock (zombieList)
                 {
                     zombieList.Add(zombie);
                 }
                 //bot.room.DrawBlock(Block.CreateBlock(0, bot.playerList[playerId].blockX, bot.playerList[playerId].blockY, 32, 0));
             }
             break;
         case "zombies":
             {
                 for (int i = 0; i < 3; i++)
                 {
                     int x = r.Next(1, bot.room.Width - 1);
                     int y = r.Next(1, bot.room.Height - 1);
                     Zombie zombie = new Zombie(x * 16, y * 16);
                     lock (zombieList)
                     {
                         zombieList.Add(zombie);
                     }
                 }
             }
             break;
         case "removezombies":
             {
                 lock (zombieList)
                 {
                     zombieList.Clear();
                 }
             }
             break;
     }
 }