Drag[en]gine Script Module DragonScript  1.23
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

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

Additional Inherited Members

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

Detailed Description

Behavior instance.

Member Function Documentation

◆ calculateTurnHorizontal()

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

Calculate turn left right value and reset analog input.

◆ dispose()

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

Dispose of instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getAnalogTurnHorizontal()

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

Analog turn left right.

◆ getAnalogTurnHorizontalSticky()

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

Sticky analog turn left right.

◆ getCanTurn()

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

player can turn.

◆ getECBehavior()

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

Behavior.

◆ getLocomotion()

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

Locomotion behavior or null if absent.

◆ getSpeedTurnHorizontal()

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

Turn left right speed in degrees per second.

◆ getTurnLeft()

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

Turn left key is pressed.

◆ getTurnRight()

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

Turn right key is pressed.

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new()

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

Create instance.

◆ 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.

◆ setAnalogTurnHorizontal()

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

Set analog turn left right.

◆ setAnalogTurnHorizontalSticky()

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

Set sticky analog turn left right.

◆ setCanTurn()

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

Set if player can turn.

◆ setSpeedTurnHorizontal()

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

Set turn left right speed in degrees per second.

◆ 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.

◆ 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.

◆ writeToFile()

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

Write element to file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.


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