Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Jan 7, 2025
1 parent 80f6847 commit 789ea57
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/entitymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ std::shared_ptr<entity> entitymanager::spawn(const std::string &kind) {
keyframes.reserve(16);
for (const auto &frame : anim["frames"]) {
keyframes.emplace_back(
{frame["rect"].get<geometry::rect>(),
frame.value("offset", geometry::point{}),
frame["duration"].get<uint64_t>(),
frame.value("singleshoot", false)}
keyframe{
frame["rect"].get<geometry::rect>(),
frame.value("offset", geometry::point{}),
frame["duration"].get<uint64_t>(),
frame.value("singleshoot", false)
}
);
}
animations.emplace(key, animation{hitbox, std::move(keyframes)});
Expand Down

0 comments on commit 789ea57

Please sign in to comment.