class Nya::Object
- Nya::Object
- Reference
- Object
Overview
Base class for all in-game objects
Included Modules
- Nya::Serializable
Direct Known Subclasses
Defined in:
nya/object.crConstant Summary
-
NYA_REGISTERED =
true
-
PROPERTIES =
{"tag" => "$String", "id" => "$String", "enabled" => "$Bool"} of String => String
Class Method Summary
- .deserialize(xml, ctx : SerializationContext | Nil = nil)
- .transform_name(name)
-
.xml_name
Returns XML compatible name of a type (see
Nya::Serializable.translate_type
)
Instance Method Summary
- #ancestor_or_same?(u : U.class) forall U
-
#awake
Post-initializes this object
- #backend
- #enabled : Bool
- #enabled=(enabled : Bool)
- #enabled? : Bool
- #engine
- #id : String?
- #id=(id : Nil | String)
-
#matches_tag?(tag)
Returns
true
if this object must be rendered with given#tag
-
#render(tag : String | Nil = nil)
Renders object
- #tag : String?
- #tag=(tag : Nil | String)
- #update
Class Method Detail
Instance Method Detail
def awake
#
Post-initializes this object
Override this method to implement custom post-initialization behaviour Remember to call super when necessary (for example, before custom logic)
def render(tag : String | Nil = nil)
#
Renders object
Override this method to implement custom render logic.