protected void Awake()
 {
     // wallrun = GetComponent<WallRunMovement>();
     Controller        = GetComponent <InputReceive>();
     Rigidbody         = GetComponent <Rigidbody>();
     CharacterAnimator = GetComponentInChildren <Animator>();
     MainCollider      = GetComponent <CapsuleCollider>();
     PV = GetComponent <PhotonView>();
 }
示例#2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         GameObject   target = other.gameObject;
         InputReceive IR     = target.GetComponent <InputReceive>();
         if (IR != null && Activated)
         {
             RaceGameManager.instance.ReachEndPoint(PhotonNetwork.LocalPlayer);
             Activated = false;
         }
     }
 }
示例#3
0
        private void OnTriggerEnter(Collider other)
        {
            if (other.tag == "Player")
            {
                GameObject   target = other.gameObject;
                InputReceive IR     = target.GetComponent <InputReceive>();

                if (IR != null)
                {
                    //Vector3 RevivePoint = CalculateDistance(target.transform.position);
                    Vector3 RevivePoint = RaceGameManager.instance.getRevivePosition();
                    int     ItemID      = target.GetComponent <PhotonView>().ViewID;
                    Debug.Log(ItemID);
                    PV.RPC("Revive", RpcTarget.All, new object[] { ItemID, RevivePoint });
                }
            }
        }
示例#4
0
 private void Awake()
 {
     rb         = GetComponent <Rigidbody>();
     player     = GetComponent <PlayerControllerTest>();
     Controller = GetComponent <InputReceive>();
 }