Drag[en]gine Script Module DragonScript  1.21
Dragengine.Gui.RepeatActionTimer Class Reference

Timer repeating an action. More...

Inheritance diagram for Dragengine.Gui.RepeatActionTimer:
Dragengine.Utils.Timer

Public Member Functions

void fire ()
 Timer elapsed. More...
 
ActionListener getAction ()
 Action to repeat. More...
 
int getModifiers ()
 Modifiers for sending event. More...
 
float getRepeatDelay ()
 Repeat delay in seconds. More...
 
Object getSource ()
 Source sending event. More...
 
RepeatActionTimer new (ActionListener action, Object source, int modifiers)
 Create repeat action timer with 0.5s initial delay and 0.05 repeat delay. More...
 
RepeatActionTimer new (ActionListener action, Object source, int modifiers, float initialDelay, float repeatDelay)
 Create repeat action timer. More...
 
void sendEvent ()
 Send event. More...
 
void setAction (ActionListener action)
 Set action to repeat. More...
 
void setModifiers (int modifiers)
 Set modifiers for sending event. More...
 
void setRepeatDelay (float delay)
 Set repeat delay in seconds. More...
 
void setSource (Object source)
 Set source sending event. More...
 
- Public Member Functions inherited from Dragengine.Utils.Timer
void advance (float elapsed)
 Advance timer. More...
 
float getElapsedTime ()
 Elapsed seconds. More...
 
bool getIsPeriodic ()
 Timer is periodic. More...
 
float getRemainingTime ()
 Remaining seconds until timer elapses. More...
 
TimerManager getTimerManager ()
 Timer manager the timer is registered at. More...
 
float getTriggerTime ()
 Seconds until timer elapsed. More...
 
void giveUp ()
 Give up timer if registered with a timer manager. More...
 
bool hasElapsed ()
 Timer elapsed. More...
 
Timer new (float triggerTime, bool periodic)
 Create timer registered at default timer manager. More...
 
Timer new (TimerManager manager, float triggerTime, bool periodic)
 Create timer registered at timer manager. More...
 
void setElapsedTime (float elapsedTime)
 Set elapsed seconds. More...
 
void setIsPeriodic (bool periodic)
 Set if timer is periodic. More...
 
void setTriggerTime (float triggerTime)
 Set seconds until timer elapses. More...
 

Additional Inherited Members

- Public Attributes inherited from Dragengine.Utils.Timer
float pElapsedTime
 
bool pIsPeriodic
 
TimerManager pTimerManager
 
float pTriggerTime
 

Detailed Description

Timer repeating an action.

Member Function Documentation

◆ fire()

void Dragengine.Gui.RepeatActionTimer.fire ( )

Timer elapsed.

Reimplemented from Dragengine.Utils.Timer.

◆ getAction()

ActionListener Dragengine.Gui.RepeatActionTimer.getAction ( )

Action to repeat.

◆ getModifiers()

int Dragengine.Gui.RepeatActionTimer.getModifiers ( )

Modifiers for sending event.

◆ getRepeatDelay()

float Dragengine.Gui.RepeatActionTimer.getRepeatDelay ( )

Repeat delay in seconds.

◆ getSource()

Object Dragengine.Gui.RepeatActionTimer.getSource ( )

Source sending event.

◆ new() [1/2]

RepeatActionTimer Dragengine.Gui.RepeatActionTimer.new ( ActionListener  action,
Object  source,
int  modifiers 
)

Create repeat action timer with 0.5s initial delay and 0.05 repeat delay.

Parameters
actionAction to repeat.
sourceSource sending the action.
modifiersModifiers for sending event.

◆ new() [2/2]

RepeatActionTimer Dragengine.Gui.RepeatActionTimer.new ( ActionListener  action,
Object  source,
int  modifiers,
float  initialDelay,
float  repeatDelay 
)

Create repeat action timer.

Parameters
actionAction to repeat.
sourceSource sending the action.
modifiersModifiers for sending event.
initialDelayDelay before repeating actions in seconds.
repeatDelayDelay between repeated actions in seconds.

◆ sendEvent()

void Dragengine.Gui.RepeatActionTimer.sendEvent ( )

Send event.

◆ setAction()

void Dragengine.Gui.RepeatActionTimer.setAction ( ActionListener  action)

Set action to repeat.

◆ setModifiers()

void Dragengine.Gui.RepeatActionTimer.setModifiers ( int  modifiers)

Set modifiers for sending event.

◆ setRepeatDelay()

void Dragengine.Gui.RepeatActionTimer.setRepeatDelay ( float  delay)

Set repeat delay in seconds.

◆ setSource()

void Dragengine.Gui.RepeatActionTimer.setSource ( Object  source)

Set source sending event.


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