Fixed animations, jank-noted some issues & workarounds with the Animation python API

This commit is contained in:
John McCardle 2023-03-08 09:20:57 -05:00
commit 620def19f1
5 changed files with 182 additions and 16 deletions

View file

@ -48,11 +48,11 @@ void PythonScene::animate() {
auto frametime = game->getFrameTime();
auto it = McRFPy_API::animations.begin();
while (it != McRFPy_API::animations.end()) {
std::cout << "Iterating" << std::endl;
//std::cout << "Iterating" << std::endl;
(*it)->step(frametime);
std::cout << "Step complete" << std::endl;
//std::cout << "Step complete" << std::endl;
if ((*it)->isDone()) {
std::cout << "Cleaning up" << std::endl;
std::cout << "Cleaning up Animation" << std::endl;
auto prev = it;
it++;
McRFPy_API::animations.erase(prev);