예제 #1
0
파일: GunTools.cs 프로젝트: Ijwu/GunGame
 public static bool CheckIfFreshCharacter(GunPlayer ply)
 {
     foreach(Item item in ply.TSPlayer.TPlayer.armor)
     {
         if (item.type != 0)
             return false;
     }
     if (ply.TSPlayer.TPlayer.statLifeMax != 100)
         return false;
     return true;
 }
예제 #2
0
파일: GunTools.cs 프로젝트: Ijwu/GunGame
 public static void GiveNewItems(GunPlayer ply, int level, LevelList list)
 {
     int x = ply.TSPlayer.TileX;
     int y = ply.TSPlayer.TileY;
     ply.TSPlayer.DamagePlayer(500);
     ply.TSPlayer.Teleport(x, y);
     string[] items = list.Levels[level];
     foreach (string item in items)
     {
         if (item != "null")
         {
             Item give = TShock.Utils.GetItemByName(item)[0];
             ply.GiveItem(give.type, give.name, give.width, give.height, give.maxStack);
         }
     }
     if (list.Knife != "null")
     {
         Item knife = TShock.Utils.GetItemByName(list.Knife)[0];
         ply.GiveItem(knife.type, knife.name, knife.width, knife.height, knife.maxStack);
     }
     ply.TSPlayer.Teleport(x, y);
 }
예제 #3
0
파일: GunTools.cs 프로젝트: Ijwu/GunGame
 public static void SpawnAndGiveItems(GunPlayer ply)
 {
     ply.TSPlayer.Spawn();
     ply.GiveCurrentLevel();
 }
예제 #4
0
파일: GunClasses.cs 프로젝트: Ijwu/GunGame
 public void Winner(GunPlayer ply)
 {
     lock (Players)
     {
         foreach (GunPlayer gm in Players)
         {
             gm.TSPlayer.SendMessage(String.Format("The game is over and {0} has won!",ply.TSPlayer.Name));
         }
     }
     EndGame();
 }