コード例 #1
0
 public override void onCommand(object sender, string text, string[] args, int playerId, Player player, string name, bool isBotMod)
 {
     switch (args[0])
     {
         case "zombie":
             {
                 Zombie zombie = new Zombie(OstBot.playerList[playerId].blockX * 16, OstBot.playerList[playerId].blockY * 16);
                 lock (zombieList)
                 {
                     zombieList.Add(zombie);
                 }
                 OstBot.room.DrawBlock(Block.CreateBlock(0, OstBot.playerList[playerId].blockX, OstBot.playerList[playerId].blockY, 32, 0));
             }
             break;
         case "zombies":
             {
                 for (int i = 0; i < 50; i++)
                 {
                     int x = r.Next(1, OstBot.room.width - 1);
                     int y = r.Next(1, OstBot.room.height - 1);
                     Zombie zombie = new Zombie(x * 16, y * 16);
                     lock (zombieList)
                     {
                         zombieList.Add(zombie);
                     }
                 }
             }
             break;
         case "removezombies":
             {
                 lock (zombieList)
                 {
                     zombieList.Clear();
                 }
             }
             break;
     }
 }