2 #include "oxygine-include.h" 3 #include "core/Object.h" 4 #include "pugixml/pugixml.hpp" 5 #include "res/ResAnim.h" 6 #include "res/ResFont.h" 7 #include "utils/stringUtils.h" 14 virtual spActor create(
const char* type)
const;
15 virtual Resource* getResource(
const char*
id)
const {
return 0;}
16 virtual ResAnim* getResAnim(
const char*
id)
const {
return safeCast<ResAnim*>(getResource(
id));}
18 virtual ResFont* getResFont(
const char*
id)
const {
return safeCast<ResFont*>(getResource(
id));}
33 static spActor deser(pugi::xml_node node,
const creator* factory);
41 static void link(pugi::xml_node node, spActor root);
45 inline void setAttrV2(pugi::xml_node node,
const char* name,
const Vector2& v,
const Vector2& def)
50 safe_sprintf(str,
"%g,%g", v.x, v.y);
51 node.append_attribute(name).set_value(str);
56 void setAttr(pugi::xml_node node,
const char* name, T v, T def)
60 node.append_attribute(name).set_value(v);
Definition: Serialize.h:36
Definition: Serialize.h:28
Definition: AnimationFrame.h:28
Definition: Serialize.h:21
–oxgl-end–!
Definition: Actor.h:14
Definition: Resource.h:10
Definition: Serialize.h:11