示例#1
0
void Urho2DPhysicsRope::HandleUpdate(StringHash eventType, VariantMap& eventData)
{
    using namespace Update;

    // Take the frame time step, which is stored as a float
    float timeStep = eventData[P_TIMESTEP].GetFloat();

    // Move the camera, scale movement with time step
    MoveCamera(timeStep);
    
    PhysicsWorld2D* physicsWorld = scene_->GetComponent<PhysicsWorld2D>();
    physicsWorld->DrawDebugGeometry();
}
示例#2
0
void Urho2DConstraints::HandlePostRenderUpdate(StringHash eventType, VariantMap& eventData)
{
    PhysicsWorld2D* physicsWorld = scene_->GetComponent<PhysicsWorld2D>();
    if (drawDebug_) physicsWorld->DrawDebugGeometry();
}
示例#3
0
文件: Tower.cpp 项目: Batanick/tower
void TowerApp::HandlePostRenderUpdate(StringHash eventType, VariantMap &eventData) {
    PhysicsWorld2D *physicsWorld = scene->GetScene()->GetComponent<PhysicsWorld2D>();
    if (physicsWorld && drawDebugGeometry)
        physicsWorld->DrawDebugGeometry();
}