Exemple #1
0
        void Start()
        {
            var updateManagerObject = new GameObject("UpdateManager");

            _updateManager = updateManagerObject.AddComponent <UpdateManager>();

            var coroutiner = new GameObject("Coroutiner").AddComponent <Coroutiner>();

            _objectCreateManager = new ObjectCreateManager();
            _objectStorage       = new ObjectStorage();

            _dataLoadManager = new DataLoadManager(_objectStorage);

            _poolManager = new PoolManager(_objectStorage, _objectCreateManager);

            _dataLoadManager.ReadConfig();
            _dataLoadManager.LoadPrefabs();
            _dataLoadManager.CreateUpgrades();
            _behaviourManager = new BehaviourManager(_updateManager, _objectStorage);

            _UIManager = new UIManager(_updateManager, _objectStorage, _poolManager, _dataLoadManager, _behaviourManager);
            _UIManager.ShowMainMenu(); //start game here
        }
 public PoolManager(IObjectStorage objectStorage, IObjectCreateManager objectCreateManager)
 {
     _objectStorage       = objectStorage;
     _objectCreateManager = objectCreateManager;
     _objectCreateManager.AddPrefabs(_objectStorage.Prefabs);
 }