Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.RailList Class Reference

List of Rail instances. More...

Inheritance diagram for Dragengine.Scenery.RailList:

Public Member Functions

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

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.

◆ forEachRail()

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

Visit rails with block with parameter Rail.

◆ getCount()

int Dragengine.Scenery.RailList.getCount ( )

Number of rails.

◆ getOrAddWithID()

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

Rail with identifier.

Rail is created using createRail() if absent.

◆ getWithID()

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

Rail with identifier or null if absent.

◆ hasWithID()

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

Rail with identifier is present.

◆ new()

RailList Dragengine.Scenery.RailList.new ( )

Create rail list.

◆ remove()

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

Remove rail.


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