private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { ClientInstance cl = GameObject.FindGameObjectWithTag("GameManager").GetComponent <ClientInstance>(); NetworkIdentity player = other.GetComponent <NetworkIdentity>(); NetworkIdentity item = GetComponent <NetworkIdentity>(); cl.hasautorry(item, player); SetWin(); } }
private void OnTriggerEnter(Collider other) { characterControls = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterControls>(); if (other.CompareTag("Player")) { iya = true; ohteer = other.gameObject; NetworkIdentity playerr = other.GetComponent <NetworkIdentity>(); NetworkIdentity itemm = GetComponent <NetworkIdentity>(); ClientInstance cl = GameObject.FindGameObjectWithTag("GameManager").GetComponent <ClientInstance>(); cl.hasautorry(itemm, playerr); } }