コード例 #1
0
    public void ReplaceLoadConfigService(ILoadConfigService newInstance)
    {
        var index     = GameComponentsLookup.LoadConfigService;
        var component = (LoadConfigServiceComponent)CreateComponent(index, typeof(LoadConfigServiceComponent));

        component.instance = newInstance;
        ReplaceComponent(index, component);
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    public void ReplaceLoadConfigService(ILoadConfigService newInstance)
    {
        var entity = loadConfigServiceEntity;

        if (entity == null)
        {
            entity = SetLoadConfigService(newInstance);
        }
        else
        {
            entity.ReplaceLoadConfigService(newInstance);
        }
    }
コード例 #4
0
 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;
 }
コード例 #5
0
 public RegisterLoadConfigServiceSystem(Contexts contexts, ILoadConfigService loadConfigService)
 {
     _context           = contexts.game;
     _loadConfigService = loadConfigService;
 }
コード例 #6
0
        public ConfigModelService(ILoadConfigService loadConfigService)
        {
            this.LoadConfigService = loadConfigService;

            this.ConfigModel = LoadConfig();
        }