Пример #1
0
 private void OnPlayerEnter(NetworkPlayer[] players)
 {
     foreach (var p in players)
     {
         bool hasConnected = dicPlayer.ContainsKey(p.playerIndex);
         if (!hasConnected && p.playerIndex != JooConfiguration.GetConfig <NetworkPlayer>().playerIndex)
         {
             VRRemotePlayer tLocalPlayer = Instantiate <VRRemotePlayer>(pfRemotePlayer, Vector3.zero, Quaternion.identity);
             tLocalPlayer.InitializePlayer(p.playerIndex, spawnPoints[p.playerIndex].position);
             dicPlayer.Add(p.playerIndex, tLocalPlayer);
         }
     }
 }