private void Start() { throwManager = FindObjectOfType <vThrowObject>(); throwManager.onCollectObject.AddListener(UpdateCount); throwManager.onThrowObject.AddListener(UpdateCount); UpdateCount(); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag.Equals("Player")) { throwManager = other.GetComponent <vThrowObject>(); } }
vThrowObject GetLocalPlayer() { vThrowObject script = null; foreach (vThrowObject player in FindObjectsOfType <vThrowObject>()) { if (player.gameObject.GetComponent <PhotonView>().IsMine) { script = player; break; } } return(script); }