Module: Moon::EntitySystem::System::ClassMethods

Defined in:
lib/moon/packages/entity_system/system.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#registeredObject (readonly)

Returns the value of attribute registered


11
12
13
# File 'lib/moon/packages/entity_system/system.rb', line 11

def registered
  @registered
end

Instance Method Details

#register(sym) ⇒ Object


13
14
15
16
17
# File 'lib/moon/packages/entity_system/system.rb', line 13

def register(sym)
  System.manager.remove(@registered) if @registered
  @registered = sym
  System.manager.set(@registered, self)
end