protected override void retrieve()
    {
        networkPlayers = networkTrainsStorage.Get();
        networkTrainsStorage.Delete();

        trains = networkPlayers.Select(p => p.Train);
    }
    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);
    }
Esempio n. 4
0
    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);
    }
Esempio n. 5
0
 public RpcCallReceiver(NetworkTrainPlayers players, RpcNetworkEntity network)
 {
     this.players = players;
     this.network = network;
 }
 private void removePlayer(NetworkTrainPlayers players, NetworkPlayer player)
 {
     players.RemovePlayer(players.GetPlayer(player));
 }
 private void removePlayer(NetworkTrainPlayers players, NetworkPlayer player)
 {
     players.RemovePlayer(players.GetPlayer(player));
 }
Esempio n. 8
0
 public RpcCallReceiver(NetworkTrainPlayers players, RpcNetworkEntity network)
 {
     this.players = players;
     this.network = network;
 }
 public void SetPlayers(NetworkTrainPlayers players)
 {
     this.players = players;
 }