예제 #1
0
 private void DrawSceneContainerAddedInBuildSettingsGUI()
 {
     if (productionSceneContainer == null)
     {
         EditorGUILayout.HelpBox("No 'SceneContainer' has pushed to 'BuildSettings'", MessageType.Warning);
     }
     else
     {
         Color defaultBackgroundColor = GUI.backgroundColor;
         GUI.backgroundColor = Color.yellow;
         EditorGUILayout.LabelField("  SceneContainer : Production", HeighlightedBackgroundWithBoldStyle);
         GUI.backgroundColor = defaultBackgroundColor;
         CoreEditorModule.DrawSettingsEditor(productionSceneContainer, null, ref _isFoldOut[_productionSceneIndex], ref _editorForSceneContainerAsset[_productionSceneIndex]);
     }
 }
예제 #2
0
        private void DrawSceneContainerOtherThanBuildSettingsGUI()
        {
            if (_numberOfSceneContainerAsset > 0)
            {
                if (productionSceneContainer != null && _numberOfSceneContainerAsset == 1)
                {
                    return;
                }

                EditorGUILayout.Space();
                CoreEditorModule.DrawHorizontalLine();

                Color defaultContentColor = GUI.contentColor;
                GUI.contentColor = Color.cyan;
                _isFoldoutOtherSceneContainer = EditorGUILayout.Foldout(
                    _isFoldoutOtherSceneContainer,
                    "  SceneContainer : Others",
                    true
                    );
                GUI.contentColor = defaultContentColor;

                if (_isFoldoutOtherSceneContainer)
                {
                    EditorGUILayout.Space();
                    CoreEditorModule.DrawHorizontalLine();

                    EditorGUI.indentLevel += 1;
                    for (int i = 0; i < _numberOfSceneContainerAsset; i++)
                    {
                        if (_listOfSceneContainerAsset[i] != productionSceneContainer)
                        {
                            CoreEditorModule.DrawSettingsEditor(_listOfSceneContainerAsset[i], null, ref _isFoldOut[i], ref _editorForSceneContainerAsset[i]);
                            if (i < (_numberOfSceneContainerAsset - 1))
                            {
                                EditorGUILayout.Space();
                                CoreEditorModule.DrawHorizontalLine();
                            }
                        }
                        else
                        {
                            _productionSceneIndex = i;
                        }
                    }
                    EditorGUI.indentLevel -= 1;
                }
            }
        }
        public override void OnInspectorGUI()
        {
            CoreEditorModule.ShowScriptReference(serializedObject);

            serializedObject.Update();

            EditorGUILayout.PropertyField(_sp_instanceBehaviour);
            EditorGUILayout.PropertyField(_sp_accountManagerSettings);

            if (_reference.accountManagerSettings != null)
            {
                CoreEditorModule.DrawSettingsEditor(_reference.accountManagerSettings, null, ref _reference.showAccountManagerSettings, ref _editorForAccountManagerSettings);

                if (EditorApplication.isPlaying)
                {
                    CoreEditorModule.DrawHorizontalLine();
                    int numberOfCurrency = _reference.accountManagerSettings.GetNumberOfAvailableCurrency();

                    for (int i = 0; i < numberOfCurrency; i++)
                    {
                        AccountManagerCurrencyEnum currency = (AccountManagerCurrencyEnum)i;

                        EditorGUILayout.BeginHorizontal();
                        {
                            EditorGUILayout.LabelField(_reference.GetNameOfCurrency(currency) + " : " + _reference.GetCurrentBalance(currency));
                            if (GUILayout.Button("+1000", GUILayout.Width(100)))
                            {
                                _reference.AddBalance(1000, currency);
                            }

                            if (GUILayout.Button("-1000", GUILayout.Width(100)))
                            {
                                _reference.DeductBalance(1000, currency);
                            }
                        }
                        EditorGUILayout.EndHorizontal();
                    }
                }
            }


            serializedObject.ApplyModifiedProperties();
        }