本文整理汇总了C++中GameObject::AddLateUpdate方法的典型用法代码示例。如果您正苦于以下问题:C++ GameObject::AddLateUpdate方法的具体用法?C++ GameObject::AddLateUpdate怎么用?C++ GameObject::AddLateUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObject
的用法示例。
在下文中一共展示了GameObject::AddLateUpdate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateTott
GameObject* GameObjectManager::CreateTott(const Ogre::Vector3& position, void* data){
CharControllerDef& def = *static_cast<CharControllerDef*>(data);
GameObject* go = new GameObject(GAME_OBJECT_TOTT);
AnimationComponent* acomp = new AnimationComponent;
acomp->AddAnimationStates(1);
go->AddComponent(acomp);
go->AddUpdateable(acomp);
CharacterController* contr = new CharacterController;
go->AddComponent(contr);
go->AddUpdateable(contr);
go->AddLateUpdate(contr);
acomp->Init("Yomi_2Yomi.mesh", m_scene_manager);
contr->Init(position, acomp->GetEntity(), def.step_height, def.collider_type, m_physics_engine);
contr->SetTurnSpeed(def.turn_speed);
contr->SetVelocity(def.velocity);
return go;
}
示例2: CreatePlayer
GameObject* GameObjectManager::CreatePlayer(const Ogre::Vector3& position, void* data){
CharControllerDef& def = *static_cast<CharControllerDef*>(data);
GameObject* go = new GameObject(GAME_OBJECT_PLAYER);
AnimationComponent* acomp = new AnimationComponent;
acomp->AddAnimationStates(2);
go->AddComponent(acomp);
go->AddUpdateable(acomp);
CharacterController* contr = new CharacterController;
go->AddComponent(contr);
go->AddUpdateable(contr);
go->AddLateUpdate(contr);
FollowCameraComponent* fcc = new FollowCameraComponent;
go->AddComponent(fcc);
go->AddUpdateable(fcc);
PlayerInputComponent* pccomp = new PlayerInputComponent;
go->AddComponent(pccomp);
go->AddUpdateable(pccomp);
ChildSceneNodeComponent* csnc = new ChildSceneNodeComponent;
go->AddComponent(csnc);
Sound2DComponent* sound2D = new Sound2DComponent;
go->AddComponent(sound2D);
Sound3DComponent* sound3D = new Sound3DComponent;
go->AddComponent(sound3D);
Music2DComponent* music2D = new Music2DComponent;
go->AddComponent(music2D);
acomp->Init("Yomi_2Yomi.mesh", m_scene_manager);
contr->Init(position, acomp->GetEntity(), def.step_height, def.collider_type, m_physics_engine);
contr->SetTurnSpeed(def.turn_speed);
contr->SetVelocity(def.velocity);
contr->HasFollowCam(true);
pccomp->Init(m_input_manager);
sound2D->Init(m_sound_manager);
sound3D->Init(m_sound_manager);
music2D->Init(m_sound_manager);
fcc->Init(m_scene_manager, m_viewport, true);
fcc->GetCamera()->setNearClipDistance(0.1f);
fcc->GetCamera()->setFarClipDistance(100);
csnc->Init(Ogre::Vector3(0.0f, 0.0f, 1.0f), "CreateBubble", acomp->GetSceneNode());
return go;
}