void OnMouseOver() { float distance = Vector3.Distance(transform.position, player.transform.position); if (distance < selectionDistance && playerIsActive) { if (!isAlarmTriggered) { select.Display("Trigger Alarm", Color.white); } else { select.Close(); } } }
void OnMouseDown() { float distance; distance = Vector3.Distance(transform.position, player.position); if (playerIsActive && distance < selectionDistance && enabled) { PickUpItem(); select.Close(); } }
void OnMouseExit() { select.Close(); }