class Nya::Object

Overview

Base class for all in-game objects

Included Modules

Direct Known Subclasses

Defined in:

nya/object.cr

Constant Summary

NYA_REGISTERED = true
PROPERTIES = {"tag" => "$String", "id" => "$String", "enabled" => "$Bool"} of String => String

Class Method Summary

Instance Method Summary

Class Method Detail

def self.deserialize(xml, ctx : SerializationContext | Nil = nil) #

[View source]
def self.transform_name(name) #

def self.xml_name #

Returns XML compatible name of a type (see Nya::Serializable.translate_type)


Instance Method Detail

def ancestor_or_same?(u : U.class) forall U #

[View source]
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)


[View source]
def backend #

[View source]
def enabled : Bool #

[View source]
def enabled=(enabled : Bool) #

[View source]
def enabled? : Bool #

[View source]
def engine #

[View source]
def id : String? #

[View source]
def id=(id : Nil | String) #

[View source]
def matches_tag?(tag) #

Returns true if this object must be rendered with given #tag


[View source]
def render(tag : String | Nil = nil) #

Renders object

Override this method to implement custom render logic.


[View source]
def tag : String? #

[View source]
def tag=(tag : Nil | String) #

[View source]
def update #

[View source]