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

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void addAnalogTurnHorizontal (float value)
 Set analog turn left right.
float calculateTurnHorizontal ()
 Calculate turn left right value and reset analog input.
void dispose ()
 Dispose of instance.
float getAnalogTurnHorizontal ()
 Analog turn left right.
float getAnalogTurnHorizontalSticky ()
 Sticky analog turn left right.
bool getCanTurn ()
 player can turn.
ECBehaviorPlayerInputTurn getECBehavior ()
 Behavior.
ECBehaviorLocomotion.Instance getLocomotion ()
 Locomotion behavior or null if absent.
float getSpeedTurnHorizontal ()
 Turn left right speed in degrees per second.
bool getTurnLeft ()
 Turn left key is pressed.
bool getTurnRight ()
 Turn right key is pressed.
void init (StubElement stub)
 Initialize element from stub.
Instance new (ECBehaviorPlayerInputTurn ecbehavior, BehaviorElement element)
 Create instance.
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read element from file.
void reset ()
 Reset input.
void setAnalogTurnHorizontal (float value)
 Set analog turn left right.
void setAnalogTurnHorizontalSticky (float value)
 Set sticky analog turn left right.
void setCanTurn (bool canTurn)
 Set if player can turn.
void setSpeedTurnHorizontal (float speed)
 Set turn left right speed in degrees per second.
void setTurnLeft (bool pressed)
 Set if turn left key is pressed.
void setTurnRight (bool pressed)
 Set if turn right key is pressed.
void toggleCanTurn ()
 Toggle can turn.
void toggleTurnLeft ()
 Toggle turn left key pressed.
void toggleTurnRight ()
 Toggle turn right key pressed.
void updateLocomotion (float elapsed)
 Update locomotion.
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write element to file.
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void addToGameWorld ()
 Add element to game world.
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor.
void enterFrame ()
 Frame update started.
void geometryChanged ()
 Position or orientation changed.
BehaviorElement getElement ()
 Behavior element to apply behavior to.
int getInstanceIndex ()
 Behavior instance index.
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance.
void postThink (float elapsed)
 Post thinking after physics processing is finished.
void removeFromGameWorld ()
 Remove element from game world.
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called.
bool requiresThink ()
 Behavior instance requires think() to be called.
void stateChanged ()
 State changed (visble, touchable).
void think (float elapsed)
 Think about what to do for the next frame update.

Public Attributes

float pAnalogTurnHorizontal
float pAnalogTurnHorizontalSticky
bool pCanTurn
ECBehaviorPlayerInputTurn pECBehavior
ECBehaviorLocomotion.Instance pLocomotion
float pSpeedTurnHorizontal
bool pTurnLeft
bool pTurnRight
Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance
BehaviorElement pElement
int pInstanceIndex
bool pRequiresEnterFrame
bool pRequiresThink

Additional Inherited Members

Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called.
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called.

Detailed Description

Behavior instance.

Member Function Documentation

◆ addAnalogTurnHorizontal()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.addAnalogTurnHorizontal ( float value)

Set analog turn left right.

Version
1.26

Referenced by dispose().

◆ calculateTurnHorizontal()

float Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.calculateTurnHorizontal ( )

Calculate turn left right value and reset analog input.

References getTurnRight().

◆ dispose()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.dispose ( )

Dispose of instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References addAnalogTurnHorizontal().

◆ getAnalogTurnHorizontal()

float Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getAnalogTurnHorizontal ( )

Analog turn left right.

Referenced by updateLocomotion().

◆ getAnalogTurnHorizontalSticky()

float Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getAnalogTurnHorizontalSticky ( )

Sticky analog turn left right.

Referenced by writeToFile().

◆ getCanTurn()

bool Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getCanTurn ( )

◆ getECBehavior()

ECBehaviorPlayerInputTurn Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getECBehavior ( )

Behavior.

References setCanTurn().

◆ getLocomotion()

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getLocomotion ( )

Locomotion behavior or null if absent.

References toggleCanTurn().

◆ getSpeedTurnHorizontal()

float Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getSpeedTurnHorizontal ( )

Turn left right speed in degrees per second.

Referenced by reset().

◆ getTurnLeft()

bool Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getTurnLeft ( )

Turn left key is pressed.

Referenced by toggleCanTurn().

◆ getTurnRight()

bool Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.getTurnRight ( )

Turn right key is pressed.

Referenced by calculateTurnHorizontal().

◆ init()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.init ( StubElement stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References setAnalogTurnHorizontalSticky().

◆ new()

Instance Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.new ( ECBehaviorPlayerInputTurn ecbehavior,
BehaviorElement element )

Create instance.

Referenced by getCanTurn(), and setSpeedTurnHorizontal().

◆ readFromFile()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.readFromFile ( PersistencyEnvironment env,
FileReader reader )

Read element from file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ reset()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.reset ( )

Reset input.

References getSpeedTurnHorizontal().

◆ setAnalogTurnHorizontal()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.setAnalogTurnHorizontal ( float value)

Set analog turn left right.

References updateLocomotion().

◆ setAnalogTurnHorizontalSticky()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.setAnalogTurnHorizontalSticky ( float value)

Set sticky analog turn left right.

Referenced by init().

◆ setCanTurn()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.setCanTurn ( bool canTurn)

Set if player can turn.

Referenced by getECBehavior().

◆ setSpeedTurnHorizontal()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.setSpeedTurnHorizontal ( float speed)

Set turn left right speed in degrees per second.

References Dragengine.Scenery.ECBehaviorPlayerInputTurn.instance(), and new().

◆ setTurnLeft()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.setTurnLeft ( bool pressed)

Set if turn left key is pressed.

◆ setTurnRight()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.setTurnRight ( bool pressed)

Set if turn right key is pressed.

◆ toggleCanTurn()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.toggleCanTurn ( )

Toggle can turn.

References getTurnLeft().

Referenced by getLocomotion().

◆ toggleTurnLeft()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.toggleTurnLeft ( )

Toggle turn left key pressed.

◆ toggleTurnRight()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.toggleTurnRight ( )

Toggle turn right key pressed.

◆ updateLocomotion()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.updateLocomotion ( float elapsed)

Update locomotion.

Calls calculateTurnHorizontal() to obtain the turning changes and applies using Locomotion.setTurnHorizontal().

Note
This method conflicts with ECBehaviorPlayerInputMove.updateLocomotion() if ECBehaviorPlayerInputMove is set to modify turning.

References getAnalogTurnHorizontal().

Referenced by setAnalogTurnHorizontal().

◆ writeToFile()

void Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.writeToFile ( PersistencyEnvironment env,
FileWriter writer )

Write element to file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References getAnalogTurnHorizontalSticky().

Member Data Documentation

◆ pAnalogTurnHorizontal

float Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pAnalogTurnHorizontal

◆ pAnalogTurnHorizontalSticky

float Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pAnalogTurnHorizontalSticky

◆ pCanTurn

bool Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pCanTurn

◆ pECBehavior

ECBehaviorPlayerInputTurn Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pECBehavior

◆ pLocomotion

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pLocomotion

◆ pSpeedTurnHorizontal

float Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pSpeedTurnHorizontal

◆ pTurnLeft

bool Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pTurnLeft

◆ pTurnRight

bool Dragengine.Scenery.ECBehaviorPlayerInputTurn.Instance.pTurnRight

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