Beispiel #1
0
        protected void Initialize(ISetting setting)
        {
            ArkLog.Init(setting);

            _dataLoadManager = gameObject.AddComponent <DataLoadManager>();
            _dataLoadManager.Init(setting.BundleUrl);
            _dataLoadManager.LoadAllAsset();

            _gameLoop = new GameLoop(setting, _gameView, _dataLoadManager);
            _gameLoop.InitGear();
        }
Beispiel #2
0
        public GameLoop(ISetting setting, GameView gameView, DataLoadManager dataLoadManager) : base(true)
        {
            _frameManager = new FrameManager(setting.Fps);
            _gameLogic    = new GameLogic(setting);
            _gameView     = gameView;
            _gameView.InitDI(false);
            _logicStateChanger = new LogicStateChanger();
            _commandRecorder   = new CommandRecorder();
            _commandReplayer   = new CommandReplayer();
            _dataLoadManager   = dataLoadManager;

            _gear.AddChildGear(_frameManager.GetGear());
            _gear.AddChildGear(_gameLogic.GetGear());
            _gear.AddChildGear(_gameView.GetGear());
            _gear.AddChildGear(_logicStateChanger.GetGear());
            _gear.AddChildGear(_commandRecorder.GetGear());
            _gear.AddChildGear(_commandReplayer.GetGear());
        }