コード例 #1
0
        override public void ShowGUI(List <ActionParameter> parameters)
        {
            saveCheck = (SaveCheck)EditorGUILayout.EnumPopup("Check to make:", saveCheck);
            if (saveCheck == SaveCheck.NumberOfSaveGames)
            {
                includeAutoSaves = EditorGUILayout.Toggle("Include auto-save?", includeAutoSaves);
            }

            if (saveCheck == SaveCheck.IsSlotEmpty)
            {
                checkParameterID = Action.ChooseParameterGUI("Save ID:", parameters, checkParameterID, ParameterType.Integer);
                if (checkParameterID < 0)
                {
                    intValue = EditorGUILayout.IntField("Save ID:", intValue);
                }
            }
            else if (saveCheck != SaveCheck.IsSavingPossible)
            {
                intCondition     = (IntCondition)EditorGUILayout.EnumPopup("Value is:", intCondition);
                checkParameterID = Action.ChooseParameterGUI("Integer:", parameters, checkParameterID, ParameterType.Integer);
                if (checkParameterID < 0)
                {
                    intValue = EditorGUILayout.IntField("Integer:", intValue);
                }
            }
        }
コード例 #2
0
        public override void ShowGUI(List <ActionParameter> parameters)
        {
            saveCheck = (SaveCheck)EditorGUILayout.EnumPopup("Check to make:", saveCheck);
            if (saveCheck == SaveCheck.NumberOfSaveGames)
            {
                includeAutoSaves = EditorGUILayout.Toggle("Include auto-save?", includeAutoSaves);
            }

            if (saveCheck == SaveCheck.IsSlotEmpty)
            {
                checkByElementIndex = EditorGUILayout.Toggle("Check by menu slot index?", checkByElementIndex);

                string intValueLabel = (checkByElementIndex) ? "SavesList slot index:" : "Save ID:";
                checkParameterID = Action.ChooseParameterGUI(intValueLabel, parameters, checkParameterID, ParameterType.Integer);
                if (checkParameterID < 0)
                {
                    intValue = EditorGUILayout.IntField(intValueLabel, intValue);
                }
            }
            else if (saveCheck == SaveCheck.DoesProfileExist)
            {
                checkByElementIndex = EditorGUILayout.ToggleLeft("Check by menu slot index?", checkByElementIndex);

                string intValueLabel = (checkByElementIndex) ? "ProfilesList slot index:" : "Profile ID:";
                checkParameterID = Action.ChooseParameterGUI(intValueLabel, parameters, checkParameterID, ParameterType.Integer);
                if (checkParameterID < 0)
                {
                    intValue = EditorGUILayout.IntField(intValueLabel, intValue);
                }

                if (checkByElementIndex)
                {
                    EditorGUILayout.Space();
                    menuName    = EditorGUILayout.TextField("Menu with ProfilesList:", menuName);
                    elementName = EditorGUILayout.TextField("ProfilesList element:", elementName);
                }
            }
            else if (saveCheck == SaveCheck.DoesProfileNameExist)
            {
                profileVarID = AdvGame.GlobalVariableGUI("String variable with name:", profileVarID, VariableType.String);
            }
            else if (saveCheck != SaveCheck.IsSavingPossible)
            {
                intCondition     = (IntCondition)EditorGUILayout.EnumPopup("Value is:", intCondition);
                checkParameterID = Action.ChooseParameterGUI("Integer:", parameters, checkParameterID, ParameterType.Integer);
                if (checkParameterID < 0)
                {
                    intValue = EditorGUILayout.IntField("Integer:", intValue);
                }
            }
        }
コード例 #3
0
    // Update is called once per frame
    void Update()
    {
        bool bInit = false;

        if (m_eStepPre != m_eStep)
        {
            m_eStepPre = m_eStep;
            bInit      = true;
        }
        switch (m_eStep)
        {
        case STEP.SCREENSHOT:
            if (bInit)
            {
                StartCoroutine(startScreenshot());
                m_bScreenshot = false;
                EditDirectory.MakeDirectory(CsvSave.FILE_DIRECTORY);
            }
            if (m_bScreenshot)
            {
                m_goDispRoot.SetActive(true);
                m_eType = SaveBanner.TYPE.SAVE;
                if (m_bLoadOnly)
                {
                    m_btnTabSave.gameObject.SetActive(false);
                    m_eType = SaveBanner.TYPE.LOAD;
                }
                m_closeButton = PrefabManager.Instance.MakeObject("prefab/CloseButton", m_goDispRoot).GetComponent <ButtonBase> ();
                m_eStep       = STEP.IDLE;
                if (m_bLoadOnly == false)
                {
                    NendAdInterstitial.Instance.Show();
                }
            }
            break;

        case STEP.IDLE:
            if (m_eType == SaveBanner.TYPE.SAVE)
            {
                m_eStep = STEP.SAVE_PAGE;
            }
            else
            {
                m_eStep = STEP.LOAD_PAGE;
            }
            m_eStep = STEP.SAVE_PAGE;
            break;

        case STEP.SAVE_PAGE:
            if (bInit)
            {
                if (m_saveBannerRoot == null)
                {
                    m_saveBannerRoot = PrefabManager.Instance.MakeScript <SaveBannerRoot> ("prefab/SaveBannerRoot", m_goDispRoot);
                }
                // ここの10は特に可変にはしてません
                m_saveBannerRoot.Initialize(m_eType, 10);

                m_saveBannerRoot.TriggerClearAll();
                m_closeButton.TriggerClear();

                m_btnTabSave.TriggerClear();
                m_btnTabLoad.TriggerClear();
            }
            if (m_saveBannerRoot.ButtonPushed)
            {
                m_iCheckNo = m_saveBannerRoot.Index + 1;                        // あんまよくないけどここで補正
                m_saveBannerRoot.TriggerClearAll();
                m_eStep = STEP.SAVE_CHECK;

                bool bSound = true;
                if (m_eType == SaveBanner.TYPE.LOAD)
                {
                    CsvSave save = new CsvSave();
                    save.Load(m_iCheckNo);
                    if (false == save.m_bExistData)
                    {
                        m_eStep = m_eStepPre;
                        bSound  = false;
                    }
                    else
                    {
                        m_strSaveTime = save.Read("save_time");
                    }
                }
                if (bSound)
                {
                    SoundHolder.Instance.Call(DataManager.Instance.SOUND_NAME_CURSOR);
                }
                else
                {
                    SoundHolder.Instance.Call(DataManager.Instance.SOUND_NAME_CANCEL);
                }
            }
            if (m_btnTabLoad.ButtonPushed)
            {
                m_eType = SaveBanner.TYPE.LOAD;
                m_eStep = STEP.IDLE;
            }
            if (m_btnTabSave.ButtonPushed)
            {
                m_eType = SaveBanner.TYPE.SAVE;
                m_eStep = STEP.IDLE;
            }
            if (m_closeButton.ButtonPushed)
            {
                m_eStep = STEP.END;
            }
            break;

        case STEP.SAVE_CHECK:
            if (bInit)
            {
                m_saveCheck = PrefabManager.Instance.MakeScript <SaveCheck> ("prefab/SaveCheck", gameObject);
                m_saveCheck.Initialize(m_eType, m_iCheckNo, m_strSaveTime, m_bLoadOnly);
            }
            if (m_saveCheck.IsEnd())
            {
                m_bDecide = m_saveCheck.m_bDecide;
                m_eStep   = STEP.IDLE;
                if (m_bDecide)
                {
                    if (m_bLoadOnly)
                    {
                        m_eStep = STEP.END;
                    }
                    SoundHolder.Instance.Call(DataManager.Instance.SOUND_NAME_DECIDE);
                }
                else
                {
                    SoundHolder.Instance.Call(DataManager.Instance.SOUND_NAME_CANCEL);
                }
                Destroy(m_saveCheck.gameObject);
            }
            break;

        case STEP.LOAD_PAGE:
            if (m_closeButton.ButtonPushed)
            {
                m_eStep = STEP.END;
            }
            break;

        case STEP.LOAD_CHECK:
            break;

        case STEP.END:
            if (bInit)
            {
                SpriteManager.Instance.Unload(TEMP_SCREENSHOT_NAME);
                if (m_bLoadOnly == false)
                {
                    NendAdInterstitial.Instance.Show();
                }
                m_bIsEnd = true;
            }
            break;

        case STEP.MAX:
        default:
            break;
        }
    }
コード例 #4
0
ファイル: ActionSaveCheck.cs プロジェクト: mcbodge/eidolon
        public override void ShowGUI(List<ActionParameter> parameters)
        {
            saveCheck = (SaveCheck) EditorGUILayout.EnumPopup ("Check to make:", saveCheck);
            if (saveCheck == SaveCheck.NumberOfSaveGames)
            {
                includeAutoSaves = EditorGUILayout.Toggle ("Include auto-save?", includeAutoSaves);
            }

            if (saveCheck != SaveCheck.IsSavingPossible)
            {
                intCondition = (IntCondition) EditorGUILayout.EnumPopup ("Value is:", intCondition);
                checkParameterID = Action.ChooseParameterGUI ("Integer:", parameters, checkParameterID, ParameterType.Integer);
                if (checkParameterID < 0)
                {
                    intValue = EditorGUILayout.IntField ("Integer:", intValue);
                }
            }
        }