//Member Function: OnEnable////////////////////////////////////////////////// public void OnEnable() { //The menu is now open. open = true; //Initialize buttons. colorButton = new TouchableButton(); playButton = new TouchableButton(); greyButton = new TouchableButton(); }
protected override void RegistKey() { PressableButton pressableButton = this.GetComponent <PressableButton>(); TouchableButton touchableButton = this.GetComponent <TouchableButton>(); if (pressableButton && touchableButton) { InteractionEvent interActionEvent = new InteractionEvent(); interActionEvent.AddListener(OnSpecialKeyClick); pressableButton.Triggers.Add(new InteractionPressableEntry() { eventID = InteractionPressableType.PointerClick, callback = interActionEvent }); touchableButton.Triggers.Add(new InteractionTouchableEntry() { eventID = InteractionTouchableType.PokePress, callback = interActionEvent }); } }