-
Notifications
You must be signed in to change notification settings - Fork 1
FrameEvent
Jump To | Go Back |
Arguments | Methods | Variables |
---|
Implements: None
Creates a new event that relies on frame timing, and will run at the given periodicity during the specified event. The FAST.events are: #### FAST.CREATE, FAST.GAME_END, FAST.ROOM_START, FAST.ROOM_END, FAST.STEP_BEGIN, FAST.STEP, FAST.STEP_END
event = new FrameEvent( FAST.STEP, 30, undefined, function() {
show_debug_message( "Hello World!" );
});
Name | Type | Purpose |
---|---|---|
FAST.event | list |
The event to add this to |
delay | int |
How many frames before firing |
parameters | mixed |
A value to pass to the function |
function | func |
The function to call when the delay has passed |
Jump To | top |
update | now | once | discard | toString | is |
---|
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Called to update the event during the event it was assigned to.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Executes the event, can be used to force the event to happen now. Can be called when the event is created, as it will return the event.
Returns: self
Name | Type | Purpose |
---|---|---|
None |
Tells the event it should only be run once. Can be called when the event is created, as it will return the event.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Destroys the event.
Returns: string ("string"
)
Name | Type | Purpose |
---|---|---|
None |
Returns the event as a string, for debugging.
Returns: boolean (true
or false
)
Name | Type | Purpose |
---|---|---|
type | Constructor |
The Constructor to compare this against. |
Returns true
if the provided type is FrameEvent.
Jump To | top |
---|
- tick - how many frames have passed since event creation/restart.
- tock - What tick this event should fire on
- repeats - if
true
, will loop after the event fires. otherwise it is discarded. - func - the function this event calls
- params - the parameters that are passed to the function
- list - the event list this event was added to
- ignore - if
true
, this event will not fire, it will still cycle and/or discard
Devon Mullane 2020