Exemple #1
0
 public override void OnJoinedRoom()
 {
     Destroy(playerGameObject);
     playerGameObject = PhotonNetwork.Instantiate(Path.Combine("Player"), spawnPoint.transform.position, spawnPoint.transform.rotation, 0);
     player           = playerGameObject.GetComponentInChildren <KartController>();
     player.enabled   = true;
     player.SetPlayerMaterial();
     gameCam.Follow = player.transform;
     gameCam.LookAt = player.transform;
     Debug.Log("Player instantiated");
 }
Exemple #2
0
 private void Start()
 {
     menuCam.gameObject.SetActive(true);
     gameCam.gameObject.SetActive(false);
     player.enabled = false;
     player.SetPlayerMaterial();
     particles1.Play();
     particles2.Play();
     PhotonNetwork.AddCallbackTarget(this);
     Debug.Log(spawnPoint);
     Connect();
 }