protected void Awake() { // wallrun = GetComponent<WallRunMovement>(); Controller = GetComponent <InputReceive>(); Rigidbody = GetComponent <Rigidbody>(); CharacterAnimator = GetComponentInChildren <Animator>(); MainCollider = GetComponent <CapsuleCollider>(); PV = GetComponent <PhotonView>(); }
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; } } }
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 }); } } }
private void Awake() { rb = GetComponent <Rigidbody>(); player = GetComponent <PlayerControllerTest>(); Controller = GetComponent <InputReceive>(); }