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; }
public void AddPlayer(Player p) { PlayerList.Add(p); }