Updated examples
It is now possible to pause the animation in AnimatedMesh demo with the P key Former-commit-id: 98d1b5196007dd524e2257157d6e7fd3171fb070
This commit is contained in:
@@ -247,6 +247,7 @@ int main()
|
||||
|
||||
// Quelques variables
|
||||
bool camMode = true;
|
||||
bool paused = false;
|
||||
bool thirdPerson = false;
|
||||
bool windowOpen = true;
|
||||
|
||||
@@ -338,6 +339,8 @@ int main()
|
||||
}
|
||||
else if (event.key.code == NzKeyboard::Escape)
|
||||
windowOpen = false;
|
||||
else if (event.key.code == NzKeyboard::P)
|
||||
paused = !paused;
|
||||
|
||||
break;
|
||||
|
||||
@@ -433,7 +436,9 @@ int main()
|
||||
drfreak.matrix = NzMatrix4f::Rotate(modelOrient) * NzMatrix4f::Translate(modelPos);
|
||||
|
||||
// Animation
|
||||
AnimateModel(drfreak, elapsedTime);
|
||||
if (!paused)
|
||||
AnimateModel(drfreak, elapsedTime);
|
||||
|
||||
updateClock.Restart();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user