void OnTriggerEnter(Collider other) { if (!_unitID.isLocalPlayer) { return; } if (Life <= 0) { return; } if (other.tag == "Minion") { if (other.GetComponent <Unit_ID>().GetPlayerIndex() != _unitID.GetPlayerIndex()) { //CmdCultistDeath(name); // cultistDeath(name); Debug.Log("Do my job !"); _unitID.GetComponent <PlayerAuthorityScript>().CmdDestroyCultiste(other.name); } } }
void OnTouched(TouchResult touchResult) { _unit_ID.GetComponent <PlayerAuthorityScript>().CmdSpawnUnit(_typeToSpawn); Debug.Log("Touched"); }