public void ReplaceLoadConfigService(ILoadConfigService newInstance) { var index = GameComponentsLookup.LoadConfigService; var component = (LoadConfigServiceComponent)CreateComponent(index, typeof(LoadConfigServiceComponent)); component.instance = newInstance; ReplaceComponent(index, component); }
public GameEntity SetLoadConfigService(ILoadConfigService newInstance) { if (hasLoadConfigService) { throw new Entitas.EntitasException("Could not set LoadConfigService!\n" + this + " already has an entity with LoadConfigServiceComponent!", "You should check if the context already has a loadConfigServiceEntity before setting it or use context.ReplaceLoadConfigService()."); } var entity = CreateEntity(); entity.AddLoadConfigService(newInstance); return(entity); }
public void ReplaceLoadConfigService(ILoadConfigService newInstance) { var entity = loadConfigServiceEntity; if (entity == null) { entity = SetLoadConfigService(newInstance); } else { entity.ReplaceLoadConfigService(newInstance); } }
public Services(ILogService log, IViewService view, IMouseInputService mouseInput, ILoadConfigService loadConfig, ISceneService scene, ICoroutineService coroutine, IKeyInputService keyInput, ITimeService time, IPhysicsService physics, INetworkService network, ILocalStorageService localStorage, IFileService file, ISettingService setting) { Log = log; View = view; MouseInput = mouseInput; LoadConfig = loadConfig; Scene = scene; Coroutine = coroutine; KeyInput = keyInput; Time = time; Physics = physics; Network = network; LocalStorage = localStorage; File = file; Setting = setting; }
public RegisterLoadConfigServiceSystem(Contexts contexts, ILoadConfigService loadConfigService) { _context = contexts.game; _loadConfigService = loadConfigService; }
public ConfigModelService(ILoadConfigService loadConfigService) { this.LoadConfigService = loadConfigService; this.ConfigModel = LoadConfig(); }