예제 #1
0
    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);
            }
        }
    }
예제 #2
0
 void OnTouched(TouchResult touchResult)
 {
     _unit_ID.GetComponent <PlayerAuthorityScript>().CmdSpawnUnit(_typeToSpawn);
     Debug.Log("Touched");
 }