示例#1
0
        private void OnTouchMoved(CCTouch arg1, CCEvent arg2)
        {
            if (!StartGameButton.IsPointInBounds(arg1) && StartGameButton.IsPressed)
            {
                StartGameButton.IsPressed = false;
            }
            if (!HelpButton.IsPointInBounds(arg1) && HelpButton.IsPressed)
            {
                HelpButton.IsPressed = false;
            }

            /*if (!OptionsButton.IsPointInBounds(arg1) && OptionsButton.IsPressed)
             *  OptionsButton.IsPressed = false;*/
        }
示例#2
0
        private void OnTouchUp(CCTouch arg1, CCEvent arg2)
        {
            if (StartGameButton.IsPointInBounds(arg1) && StartGameButton.IsPressed)
            {
                StartGameButton.OnTouchUp();
            }
            if (HelpButton.IsPointInBounds(arg1) && HelpButton.IsPressed)
            {
                HelpButton.OnTouchUp();
            }

            /*if (OptionsButton.IsPointInBounds(arg1) && OptionsButton.IsPressed)
             *  OptionsButton.OnTouchUp();*/
        }
示例#3
0
        private bool TouchDown(CCTouch arg1, CCEvent arg2)
        {
            if (StartGameButton.IsPointInBounds(arg1))
            {
                StartGameButton.IsPressed = true;
            }
            if (HelpButton.IsPointInBounds(arg1))
            {
                HelpButton.IsPressed = true;
            }

            /*if (OptionsButton.IsPointInBounds(arg1))
             * {
             *  OptionsButton.IsPressed = true;
             * }*/
            return(true);
        }