Drag[en]gine Script Module DragonScript Script API  1.0
Command Class Reference

Command carrying out a specific task. More...

Inheritance diagram for Command:
CommandQuitGame CommandScreenshot

Public Member Functions

void analogAbsolute (float value)
 Absolute input device axis position changed. More...
 
void analogRelative (float value)
 Relative input device axis position changed. More...
 
String getDescription ()
 Description. More...
 
String getName ()
 Unique name. More...
 
Command new ()
 Create command. More...
 
Command new (String name, String description)
 Create command. More...
 
void pulse ()
 Convenience method calling start() and stop() in succession. More...
 
void setDescription (String description)
 Set description. More...
 
void setName (String name)
 Set unique name of the command. More...
 
void start ()
 Input device key or button has been pressed. More...
 
void stop ()
 Input device key or button has been released. More...
 

Detailed Description

Command carrying out a specific task.

Can be bound to player input events or used in widgets.

Member Function Documentation

◆ analogAbsolute()

void analogAbsolute ( float  value)

Absolute input device axis position changed.

Axis keeps position until next event. Gamepad events typically send this method when the stick is pushed to a new position.

Parameters
valueNew axis position in the range -1 to 1.

◆ analogRelative()

void analogRelative ( float  value)

Relative input device axis position changed.

Value is the change in the relative axis. It is reset to 0 right after sending the event. No event is sent for the reset. A typical device is mouse movement resulting in this method to be called.

Parameters
valueRelative axis position change in axis units. Caller is responsible to adjust the range to make different input devices match in magnitude.

◆ getDescription()

String getDescription ( )

Description.

◆ getName()

String getName ( )

Unique name.

◆ new() [1/2]

Command new ( )

Create command.

◆ new() [2/2]

Command new ( String  name,
String  description 
)

Create command.

◆ pulse()

void pulse ( )

Convenience method calling start() and stop() in succession.

Used for example to run the command for different reasons than input handling.

◆ setDescription()

void setDescription ( String  description)

Set description.

◆ setName()

void setName ( String  name)

Set unique name of the command.

Allowed are only upper and lower case letters, numbers and underscores.

◆ start()

void start ( )

Input device key or button has been pressed.

◆ stop()

void stop ( )

Input device key or button has been released.


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