Beispiel #1
0
 private void OnQuitCancel(lib.Event e)
 {
     quitOpen = false;
     GameObjectUtils.EnableComponentAllChildren <Shadow>(quit);
     sure.DOScaleX(0, 0.2f);
     cancel.DOScaleX(0, 0.2f);
     quitSelection.SetActive(false);
     Game.Instance.rootStage.transform.DOScale(1, 0.5f).SetEase(Ease.OutCirc);
 }
Beispiel #2
0
    public void LoadingChangeOut()
    {
        quitOpen = false;
        GameObjectUtils.EnableComponentAllChildren <Shadow>(quit);
        sure.DOScaleX(0, 0.2f);
        cancel.DOScaleX(0, 0.2f);
        quitSelection.SetActive(false);
        Game.Instance.rootStage.transform.localScale = new Vector3(1, 1);

        hex.SetActive(false);
        MainData.Instance.dispatcher.DispatchWith(hexjig.EventType.SHOW_CUT);
    }
Beispiel #3
0
 private void OnMusicEditorChange(lib.Event e = null)
 {
     if ((bool)GameVO.Instance.musicEditor.value == true)
     {
         GameVO.Instance.soundEditor.value = false;
         musicVolumn.SetActive(true);
         musicBg.gameObject.GetComponent <RectTransform>().DORotate(new Vector3(0, 0, 30), 0.2f);
         GameObjectUtils.DisableComponentAllChildren <Shadow>(musicIcon.gameObject.GetComponent <RectTransform>().parent.gameObject);
     }
     else
     {
         musicVolumn.SetActive(false);
         musicBg.gameObject.GetComponent <RectTransform>().DORotate(new Vector3(0, 0, 0), 0.2f);
         GameObjectUtils.EnableComponentAllChildren <Shadow>(musicIcon.gameObject.GetComponent <RectTransform>().parent.gameObject);
     }
 }
Beispiel #4
0
 private void Select(Image obj, bool flag)
 {
     if (flag)
     {
         GameObjectUtils.DisableComponentAllChildren <Shadow>(obj.gameObject.GetComponent <RectTransform>().parent.gameObject);
         obj.gameObject.GetComponent <RectTransform>().DORotate(new Vector3(0, 0, 30), 0.2f);
         obj.DOColor(new Color((float)(246.0 / 255.0), (float)(120.0 / 255.0), (float)(119.0 / 255.0)), 0.2f);
     }
     else
     {
         GameObjectUtils.EnableComponentAllChildren <Shadow>(obj.gameObject.GetComponent <RectTransform>().parent.gameObject);
         if (obj.gameObject.GetComponent <RectTransform>().localEulerAngles.z != 0)
         {
             obj.gameObject.GetComponent <RectTransform>().DORotate(new Vector3(0, 0, 0), 0.2f);
         }
         obj.DOColor(new Color((float)(254.0 / 255.0), (float)(250.0 / 255.0), (float)(203.0 / 255.0)), 0.2f);
     }
 }
Beispiel #5
0
    private void OnQuitSure(lib.Event e)
    {
        quitOpen = false;
        GameObjectUtils.EnableComponentAllChildren <Shadow>(quit);
        sure.DOScaleX(0, 0.2f);
        cancel.DOScaleX(0, 0.2f);
        quitSelection.SetActive(false);
        Game.Instance.rootStage.transform.localScale = new Vector3(1, 1);

        if (GameVO.Instance.model == GameModel.Freedom)
        {
            if (GameVO.Instance.modelCount.value < 10)
            {
                GameVO.Instance.bgmId.value = bgmId;
                MainData.Instance.dispatcher.DispatchWith(hexjig.EventType.QUIT_LEVEL);
                GameVO.Instance.ShowModule(ModuleName.Freedom);
            }
            else
            {
                ResourceManager.PlaySound("sound/camera", false, GameVO.Instance.soundVolumn.value / 100.0f);
                hex.SetActive(false);
                MainData.Instance.dispatcher.DispatchWith(hexjig.EventType.SHOW_CUT);
            }
        }
        else if (GameVO.Instance.model == GameModel.Daily)
        {
            GameVO.Instance.totalTimeString.value = GameVO.Instance.daily.allTimeString.value;
            if (GameVO.Instance.daily.firstPassAll)
            {
                GameVO.Instance.daily.firstPassAll = false;
                ResourceManager.PlaySound("sound/camera", false, GameVO.Instance.soundVolumn.value / 100.0f);
                hex.SetActive(false);
                MainData.Instance.dispatcher.DispatchWith(hexjig.EventType.SHOW_CUT);
            }
            else
            {
                GameVO.Instance.bgmId.value = bgmId;
                MainData.Instance.dispatcher.DispatchWith(hexjig.EventType.QUIT_LEVEL);
                GameVO.Instance.ShowModule(ModuleName.Daily);
            }
        }
    }