Method: Zyps::ElapsedTimeCondition#select
- Defined in:
- lib/zyps/conditions.rb
#select(actor, targets) ⇒ Object
Returns the array of targets if the interval has elapsed.
118 119 120 121 122 123 124 125 126 |
# File 'lib/zyps/conditions.rb', line 118 def select(actor, targets) @elapsed_time += @clock.elapsed_time if @elapsed_time >= interval @elapsed_time = 0 return targets else return [] end end |