private Vector3 GetNextPosition() { if (Diversions.Any()) { } else { switch (route_type) { case RouteType.Loop: NextIndex = Completed ? 0 : CurrentIndex + 1; break; case RouteType.Retrace: NextIndex = Completed ? ((CurrentIndex - 1) + (local_stops.Length)) % local_stops.Length : (CurrentIndex + 1) % local_stops.Length; break; case RouteType.Stop: NextIndex = Completed ? FinishIndex : CurrentIndex + 1; break; } } CurrentIndex = NextIndex; CheckIfCompleted(); return(WorldStops[NextIndex]); }
///////////////////////////////////////////////////////////////////////////// public MasterOutput( GrandCentral gc ) { // ****** blocks = gc.GetTextBlocks(); chars = gc.GetEscapedChars(); // ****** diversions = new Diversions(); diversionsStack = new DiversionStack(); // ****** current = diversions.GetDiversion( Diversion.DEFAULT_DIV_NAME ); sbOutput = current.Value; }
// public public void DivertTo(Vector3 point) { Diversions.Add(point); }