protected override void retrieve() { networkPlayers = networkTrainsStorage.Get(); networkTrainsStorage.Delete(); trains = networkPlayers.Select(p => p.Train); }
private void addPlayer(Train train, NetworkPlayer owner, NetworkTrainPlayers players) { string newTrainName = RemoteTrainName.GetNameFor(train, owner); Train newTrain = clone(train, newTrainName); NetworkTrainPlayer player = NetworkTrainPlayerFactory.Create(newTrain, owner); players.AddPlayer(player); }
public RpcCallReceiver(NetworkTrainPlayers players, RpcNetworkEntity network) { this.players = players; this.network = network; }
private void removePlayer(NetworkTrainPlayers players, NetworkPlayer player) { players.RemovePlayer(players.GetPlayer(player)); }
public void SetPlayers(NetworkTrainPlayers players) { this.players = players; }