Sha256: 5ec210c25ad112f30d18aabb91cd5043d61af8fe61be498e2343c73ca1ebd61d
Contents?: true
Size: 653 Bytes
Versions: 2
Compression:
Stored size: 653 Bytes
Contents
module Joybox module Core class Layer < CCLayer def self.scene define_singleton_method(:scene) do scene = CCScene.new menu_layer = self.new scene << menu_layer end end def onEnter super on_enter if defined? (on_enter) end def onExit super on_exit if defined? (on_exit) end def schedule_update(&block) @schedule_update_block = block if block_given? scheduleUpdate end def update(dt) @schedule_update_block.call(dt) if @schedule_update_block end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
joybox-1.0.0 | motion/joybox/core/layer.rb |
joybox-0.0.6 | motion/joybox/core/layer.rb |