simple question as always : In the Gideros class system is there any kind of an instanceOf mechanism? I could save class names or some other similar signature manually. But is this the way to go?
GameBaseObject = Core.class(Sprite)function GameBaseObject:init()
....
endfunction GameBaseObject:getType()error("Undefind class type name. Please override it in appropriate game object.")end-----------------------
MyObject = Core.class(GameBaseObject)function MyObject:init()
...
end-----------------------
instance = MyObject.new()print(instance:getTypeName())<-- Exception with text "Undefind class type name. Please override it in appropriate game object."
Comments
NewClass = Core.class(Sprite)
function NewClass:init()
...
self.class = 'NewClass'
end
then probably setting id or name is the way to go
One of his methods - GetType(), which throws an exception if not overridden by a subclass.
Dislikes: bgcis