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

Default implementation of GWBehaviorFactory. More...

Inheritance diagram for Dragengine.Scenery.DefaultGWBehaviorFactory:
Dragengine.Scenery.GWBehaviorFactory

Public Member Functions

void assertIdEmpty (String id)
 Assert id is empty string.
String factoryId ()
 Unique identifier of factory.
BehaviorFactoryHelper getHelper ()
 Helper to use.
DefaultGWBehaviorFactory new (String id)
void setHelper (BehaviorFactoryHelper helper)
 Set helper to use.
Public Member Functions inherited from Dragengine.Scenery.GWBehaviorFactory
GWBehavior addBehavior (GameWorld gameWorld, String id)
 Add behavior to game world.

Public Attributes

String pFactoryId
BehaviorFactoryHelper pHelper

Detailed Description

Default implementation of GWBehaviorFactory.

Version
1.35

This class provides a couple of helper methods to use BehaviorFactoryHelper in a portable way. For this the helper assigned to BehaviorElementClass.sharedFactoryHelper is stored during construction time. This allows scripts to assign different factory helpers for loading different parts of the application their own way.

Subclass must implement GWBehaviorFactory.addBehavior().

Member Function Documentation

◆ assertIdEmpty()

void Dragengine.Scenery.DefaultGWBehaviorFactory.assertIdEmpty ( String id)

Assert id is empty string.

Exceptions
EInvalidParamif id is not empty string.

References assertIdEmpty(), new(), pHelper, and setHelper().

Referenced by assertIdEmpty().

◆ factoryId()

String Dragengine.Scenery.DefaultGWBehaviorFactory.factoryId ( )

Unique identifier of factory.

Should be the class name of the behavior. Factory identifiers are case sensitive.

Implements Dragengine.Scenery.GWBehaviorFactory.

Referenced by getHelper().

◆ getHelper()

BehaviorFactoryHelper Dragengine.Scenery.DefaultGWBehaviorFactory.getHelper ( )

Helper to use.

References factoryId(), and pFactoryId.

Referenced by setHelper().

◆ new()

DefaultGWBehaviorFactory Dragengine.Scenery.DefaultGWBehaviorFactory.new ( String id)

References new(), pFactoryId, and pHelper.

Referenced by assertIdEmpty(), and new().

◆ setHelper()

void Dragengine.Scenery.DefaultGWBehaviorFactory.setHelper ( BehaviorFactoryHelper helper)

Set helper to use.

References getHelper(), and pHelper.

Referenced by assertIdEmpty().

Member Data Documentation

◆ pFactoryId

String Dragengine.Scenery.DefaultGWBehaviorFactory.pFactoryId

Referenced by getHelper(), and new().

◆ pHelper

BehaviorFactoryHelper Dragengine.Scenery.DefaultGWBehaviorFactory.pHelper

Referenced by assertIdEmpty(), new(), and setHelper().


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