Class Rubygame::Events::ClockTicked
In: lib/rubygame/events/clock_events.rb
lib/rubygame/events/clock_events.rb
Parent: Object

ClockTicked is an event returned by Clock#tick, if the Clock has been configured with Clock#enable_tick_events.

ClockTicked stores the time that has passed since the previous tick. You can access that information with seconds or milliseconds. This is useful to calculate how far a character should move during the current frame, for example.

Methods

milliseconds   milliseconds   new   new   seconds   seconds  

Public Class methods

Create a new ClockTicked event.

milliseconds:The time since the last tick, in milliseconds. (Numeric, required)

Create a new ClockTicked event.

milliseconds:The time since the last tick, in milliseconds. (Numeric, required)

Public Instance methods

Return the time since the last tick, in milliseconds.

Return the time since the last tick, in milliseconds.

Return the time since the last tick, in seconds.

Return the time since the last tick, in seconds.

[Validate]