module Game class Config end class Entity class << self def physics_engine(physics_engine) unregister_physics_engine register_physics_engine(physics_engine) end protected def unregister_physics_engine end def register_physics_engine(physics_engine) end end end class PhysicsEngine end end # # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # # # -= game-chipmunk # # # ./lib/game-chipmunk.rb # MANDATORY CONVENTION # # require 'game/physics_engine/chipmunk' # # # ./lib/game/chipmunk.rb # MANDATORY CONVENTION # # require 'game/physics_engine/chipmunk' # # # ./lib/game/physics_engine/chipmunk # ACTUAL PLUGIN # # module Game # class PhysicsEngine # # class Chipmunk < PhysicsEngine # VERSION = '0.1.0' # # on_register do # # in the scope of the Entity class this was registered.. # end # # end # # Entity.physics_engine(Chipmunk) # Autosetup Chipmunk as the default physics engine # # end # end