Ejemplo n.º 1
0
        public Player SpawnPlayerAt(Vector2 position)
        {
            int nextId = 0;
            if(PlayerList.Count > 0)
                nextId = PlayerList.Max(player => player.Id) + 1;

            var p = new Player(nextId, this, position);
            AddPlayer(p);
            return p;
        }
Ejemplo n.º 2
0
 public void AddPlayer(Player p)
 {
     PlayerList.Add(p);
 }