Train
Parent |
This class holds information and references about a trains (a collection of multiple railroad vehicles) and its timetable f.e.
Properties
dockState : Int
The current docking state of the train.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Dock State |
hasTimeTable : Bool
True if the train has currently a time table.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Has Time Table |
isDocked : Bool
True if the train is currently docked.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Is Docked |
isPlayerDriven : Bool
True if the train is currently player driven.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Is Player Driven |
Functions
dock ()
Trys to dock the train to the station it is currently at.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Dock |
getFirst () → first : Trace<RailroadVehicle>
Returns the first railroad vehicle that is part of this train.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get First |
| Name | Type | Description |
|---|---|---|
First |
Trace<RailroadVehicle> |
The first railroad vehicle that is part of this train. |
getLast () → last : Trace<RailroadVehicle>
Returns the last railroad vehicle that is part of this train.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Last |
| Name | Type | Description |
|---|---|---|
Last |
Trace<RailroadVehicle> |
The last railroad vehicle that is part of this train. |
getMaster () → master : Trace<RailroadVehicle>
Returns the master locomotive that is part of this train.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Master |
| Name | Type | Description |
|---|---|---|
Master |
Trace<RailroadVehicle> |
The master locomotive of this train. |
getName () → name : String
Returns the name of this train.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Name |
| Name | Type | Description |
|---|---|---|
Name |
String |
The name of this train. |
getTimeTable () → timeTable : Trace<TimeTable>
Returns the timetable of this train.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Time Table |
| Name | Type | Description |
|---|---|---|
Time Table |
Trace<TimeTable> |
The timetable of this train. |
getTrackGraph () → track : Struct<TrackGraph>
Returns the track graph of which this train is part of.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Track Graph |
| Name | Type | Description |
|---|---|---|
Track |
Struct<TrackGraph> |
The track graph of which this train is part of. |
getVehicles () → vehicles : Array<Trace<RailroadVehicle>>
Returns a list of all the vehicles this train has.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Vehicles |
| Name | Type | Description |
|---|---|---|
Vehicles |
Array<Trace<RailroadVehicle>> |
A list of all the vehicles this train has. |
newTimeTable () → timeTable : Trace<TimeTable>
Creates and returns a new timetable for this train.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
New Time Table |
| Name | Type | Description |
|---|---|---|
Time Table |
Trace<TimeTable> |
The new timetable for this train. |