externalize boot process
Booting is complicated, make an own file for it
This commit is contained in:
@ -32,6 +32,7 @@ module Parfait
|
||||
@messages = 100.times.collect{ ::Parfait::Message.new }
|
||||
@next_message = @messages.first
|
||||
@next_frame = @frames.first
|
||||
Parfait::Space.set_object_space self
|
||||
end
|
||||
attr_reader :classes , :objects , :symbols,:messages, :next_message , :next_frame
|
||||
|
||||
@ -41,6 +42,16 @@ module Parfait
|
||||
@@SPACE
|
||||
end
|
||||
|
||||
@@object_space = nil
|
||||
# Make the object space globally available
|
||||
def self.object_space
|
||||
@@object_space
|
||||
end
|
||||
# TODO Must get rid of the setter
|
||||
def self.set_object_space space
|
||||
@@space = space
|
||||
end
|
||||
|
||||
# Objects are data and get assembled after functions
|
||||
def add_object o
|
||||
return if @objects.include?(o)
|
||||
|
Reference in New Issue
Block a user