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


C++ Transform::GetGameObject方法代码示例

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


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

示例1: OnDestroy

	void Transform::OnDestroy(void)
	{
		Transform* current = firstChild;

		for(; current != 0; current = current->nextSibling)
			Game::destroy( current->GetGameObject() );
	}
开发者ID:Burnsidious,项目名称:FSGDEngine,代码行数:7,代码来源:Transform.cpp

示例2: FindInHierarchy

	GameObject* Transform::FindInHierarchy(RegistrationId nameHash)
	{
		GameObject* gameObject = GetGameObject();
		if( gameObject->GetNameHash() == nameHash )
			return gameObject;

		for(Transform* child = firstChild; child != 0; child = child->nextSibling)
		{
			GameObject* result = child->GetGameObject()->GetTransform()->FindInHierarchy(nameHash);

			if( result != 0 )
				return result;
		}

		return 0;		
	}
开发者ID:Burnsidious,项目名称:FSGDEngine,代码行数:16,代码来源:Transform.cpp

示例3: Find

	GameObject* Transform::Find(RegistrationId nameHash)
	{
		GameObject* gameObject = GetGameObject();
		if( gameObject->GetNameHash() == nameHash )
			return gameObject;

		for(Transform* child = firstChild; child != 0; child = child->nextSibling)
		{
			GameObject* childObject = child->GetGameObject();
			RegistrationId childNameHash = childObject->GetNameHash();

			if( childNameHash == nameHash )
				return childObject;
		}

		return 0;		
	}
开发者ID:Burnsidious,项目名称:FSGDEngine,代码行数:17,代码来源:Transform.cpp

示例4:

	Transform::Transform(const Transform& rhs)
	{
		parent = 0;
		firstChild = 0;
		nextSibling = 0;
		dirtied = modified = false;
		localMatrix.makeIdentity();
		worldMatrix.makeIdentity();

		Transform* current = rhs.firstChild;

		for(; current != 0; current = current->nextSibling )
		{
			GameObject* newGameObj = current->GetGameObject()->clone();
			newGameObj->GetTransform()->SetParent( this );
		}

		localMatrix = rhs.localMatrix;
		worldMatrix = rhs.worldMatrix;

		DirtyTransform();
	}
开发者ID:Burnsidious,项目名称:FSGDEngine,代码行数:22,代码来源:Transform.cpp


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