Beispiel #1
0
 /// <summary>
 /// 告知队伍攻击结果
 /// </summary>
 /// <param name="v"></param>
 /// <param name="result"></param>
 private void TellResult(int Team, FirePoint point, GameBoardBlock result)
 {
     if (Info.ShowKindWhileShoot)
     {
         string msg = "AUGB|" + point.Team + '|' + point.X + '|' + point.Y + '|' + GameBoards[point.Team].CheckName(result) + "|" + ((int)result).ToString();
         foreach (string name in Teams[Team])
         {
             Server.SendTo(name, msg);
         }
     }
     else
     {
         string msg = "AUGB|" + point.Team + '|' + point.X + '|' + point.Y + '|';
         if (Enum.IsDefined(result.GetType(), result) && result != GameBoardBlock.ModelBody && result != GameBoardBlock.ModelHead)
         {
             msg += result.ToString();
         }
         else
         {
             if (char.IsUpper((char)result))
             {
                 msg += GameBoardBlock.Head.ToString();
             }
             else
             {
                 msg += GameBoardBlock.Body.ToString();
             }
         }
         msg += "|" + ((int)result).ToString();
         foreach (string name in Teams[Team])
         {
             Server.SendTo(name, msg);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// 告知被攻击者攻击位置
 /// </summary>
 /// <param name="i"></param>
 private void TellAttact(FirePoint i)
 {
     foreach (string name in Teams[i.Team])
     {
         Server.SendTo(name, "SLOG|" + "您的(" + i.X + "," + i.Y + "格受到了攻击");
     }
 }