Esempio n. 1
0
 private void Start()
 {
     throwManager = FindObjectOfType <vThrowObject>();
     throwManager.onCollectObject.AddListener(UpdateCount);
     throwManager.onThrowObject.AddListener(UpdateCount);
     UpdateCount();
 }
Esempio n. 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag.Equals("Player"))
     {
         throwManager = other.GetComponent <vThrowObject>();
     }
 }
Esempio n. 3
0
    vThrowObject GetLocalPlayer()
    {
        vThrowObject script = null;

        foreach (vThrowObject player in FindObjectsOfType <vThrowObject>())
        {
            if (player.gameObject.GetComponent <PhotonView>().IsMine)
            {
                script = player;
                break;
            }
        }

        return(script);
    }