12345678910111213141516171819202122232425262728293031 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Sirenix.OdinInspector;
- using KairoEngine.Core;
- using KairoEngine.Core.ConfigOptions;
- namespace KairoEngine.Core.ModuleSystem
- {
- [CreateAssetMenu(fileName = "GameConfig", menuName = "KairoEngine/GameConfig"), HideMonoScript]
- public class GameConfig : ScriptableObject
- {
- [ListDrawerSettings(DraggableItems = false, HideRemoveButton = true, ShowPaging = false)]
- [OnValueChanged("StartModule")]
- public List<GameModule> modules = new List<GameModule>();
- [InlineProperty, HideLabel] public ConfigOptionsManager configOptions = new ConfigOptionsManager();
-
- private void StartModule()
- {
- foreach (var module in modules)
- {
- if(module.isInitialized == false)
- {
- module.isInitialized = true;
- module.gameConfig = this;
- }
- }
- }
- }
- }
|