Esempio n. 1
0
        public TrainController(LevelTree level, SplitTrack startTrack, GameObject trainPrefab, TrackConnectionResolver connectionResolver)
        {
            SubTrackGroup stGroup = startTrack.FirstSubTrack.FirstGroup;
            _trackRunner = new TrackRunner(connectionResolver, stGroup, false);

            GameObject go = Object.Instantiate(trainPrefab);
            _trackFollowingGO = new TrackFollowingGameObject(go, _trackRunner, Vector3.forward);
        }
Esempio n. 2
0
 public JunctionController(GroupBranch groupBranch, GameObject arrowPrefab, GameObject pointerPrefab, TrackConnectionResolver connectionResolver, Junction junction)
 {
     _junction = junction;
     _connectionResolver = connectionResolver;
     _arrowPrefab = arrowPrefab;
     _pointerPrefab = pointerPrefab;
     _groupBranch = groupBranch;
     _pointerInstance = InstantiatePointer();
 }
Esempio n. 3
0
 public TrackRunner(TrackConnectionResolver connectionResolver, SubTrackGroup initialTrackGroup, bool initialReverse)
 {
     ConnectionResolver = connectionResolver;
     Setup(initialTrackGroup, initialReverse);
 }
Esempio n. 4
0
 public LevelData(Level level, EventRegistry eventRegistry, TrackConnectionResolver connectionResolver, Prefabs prefabs)
 {
     Prefabs = prefabs;
     EventRegistry = eventRegistry;
     ConnectionResolver = connectionResolver;
     Level = level;
 }