Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.RailList Class Reference

List of Rail instances. More...

Inheritance diagram for Dragengine.Scenery.RailList:

Public Member Functions

void dispose ()
 Dispose.
void forEachRail (Block ablock)
 Visit rails with block with parameter Rail.
int getCount ()
 Number of rails.
Rail getOrAddWithID (StringID id)
 Rail with identifier.
Rail getWithID (StringID id)
 Rail with identifier or null if absent.
bool hasWithID (StringID id)
 Rail with identifier is present.
RailList new ()
 Create rail list.
void remove (Rail rail)
 Remove rail.

Detailed Description

List of Rail instances.

Rails define path for for elements or other objects requiring a path placed down by a level artist in the game world. 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 getWithID() returns null. To define rails use 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.

Rail class is usually not subclassed. To use subclasses Rail class overwrite createRail().

Member Function Documentation

◆ dispose()

void Dragengine.Scenery.RailList.dispose ( )

Dispose.

References dispose().

Referenced by dispose().

◆ forEachRail()

void Dragengine.Scenery.RailList.forEachRail ( Block ablock)

Visit rails with block with parameter Rail.

References forEachRail(), getOrAddWithID(), and getWithID().

Referenced by forEachRail().

◆ getCount()

int Dragengine.Scenery.RailList.getCount ( )

Number of rails.

Referenced by getWithID().

◆ getOrAddWithID()

Rail Dragengine.Scenery.RailList.getOrAddWithID ( StringID id)

Rail with identifier.

Rail is created using createRail() if absent.

Referenced by forEachRail().

◆ getWithID()

Rail Dragengine.Scenery.RailList.getWithID ( StringID id)

Rail with identifier or null if absent.

References getCount(), and hasWithID().

Referenced by forEachRail(), and remove().

◆ hasWithID()

bool Dragengine.Scenery.RailList.hasWithID ( StringID id)

Rail with identifier is present.

Referenced by getWithID().

◆ new()

RailList Dragengine.Scenery.RailList.new ( )

Create rail list.

References new().

Referenced by new().

◆ remove()

void Dragengine.Scenery.RailList.remove ( Rail rail)

Remove rail.

References getWithID().


The documentation for this class was generated from the following file: