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