예제 #1
0
    private void Awake()
    {
        Application.targetFrameRate = 60;

        var random = new Random(DateTime.UtcNow.Millisecond);

        UnityEngine.Random.InitState(random.Next());
        Rand.game = new Rand(random.Next());

        _contexts = Contexts.sharedInstance;

        _contexts.config.SetGameConfig(_gameConfig);

//        _contexts.gameState.isInitialization = true;

        _updateSystems      = new UpdateSystems(_contexts);
        _fixedUpdateSystems = new FixedUpdateSystems(_contexts);
        _lateUpdateSystems  = new LateUpdateSystems(_contexts);

        _updateSystems.ActivateReactiveSystems();
        _fixedUpdateSystems.ActivateReactiveSystems();
        _lateUpdateSystems.ActivateReactiveSystems();

        _updateSystems.Initialize();
        _fixedUpdateSystems.Initialize();
        _lateUpdateSystems.Initialize();
    }
    void Start()
    {
        _contexts = Contexts.sharedInstance;
        _game     = _contexts.game;
        _game.SetGlobals(globals).AddName("Globals");
        _game.SetCharacters(characters).AddName("Characters");
        _game.SetUIRoot(uiRoot).AddName("UIRoot");

        _updateSystems      = new UpdateSystems(_contexts);
        _fixedUpdateSystems = new FixedUpdateSystems();

        _updateSystems.Initialize();
        _fixedUpdateSystems.Initialize();
    }
    private void Awake()
    {
        _contexts = Contexts.sharedInstance;
        _services = new Services();

        Configure(_contexts);
        CreateServices(_contexts, _services);

        _updateSystems     = new UpdateSystems(_contexts, _services);
        _fixedUpdateSysems = new FixedUpdateSystems(_contexts, _services);

        _updateSystems.Initialize();
        _fixedUpdateSysems.Initialize();
    }