void OnTriggerExit(Collider col) { if (col.gameObject.tag == "Grabbable") { canGrab = false; throwable = null; stuffs = null; if (col.gameObject.tag == "Glyph") { canDestroy = true; glyph = col.transform; } } if (col.gameObject.tag == "Glyph") { canDestroy = true; glyph = col.transform; } if (col.gameObject.tag == "Shard") { canEquip = false; floorShard = null; } if (col.gameObject.tag == "Door") { canOpen = false; door = null; } }
void OnTriggerStay(Collider col) { if (col.gameObject.tag == "Grabbable") { canGrab = true; throwable = col.transform; stuffs = col.gameObject.GetComponent <Rigidbody> (); } if (col.gameObject.tag == "Glyph") { canDestroy = true; glyph = col.transform; } if (col.gameObject.tag == "Shard") { canEquip = true; floorShard = col.GetComponent <FloorShard> (); } if (col.gameObject.tag == "Door") { canOpen = true; door = col.gameObject.GetComponent <Door> (); } }