void Awake() { if (INSTANCE != null) { throw new InvalidOperationException("InteractionMenuController may only be created once!"); } INSTANCE = this; }
public static InteractionMenuController Instance() { if (!interactionMenu) { interactionMenu = FindObjectOfType(typeof(InteractionMenuController)) as InteractionMenuController; if (!interactionMenu) { Debugger.printErrorLog("There is not an active InteractionMenuController GameObject in the scene"); } } return(interactionMenu); }
private void DisplayAll(Transform target, Interaction interaction, List <MenuOption> options) { InteractionMenuController.ShowInteractionMenu(target, options, option => option.action(interaction)); }