Example #1
0
        // 手指滑动;
        void EasyTouch_On_Swipe(Gesture gesture)
        {
            List <FruitItemOne> mFruitsList = MainModel.Instance.mFruitsOneList;

            for (int i = 0; i < mFruitsList.Count; ++i)
            {
                if (gesture.IsInRect(NGUIObjectToRect(mFruitsList[i].gameObject)))
                {
                    // 用于水果的切;
                    mFruitsList[i].onClick(null);
                }
            }

            // 检测道场;
            if (gesture.IsInRect(NGUIObjectToRect(mGo_DC)))
            {
                OnDC(null);
            }

            // 检测游戏;
            if (gesture.IsInRect(NGUIObjectToRect(mGo_Game)))
            {
                OnGame(null);
            }

            // 检测退出;
            if (gesture.IsInRect(NGUIObjectToRect(mGo_Quit)))
            {
                FruitItem fuit = mGo_Quit.GetComponentInParent <FruitItem>();
                fuit.doAction(false);
                OnQuit(null);
            }
        }
Example #2
0
        public void onClick(object obj)
        {
            gameObject.SetActive(false);
            // 像父节点发送被按下的消息;
            FruitItem item = gameObject.GetComponentInParent <FruitItem>();

            item.doAction(true);
        }
Example #3
0
        void OnGame(object obj)
        {
            FruitItem fuit = mGo_Game.GetComponentInParent <FruitItem>();

            fuit.doAction(false);

            // 设置退出向下移动;
            Framework.SetUpDown2(mGo_Quit_parent, 800f, false, Vector3.zero);
            // 设置DC向下移动;
            Framework.SetUpDown2(mGo_DC_parent, 800f, false, Vector3.zero);

            // 点击game的回调;
            setLeaveUIMove();

            enterGame();
        }
Example #4
0
        void OnDC(object obj)
        {
            // 点击道场的回调;

            // 划水果;

            FruitItem fuit = mGo_DC.GetComponentInParent <FruitItem>();

            fuit.doAction(false);

            // 设置退出向下移动;
            Framework.SetUpDown2(mGo_Quit_parent, 800f, false, Vector3.zero);
            // 设置Game向下移动;
            Framework.SetUpDown2(mGo_Game_parent, 800f, false, GameData.Vecs_mGo_GameParent);

            // 离开当前页面;
            setLeaveUIMove();

            // 进入UI界面;
            StartCoroutine(StartInterUI());
        }