Class: CyberarmEngine::Timer
- Inherits:
-
Object
- Object
- CyberarmEngine::Timer
- Defined in:
- lib/cyberarm_engine/timer.rb
Instance Method Summary collapse
-
#initialize(interval, looping = true, &block) ⇒ Timer
constructor
A new instance of Timer.
- #update ⇒ Object
Constructor Details
#initialize(interval, looping = true, &block) ⇒ Timer
Returns a new instance of Timer.
3 4 5 6 7 8 9 10 |
# File 'lib/cyberarm_engine/timer.rb', line 3 def initialize(interval, looping = true, &block) @interval = interval @looping = looping @block = block @last_interval = Gosu.milliseconds @triggered = false end |