Example #1
0
        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);
        }
Example #2
0
 public void Initialize(TrainController trainController, RailTrackController railController)
 {
     trainContr = trainController;
     railContr  = railController;
 }