private void CheckObject() { switch (objectTag) { case "Collectable": Collectable collectable = hit.transform.GetComponent <Collectable>(); interactingPopUpController.SetTextAndMessage(keyCode.ToString(), "Collect"); collectable.CheckCollect(hit, keyCode); break; case "ItemStock": break; case "Door": break; default: interactingPopUpController.ClosePopUp(); break; } }