Пример #1
0
 public PlayerDiedEventArgs(Player player, Player killer, MeansOfDeath meansOfDeath, HitLocation hitLocation)
     : base(player)
 {
     Location = hitLocation;
     MeansOfDeath = meansOfDeath;
     Killer = killer;
 }
Пример #2
0
        public PlayerMessageEventArgs(Player player, string message, bool dead, bool team, IEnumerable<Player> players)
        {
            Dead = dead;
            Player = player;
            Message = message;
            TeamMessage = team;

            CodedMessage = ParsePlayerMessage(message, players);
        }
Пример #3
0
 void AddPlayer(int id, string name, CommandEventArgs<PlayerInfo> e)
 {
     if (!PlayersById.ContainsKey(id))
     {
         var player = new Player(name, id);
         PlayersById.Add(id, player);
     }
     else if (PlayersById[id].Name != name)
     {
         string oldName = PlayersById[id].Name;
         PlayersById[id].Name = name;
         if (OnPlayerChangeName != null)
             OnPlayerChangeName(this, new PlayerChangeNameEventArgs(oldName, PlayersById[id], e));
     }
 }