An Entity/Component System inspired by Artemis
Component( object, init_values={} )
Coerce the specified object into a Chione::Component and return it.
40 def self::Component( object, init_values={} )
41 return object if object.is_a?( Chione::Component )
42 return Chione::Component.create( object, init_values ) if
43 object.is_a?( Class ) || object.is_a?( String ) || object.is_a?( Symbol )
44 raise TypeError, "can't convert %p into Chione::Component" % [ object.class ]
45 end
Warn about deprecated constants.
49 def self::const_missing( name )
50 return super unless name == :Assemblage
51 warn "Chione::Assemblage has been renamed to Chione::Archetype. " \
52 "This alias will be removed before 1.0\n" \
53 "Used at #{caller(1).first}"
54 return Chione::Archetype
55 end