private void OnTriggerEnter(Collider other) { if (other.tag == "Chicken") { currentChick = other.GetComponent <Chicken_Controller>(); if (currentChick.isLifted) { chickLifted = true; } // else // { // chickLifted = false; // } } }
private void OnTriggerEnter(Collider other) { if (!photonView.IsMine) { return; } Chicken_Controller ckOther = other.gameObject.GetComponent <Chicken_Controller>(); if (ckOther != null && isWalking) { if (ckOther.isEating) { PhotonView otherView = other.gameObject.GetComponent <PhotonView>(); otherView.RPC("ReduceScore", RpcTarget.Others, otherView.ViewID); // Debug.Log("Sending an RPC Call"); } } }
void Start() { controller = GetComponent <Chicken_Controller>(); chickenUI = controller.chickenUI; }