void Start() { poolManager = GetComponent <PoolManager>(); trackController = new RailTrackController(testTiles, poolManager.GetObjectPool(TypeObjectPool.Rail), poolManager.GetObjectPool(TypeObjectPool.Station)); trainController = new TrainController(testTrains, poolManager.GetObjectPool(TypeObjectPool.Lokomotive), poolManager.GetObjectPool(TypeObjectPool.Carriage)); gameLooper = GetComponent <GameLooper>(); gameLooper.Initialize(trainController, trackController); }
public void Initialize(TrainController trainController, RailTrackController railController) { trainContr = trainController; railContr = railController; }