Exemplo n.º 1
0
        public void OnStartHitting()
        {
            UIGame uiGame = UIManager.GetUIByType <UIGame>();

            if (OpType == OpType.Pass)
            {
                uiGame.ShowWheel(false);
                uiGame.ShowWheelLater(true, 0.5f);

                NextPlayer();
                return;
            }

            // 检查是否有选定的颜色,如果已经没有相应的颜色,则再次随机
            if (OpType != OpType.Both && !HexManager.HasColor(OpType))
            {
                uiGame.ShowWheel(false);
                uiGame.ShowWheelLater(true, 0.5f);
                UIManager.SendMessage(MsgType.OnShowTips, "颜色无效,再转一回吧");

                return;
            }

            GameStep = GameStep.Hitting;
            uiGame.ShowWheel(false);
        }
Exemplo n.º 2
0
        public void Restart()
        {
            m_curTargetHex    = null;
            m_singleTargetHex = null;
            m_mainHex         = null;
            HexManager.Restart();
            CurPlayer = 1;

            Hammer.transform.position = Vector3.one * 100;
            UIGame gameUI = UIManager.GetUIByType <UIGame>();

            gameUI.ShowWheel(false);
            gameUI.SetCurPlayer(CurPlayer);

            GameStep = GameStep.SelectingMain;
        }