Esempio n. 1
0
 private void ResetSpringPanel()
 {
     if (currentLookPositionType == LOOK_POSITION_MY_TYPE)
     {
         if (myPoint != null)
         {
             StartCoroutine(Utils.DelayRunNextFrame(() => {
                 SpringPanel.Begin(pointRoot, -myPoint.transform.localPosition, 9);
             }));
         }
     }
     else if (currentLookPositionType == LOOK_POSITION_CUESS_TYPE)
     {
         if (focusPointInfo != null)
         {
             StartCoroutine(Utils.DelayRunNextFrame(() => {
                 SpringPanel.Begin(pointRoot, -focusPointInfo.getFocusPoint(), 9);
                 focusPointInfo = null;
             }));
         }
         else
         {
             ArenaFocusGuess.FocusPointInfo pointInfo = focusGuess.focusCuessPoint();
             if (pointInfo != null)
             {
                 StartCoroutine(Utils.DelayRunNextFrame(() => {
                     SpringPanel.Begin(pointRoot, -pointInfo.getFocusPoint(), 9);
                 }));
             }
         }
     }
     currentLookPositionType = 0;
 }
Esempio n. 2
0
    public override void buttonEventBase(GameObject gameObj)
    {
        base.buttonEventBase(gameObj);
        if (gameObj.name == "close")
        {
            am.tapIndex = 0;
            UiManager.Instance.openMainWindow();
        }
        else if (gameObj.name == "buttonFinalAward")
        {
            UiManager.Instance.openWindow <ArenaAwardWindow> ((win) => {
                win.init(ArenaAwardWindow.TYPE_FINAL);
            });
        }
        else if (gameObj.name == "buttonGuessAward")
        {
            UiManager.Instance.openWindow <ArenaAwardWindow> ((win) => {
                win.init(ArenaAwardWindow.TYPE_GUESS);
            });
        }
        else if (gameObj.name == "buttonIntegralAward")
        {
            UiManager.Instance.openDialogWindow <ArenaIntegralAwardWindow> ((win) => {
                win.initUI();
            });
        }
        else if (gameObj.name == "buttonMeritShop")
        {
            UiManager.Instance.openWindow <MeritShopWindow> ();
        }
        else if (gameObj.name == "MyPosition")
        {
            if (myTeamIndex < 0)
            {
                UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
                    win.initWindow(1, Language("Arena70"), "", Language("Arena71"), null);
                });
                return;
            }
            if (am.tapIndex == myTeamIndex)
            {
                if (myPoint == null)
                {
                    MaskWindow.UnlockUI();
                    return;
                }
                SpringPanel.Begin(pointRoot, -myPoint.transform.localPosition, 9);
            }
            else
            {
                currentLookPositionType = LOOK_POSITION_MY_TYPE;
                tapContent.changeTapPage(tabButtons [myTeamIndex]);
            }
            MaskWindow.UnlockUI();
        }
        else if (gameObj.name == "focusCuess")
        {
            ArenaFocusGuess.FocusPointInfo pointInfo = focusGuess.focusCuessPoint();
            if (pointInfo == null)
            {
                if (guessTapIndex != -1)
                {
                    currentLookPositionType = LOOK_POSITION_CUESS_TYPE;
                    tapContent.changeTapPage(tabButtons [guessTapIndex]);
                }
            }
            else
            {
                if (am.tapIndex == pointInfo.getTapIndex())
                {
                    SpringPanel.Begin(pointRoot, -pointInfo.getFocusPoint(), 9);
                }
                else
                {
                    currentLookPositionType = LOOK_POSITION_CUESS_TYPE;
                    focusPointInfo          = pointInfo;
                    tapContent.changeTapPage(tabButtons [pointInfo.getTapIndex()]);
                }
            }
            MaskWindow.UnlockUI();
        }
        else if (gameObj.name == "buttonHelp")
        {
            UiManager.Instance.openDialogWindow <GeneralDesWindow>((win) => {
                string massTimeStr  = ArenaTimeSampleManager.Instance.getMassTimeString(ArenaManager.instance.state, ArenaManager.instance.stateEndTime);
                string finalTimeStr = ArenaTimeSampleManager.Instance.getFinalTimeString(ArenaManager.instance.state, ArenaManager.instance.stateEndTime);
                string rule         = LanguageConfigManager.Instance.getLanguage("Arena68", massTimeStr, finalTimeStr);
                win.initialize(rule, LanguageConfigManager.Instance.getLanguage("Arena69"), "");
            });
        }
        else if (gameObj.name == "next")
        {
            if (ArenaManager.instance.state == ArenaManager.STATE_RESET)
            {
                MaskWindow.UnlockUI();
                return;
            }

            UiManager.Instance.openDialogWindow <ArenaFinalPreduceTimeWindow>((win) => {
                win.initUI(ArenaManager.instance.getFinalPreduceDes());
            });
        }
    }