private void InteractWithObject(GameObject go) { IInteract interactable = go.GetComponent <IInteract>(); if (interactable != null) { interactable.AbleToInteract(); if (Input.GetKeyDown(KeyCode.F)) { interactable.Interact(); } } }