Commit be65c5bf authored by Georg Schäfer's avatar Georg Schäfer
Browse files

Merge branch 'develop' into feature/19-level-datastructure

parents e858f5ba 6ad48533
Pipeline #3242 failed with stage
in 1 minute and 49 seconds
......@@ -4,6 +4,8 @@
namespace phase_shifter::gameplay {
using mirrage::ecs::components::Transform_comp;
Camera_system::Camera_system(mirrage::ecs::Entity_manager& entity_manager)
: _entity_manager(entity_manager)
{
......@@ -13,8 +15,8 @@ namespace phase_shifter::gameplay {
void Camera_system::update(mirrage::util::Time dt)
{
for(auto&& [viewtarget, spring, transform] :
_entity_manager.list<Viewtarget_comp, Spring_comp, mirrage::ecs::components::Transform_comp>()) {
for(auto&& [transform, viewtarget, spring] :
_entity_manager.list<Transform_comp, Viewtarget_comp, Spring_comp>()) {
auto target_facet = _entity_manager.get(viewtarget.target);
if(target_facet.is_some()) {
......@@ -22,7 +24,7 @@ namespace phase_shifter::gameplay {
target_facet.get_or_throw().get<mirrage::ecs::components::Transform_comp>();
if(target_transform.is_some()) {
auto& target_position = target_transform.get_or_throw().position;
auto target_position = target_transform.get_or_throw().position;
glm::vec3 offset = viewtarget.offset;
glm::vec3 dest_pos = {target_position.x + offset.x,
target_position.y + offset.y,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment