示例#1
0
 /// <summary>
 /// On register mediator
 /// </summary>
 public override void OnRegister()
 {
     View.GetStartGameBtn().onClick.AddListener(() => { SceneManager.LoadScene("GameArena"); });
     ServerConnectedSignal.AddListener(() => { View.OnServerConnected(); });
     DisconnectedFromServerSignal.AddListener(() => { View.OnServerDisconnected(); });
     ShowLobbyPlayersSignal.AddListener(() => { View.ShowPlayersList(NetworkPlayerService.OnlinePlayers); });
 }
示例#2
0
 /// <summary>
 /// On register
 /// </summary>
 public override void OnRegister()
 {
     ServerConnectedSignal.AddListener(success =>
     {
         View.ChangeStatus(success ? "Connected" : "Connected Error!");
     });
     DisconnectSignal.AddListener(success =>
     {
         View.ChangeStatus(success ? "Disconnected" : "Disconnected Error!");
     });
     ServerErrorSignal.AddListener(View.OnGameServerError);
 }
 /// <summary>
 /// On register mediator
 /// </summary>
 public override void OnRegister()
 {
     ServerConnectedSignal.AddListener(() => { View.OnServerConnected(); });
     DisconnectedFromServerSignal.AddListener(() => { View.OnServerDisconnected(); });
     ShowLobbyPlayersSignal.AddListener(() => { View.ShowPlayersList(NetworkPlayerService.OnlinePlayers); });
 }