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


C++ IDeserializer::NumberU32_Unbounded方法代码示例

本文整理汇总了C++中IDeserializer::NumberU32_Unbounded方法的典型用法代码示例。如果您正苦于以下问题:C++ IDeserializer::NumberU32_Unbounded方法的具体用法?C++ IDeserializer::NumberU32_Unbounded怎么用?C++ IDeserializer::NumberU32_Unbounded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDeserializer的用法示例。


在下文中一共展示了IDeserializer::NumberU32_Unbounded方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Deserialize

    virtual void Deserialize(const CParamNode& paramNode, IDeserializer& deserialize)
    {
        Init(paramNode);

        u32 numEntities;
        deserialize.NumberU32_Unbounded("num entities", numEntities);
        for (u32 i = 0; i < numEntities; ++i)
        {
            entity_id_t ent;
            std::string templateName;
            deserialize.NumberU32_Unbounded("id", ent);
            deserialize.StringASCII("template", templateName, 0, 256);
            m_LatestTemplates[ent] = templateName;
        }
    }
开发者ID:,项目名称:,代码行数:15,代码来源:

示例2: Deserialize

	virtual void Deserialize(const CParamNode& paramNode, IDeserializer& deserialize)
	{
		Init(paramNode);
		
		// The attack code stores the id so that the projectile gets deleted when it hits the target
		deserialize.NumberU32_Unbounded("next id", m_NextId);
	}
开发者ID:Valvador,项目名称:PyroSpaceFork,代码行数:7,代码来源:CCmpProjectileManager.cpp

示例3: Deserialize

void CCmpPathfinder::Deserialize(const CParamNode& paramNode, IDeserializer& deserialize)
{
	Init(paramNode);

	SerializeVector<SerializeLongRequest>()(deserialize, "long requests", m_AsyncLongPathRequests);
	SerializeVector<SerializeShortRequest>()(deserialize, "short requests", m_AsyncShortPathRequests);
	deserialize.NumberU32_Unbounded("next ticket", m_NextAsyncTicket);
	deserialize.NumberU16_Unbounded("same turn moves count", m_SameTurnMovesCount);
}
开发者ID:temirio,项目名称:0ad,代码行数:9,代码来源:CCmpPathfinder.cpp

示例4: Deserialize

	virtual void Deserialize(const CParamNode& UNUSED(paramNode), IDeserializer& deserialize)
	{
		JSContext* cx = GetSimContext().GetScriptInterface().GetContext();
		JSAutoRequest rq(cx);
	
		u32 numCmds;
		deserialize.NumberU32_Unbounded("num commands", numCmds);
		for (size_t i = 0; i < numCmds; ++i)
		{
			i32 player;
			JS::RootedValue data(cx);
			deserialize.NumberI32_Unbounded("player", player);
			deserialize.ScriptVal("data", &data);
			m_LocalQueue.emplace_back(SimulationCommand(player, cx, data));
		}
	}
开发者ID:righnatios,项目名称:0ad,代码行数:16,代码来源:CCmpCommandQueue.cpp

示例5: Deserialize

	virtual void Deserialize(const CParamNode& paramNode, IDeserializer& deserialize)
	{
		Init(paramNode);

		deserialize.Bool("in world", m_InWorld);
		if (m_InWorld)
		{
			deserialize.NumberFixed_Unbounded("x", m_X);
			deserialize.NumberFixed_Unbounded("y", m_Y);
			deserialize.NumberFixed_Unbounded("z", m_Z);
			deserialize.NumberFixed_Unbounded("last x", m_LastX);
			deserialize.NumberFixed_Unbounded("last y diff", m_LastYDifference);
			deserialize.NumberFixed_Unbounded("last z", m_LastZ);
		}
		deserialize.NumberI32_Unbounded("territory", m_Territory);
		deserialize.NumberFixed_Unbounded("rot x", m_RotX);
		deserialize.NumberFixed_Unbounded("rot y", m_RotY);
		deserialize.NumberFixed_Unbounded("rot z", m_RotZ);
		deserialize.NumberFixed_Unbounded("altitude", m_Y);
		deserialize.Bool("relative", m_RelativeToGround);
		deserialize.Bool("floating", m_Floating);
		deserialize.NumberFixed_Unbounded("constructionprogress", m_ConstructionProgress);
		// TODO: should there be range checks on all these values?

		m_InterpolatedRotY = m_RotY.ToFloat();

		deserialize.NumberU32_Unbounded("turret parent", m_TurretParent);
		if (m_TurretParent != INVALID_ENTITY)
		{
			deserialize.NumberFixed_Unbounded("x", m_TurretPosition.X);
			deserialize.NumberFixed_Unbounded("y", m_TurretPosition.Y);
			deserialize.NumberFixed_Unbounded("z", m_TurretPosition.Z);
		}

		if (m_InWorld)
			UpdateXZRotation();

		UpdateMessageSubscriptions();
	}
开发者ID:2asoft,项目名称:0ad,代码行数:39,代码来源:CCmpPosition.cpp


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