Beispiel #1
0
        public void Awake()
        {
            rb = GetComponent <Rigidbody> ();

            camFollow        = Camera.main.GetComponent <FollowTarget>();
            camFollow.target = transform;
        }
Beispiel #2
0
        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());
        }