コード例 #1
0
 public override bool OnRoomServerSceneLoadedForPlayer(NetworkConnection conn, GameObject roomPlayer, GameObject gamePlayer)
 {
     gamePlayer.GetComponent <GamePlayer>().index      = roomPlayer.GetComponent <NetworkRoomPlayer>().index;
     gamePlayer.GetComponent <GamePlayer>().playerName = roomPlayer.GetComponent <RoomPlayerCustom>().playerName;
     GameSceneLoaded?.Invoke();
     return(true);
 }
コード例 #2
0
 public void GamePlayerInScene()
 {
     Debug.Log(gamePlayers.gamePlayers.Count + " " + roomSlots.Count);
     if (gamePlayers.gamePlayers.Count == roomSlots.Count)
     {
         Debug.Log("gampelay scene all loaded");
         GameSceneLoaded?.Invoke();
     }
 }
コード例 #3
0
 private void Start()
 {
     if (singleton == null)
     {
         singleton = this;
         EnableInitializeGame();
         GameSceneLoaded?.Invoke();
         return;
     }
     Destroy(gameObject);
 }