Exemplo n.º 1
0
    //Member Function: OnEnable//////////////////////////////////////////////////
    public void OnEnable()
    {
        //The menu is now open.
        open = true;

        //Initialize buttons.
        colorButton = new TouchableButton();
        playButton  = new TouchableButton();
        greyButton  = new TouchableButton();
    }
Exemplo n.º 2
0
    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
            });
        }
    }