Ejemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        CuboElemental cubo = other.transform.GetComponent <CuboElemental> ();

        if (cubo == null)
        {
            return;
        }
        this._cuboConectado = cubo;
    }
Ejemplo n.º 2
0
 private void OnTriggerExit(Collider other)
 {
     if (this._cuboConectado == null)
     {
         return;
     }
     if (other.gameObject == this._cuboConectado.gameObject)
     {
         this._cuboConectado.desligar();
         this._cuboConectado = null;
     }
 }