Пример #1
0
    private void Awake()
    {
        _configLoader = new ConfigLoader();
        _dataStorage  = new DataStorage.DataStorage(_configLoader);
        _dataStorage.Load(configPath);

        _cameraController.Init(_dataStorage.Data.cameraSettings);

        _game = new Game.GameModel(_dataStorage.Data);
        _game.Init(_dataStorage.Data.settings.playersCount);

        _gamePresenter = new GamePresenter(_game, _gameView);

        _presenters = new PlayerPresenter[_players.Length];
        for (var i = 0; i < _players.Length; i++)
        {
            _presenters[i] = new PlayerPresenter(_game, _game.GetPlayer(i), _players[i]);
        }
    }