Basic simple animations where the enemies just move forward.

This commit is contained in:
Zed A. Shaw 2025-02-22 01:36:31 -05:00
parent 947ccbe180
commit 80a0f2ba75
9 changed files with 92 additions and 80 deletions

View file

@ -165,11 +165,7 @@ namespace guecs {
template <typename Comp>
std::optional<Comp> get_if(DinkyECS::Entity entity) {
if($world.has<Comp>(entity)) {
return std::make_optional<Comp>($world.get<Comp>(entity));
} else {
return std::nullopt;
}
return $world.get_if<Comp>(entity);
}
template <typename Comp>