当前位置: 首页>>代码示例>>C++>>正文


C++ OverlayElement::parseXML方法代码示例

本文整理汇总了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);

//.........这里部分代码省略.........
开发者ID:qeensh,项目名称:RadXML,代码行数:101,代码来源:RadXmlLevel.cpp


注:本文中的OverlayElement::parseXML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。