예제 #1
0
    public void onPress(GameObject go, Boolean isDown)
    {
        if (isDown)
        {
            return;
        }

        Int32 currentTouchID = UICamera.currentTouchID;

        switch (currentTouchID + 2)
        {
        case 1:
            OnKeyConfirm(go);
            break;

        case 2:
        case 3:
            if (ButtonGroupState.ContainButtonInSecondaryGroup(go))
            {
                OnKeyConfirm(go);
            }
            else
            {
                ButtonGroupState component = go.GetComponent <ButtonGroupState>();
                if (component)
                {
                    if (component.ProcessTouch())
                    {
                        OnKeyConfirm(go);
                    }
                }
                else
                {
                    OnKeyConfirm(go);
                }
            }
            break;
        }
    }