public void addPlayer(bool local, Vector2 center, CarType carType, CarFrontType carFrontType, AbilityType abilityType, int objectID, OnlinePlayer onlinePlayer) { Player player = new Player(onlinePlayer.clientID == ID_Manager.Instance.ClientNumber, this, center, carType, carFrontType, abilityType, objectID, onlinePlayer); players.Add(player); addEntity(player, local); if (onlinePlayer.clientID == ID_Manager.Instance.ClientNumber) { localPlayers.Add(player); } }
public void RemoteAddPlayer(int clientID, Vector2 center, int objectID, CarType carType, CarFrontType carFront, AbilityType abilityType, OnlinePlayer onlinePlayer) { addPlayer(false, center, carType, carFront, abilityType, objectID, onlinePlayer); }