Method: Clock#initialize
- Defined in:
- lib/fantasy/clock.rb
#initialize(&block) ⇒ Clock
Returns a new instance of Clock.
7 8 9 10 11 12 13 |
# File 'lib/fantasy/clock.rb', line 7 def initialize(&block) @block = block @thread = nil @persistent = false # if persistent, clock is not stopped when loading new scene Global.clocks << self end |