class Baku::System
Attributes
components[R]
game_loop_step[R]
Public Class Methods
new(components, game_loop_step)
click to toggle source
# File lib/baku/system.rb, line 5 def initialize(components, game_loop_step) @components = components @game_loop_step = game_loop_step end
Public Instance Methods
execute()
click to toggle source
# File lib/baku/system.rb, line 14 def execute if @world.nil? raise StandardError.new("Must set :world property of System.") end entities = retrieve_entities process_entities(entities) end
process_entity(entity)
click to toggle source
# File lib/baku/system.rb, line 24 def process_entity(entity) raise NotImplementedError end
register_world(world)
click to toggle source
# File lib/baku/system.rb, line 10 def register_world(world) @world = world end
Protected Instance Methods
retrieve_entities()
click to toggle source
# File lib/baku/system.rb, line 30 def retrieve_entities raise NotImplementedError end