示例#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);
        }
示例#2
0
        public Junction(string id, SplitTrack branchDefault, SplitTrack branchAlternate, JunctionDirection direction)
        {
            Id = id;
            NextBranchType = BranchType.BranchDefault;
            Direction = direction;

            BranchDefault = GetFirstGroup(branchDefault);
            BranchAlternate = GetFirstGroup(branchAlternate);
        }
示例#3
0
        public void OnAttachToSplitTrack(SplitTrack splitTrack)
        {

            SplitTrack = splitTrack;
        }
示例#4
0
文件: Level.cs 项目: mANDROID99/IaS
 public Level(string levelName, SplitTrack end, SplitTrack start)
 {
     LevelName = levelName;
     End = end;
     Start = start;
 }
示例#5
0
 private SubTrackGroup GetFirstGroup(SplitTrack subTrack)
 {
     return Direction == JunctionDirection.OneToMany ? subTrack.FirstSubTrack.FirstGroup : subTrack.LastSubTrack.LastGroup;
 }