Пример #1
0
        public override void OnInspectorGUI()
        {
            var zone = target as Zone;
            var back = GUILayout.Button(EditorHelper.BackContent, GUILayout.Width(60.0f));

            using (new UndoScope(serializedObject))
            {
                EditorGUILayout.Space();
                EditorGUILayout.PropertyField(_clampBounds);
                EditorGUILayout.Space();
                EditorGUILayout.PropertyField(_scene);
                EditorGUILayout.Space();
                EditorGUILayout.PropertyField(_backgroundMusic);
                EditorGUILayout.Space();
            }

            using (new UndoScope(target))
            {
                var mapLayer = EditorGUILayout.Popup(_mapLayer, zone.World.MapLayers.IndexOf(zone.MapLayer), _mapLayers);
                if (mapLayer >= 0)
                {
                    zone.MapLayer = zone.World.MapLayers[mapLayer];
                }

                EditorGUILayout.Space();
                _staticState.Draw();
                EditorGUILayout.Space();
                _defaultState.Draw();
            }

            if (back)
            {
                EditorHelper.Edit(zone.World);
            }
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            var creature   = target as Creature;
            var regenerate = false;

            EditorGUILayout.PropertyField(_speciesProperty);
            EditorGUILayout.Space();

            if (creature.Species.Ecosystem.CreatureGenerationInstructions != null)
            {
                regenerate = GUILayout.Button(_regenerate);
                EditorGUILayout.Space();
            }

            using (new UndoScope(creature))
            {
                _traits.Draw();
                EditorGUILayout.Space();
                _moves.DrawList();
                EditorGUILayout.Space();
                _skills.DrawList();
            }

            if (regenerate)
            {
                EditorUpdater.StartCoroutine(creature.GenerateTraits(_context));
            }
        }
Пример #3
0
        private void DrawPlayerStore(VariableStoreControl store)
        {
            GUILayout.Space(5);

            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Space(10);

                using (new GUILayout.VerticalScope())
                    store.Draw();

                GUILayout.Space(10);
            }

            GUILayout.Space(5);
        }
Пример #4
0
        public override void OnInspectorGUI()
        {
            var back = GUILayout.Button(EditorHelper.BackContent, GUILayout.Width(60.0f));

            EditorGUILayout.Space();

            using (new UndoScope(target))
            {
                _traits.Draw();
                EditorGUILayout.Space();
                _skills.Draw();
            }

            if (back)
            {
                EditorHelper.Edit((target as Species).Ecosystem);
            }
        }
Пример #5
0
        private void DrawEditorStore(ScriptableObject asset, VariableStoreControl store)
        {
            GUILayout.Space(5);

            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Space(10);

                using (new GUILayout.VerticalScope())
                {
                    using (new UndoScope(asset))
                        store.Draw();
                }

                GUILayout.Space(10);
            }

            GUILayout.Space(5);
        }