Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class << Kernel
- @@BLOCK_WAIT ||= {}
- def block_wait(time, repeat=false, &block)
- return unless block_given?
- if @@BLOCK_WAIT[block.__id__]
- block.call
- @@BLOCK_WAIT[block.__id__] = false
- else
- if time <= 0
- @@BLOCK_WAIT[block.__id__] = true
- end
- end
- end
- end
- class Scene_Title < Scene_Base
- alias :testi :start
- def start
- @time = 10
- testi
- end
- alias :test :update
- def update
- test
- @time -= 1 while @time >= 0
- Kernel::block_wait(@time) {
- msgbox "ok"
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement