Drag[en]gine Script Module DragonScript
1.23
|
Rail defining path for elements. More...
Public Member Functions | |
void | addCorner (RailCorner corner) |
Add corner. More... | |
void | dispose () |
Dispose of rail. More... | |
RailCorner | getCornerAt (int index) |
Corner at index. More... | |
int | getCornerCount () |
Number of corners. More... | |
RailCorner | getCornerWithOrder (int order) |
Corner with corner or null if absent. More... | |
RailCorner | getFirstCorner () |
Get corner at beginning of rail or null if rail is empty. More... | |
StringID | getID () |
Identifier. More... | |
RailCorner | getLastCorner () |
Get corner at end of rail or null if rail is empty. More... | |
bool | hasCorners () |
Rail has corners. More... | |
Rail | new (StringID id) |
Create rail. More... | |
Rail defining path for elements.
Contains corner points defining the path for elements or other objects requiring a path placed down by a level artist in the game world. Each corner has a position, orientation and an order number. The order number is used to sort the corners along the rail path. The rail is non-forking running from the corner with the lowest order to the corner with the highest order. Adding corners inserts them sorted by their order.
Rails have a unique identifier. This identifier is used by elements to locate the path in RailList of the GameWorld they are located in. If not found RailList.getWithID() returns null. To define rails use RailList.getOrAddWithID(). This method creates the rail if not found and thus always returns a Rail instance. This is required because the loading order of elements in a GameWorld is not well defined.
While the Rail class is usually not subclasses the RailCorner is created by rail corner element classes and can be subclassed to add additional properties to corners.
void Dragengine.Scenery.Rail.addCorner | ( | RailCorner | corner | ) |
Add corner.
EInvalidParam | Corner with same order is present. |
void Dragengine.Scenery.Rail.dispose | ( | ) |
Dispose of rail.
RailCorner Dragengine.Scenery.Rail.getCornerAt | ( | int | index | ) |
Corner at index.
int Dragengine.Scenery.Rail.getCornerCount | ( | ) |
Number of corners.
RailCorner Dragengine.Scenery.Rail.getCornerWithOrder | ( | int | order | ) |
Corner with corner or null if absent.
RailCorner Dragengine.Scenery.Rail.getFirstCorner | ( | ) |
Get corner at beginning of rail or null if rail is empty.
StringID Dragengine.Scenery.Rail.getID | ( | ) |
Identifier.
RailCorner Dragengine.Scenery.Rail.getLastCorner | ( | ) |
Get corner at end of rail or null if rail is empty.
bool Dragengine.Scenery.Rail.hasCorners | ( | ) |
Rail has corners.