public void Awake() { rb = GetComponent <Rigidbody> (); camFollow = Camera.main.GetComponent <FollowTarget>(); camFollow.target = transform; }
public void Awake() { photonView = GetComponent <PhotonView>(); rigidbody = GetComponent <Rigidbody>(); if (photonView.IsMine) { camFollow = Camera.main.GetComponent <FollowTarget>(); camFollow.target = transform; } Username.text = photonView.Owner.NickName; Username.color = AsteroidsGame.GetColor(photonView.Owner.GetPlayerNumber()); }