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

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 ( )

◆ getAction()

ActionListener Dragengine.Gui.RepeatActionTimer.getAction ( )

Action to repeat.

References new().

Referenced by getModifiers().

◆ getModifiers()

int Dragengine.Gui.RepeatActionTimer.getModifiers ( )

Modifiers for sending event.

References getAction().

Referenced by fire().

◆ getRepeatDelay()

float Dragengine.Gui.RepeatActionTimer.getRepeatDelay ( )

Repeat delay in seconds.

References new().

Referenced by fire().

◆ getSource()

Object Dragengine.Gui.RepeatActionTimer.getSource ( )

Source sending event.

Referenced by setRepeatDelay().

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

References new().

Referenced by fire(), getAction(), getRepeatDelay(), new(), and new().

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

References new().

◆ sendEvent()

void Dragengine.Gui.RepeatActionTimer.sendEvent ( )

Send event.

References setSource().

Referenced by fire().

◆ setAction()

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

Set action to repeat.

Referenced by setModifiers().

◆ setModifiers()

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

Set modifiers for sending event.

References setAction().

Referenced by fire().

◆ setRepeatDelay()

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

Set repeat delay in seconds.

References getSource().

Referenced by fire().

◆ setSource()

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

Set source sending event.

Referenced by sendEvent().


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