本文整理汇总了C++中OverlayElement::parseXML方法的典型用法代码示例。如果您正苦于以下问题:C++ OverlayElement::parseXML方法的具体用法?C++ OverlayElement::parseXML怎么用?C++ OverlayElement::parseXML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OverlayElement
的用法示例。
在下文中一共展示了OverlayElement::parseXML方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Entity
Movable *Level::createMovable (XmlFile *file, int type, std::string name, Movable *parent, XMLElement *element, bool createNow)
{
Movable *objObject = 0;
if (type == GOT_ENTITY)
{
Entity *eEntity = new Entity (name);
if (element != 0)
eEntity->parseXML (file, element, parent);
if (createNow == true)
eEntity->create (parent);
objObject = eEntity;
}
if (type == GOT_CAMERA)
{
Camera *cCamera = new Camera (name);
if (element != 0)
cCamera->parseXML (file, element, parent);
if (createNow == true)
cCamera->create (0, parent);
objObject = cCamera;
}
if (type == GOT_PARTICLE_SYSTEM)
{
ParticleSystem *psSystem = new ParticleSystem (name);
if (element != 0)
psSystem->parseXML (file, element, parent);
if (createNow == true)
psSystem->create (parent);
objObject = psSystem;
}
if (type == GOT_LIGHT)
{
Light *lLight = new Light (name);
if (element != 0)
lLight->parseXML (file, element, parent);
if (createNow == true)
lLight->create (parent);
objObject = lLight;
}
if (type == GOT_ANIMATION_TRACK)
{
AnimationTrackObject *atoObject = new AnimationTrackObject (name);
if (element != 0)
atoObject->parseXML (file, element, parent);
if (createNow == true)
atoObject->create (parent);
objObject = atoObject;
aryAnimations.push_back (atoObject);
}
if (type == GOT_AUDIO_LISTENER)
{
AudioListener *alListener = new AudioListener (name);
if (element != 0)
alListener->parseXML (file, element, parent);
if (createNow == true)
alListener->create (parent);
objObject = alListener;
}
if (type == GOT_SOUND)
{
Sound *sSound = new Sound (name);
if (element != 0)
sSound->parseXML (file, element, parent);
if (createNow == true)
sSound->create (parent);
objObject = sSound;
}
if (type == GOT_OVERLAY)
{
Overlay *oOverlay = new Overlay (name);
//.........这里部分代码省略.........