-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1330 add active component for all kinds of disabling purposes #1357
base: main
Are you sure you want to change the base?
1330 add active component for all kinds of disabling purposes #1357
Conversation
…330-add-active-component-for-all-kinds-of-disabling-purposes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/2)
engine/include/cubos/engine/render/active_component/active_component.hpp
Outdated
Show resolved
Hide resolved
engine/src/render/lights/plugin.cpp
Outdated
.call([](Commands cmds, Query<Entity> query) { | ||
for (auto [ent] : query) | ||
{ | ||
cmds.add(ent, Active_component{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
cmds.add(ent, Active_component{}); | |
cmds.add(ent, ActiveComponent{}); |
engine/src/render/lights/plugin.cpp
Outdated
|
||
cubos.observer("add active component on add PointLight") | ||
.onAdd<PointLight>() | ||
.without<Active_component>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
.without<Active_component>() | |
.without<ActiveComponent>() |
engine/src/render/lights/plugin.cpp
Outdated
.call([](Commands cmds, Query<Entity> query) { | ||
for (auto [ent] : query) | ||
{ | ||
cmds.add(ent, Active_component{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
cmds.add(ent, Active_component{}); | |
cmds.add(ent, ActiveComponent{}); |
engine/src/render/lights/plugin.cpp
Outdated
|
||
cubos.observer("add active component on add SpotLight") | ||
.onAdd<SpotLight>() | ||
.without<Active_component>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
.without<Active_component>() | |
.without<ActiveComponent>() |
engine/src/render/lights/plugin.cpp
Outdated
.call([](Commands cmds, Query<Entity> query) { | ||
for (auto [ent] : query) | ||
{ | ||
cmds.add(ent, Active_component{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
cmds.add(ent, Active_component{}); | |
cmds.add(ent, ActiveComponent{}); |
|
||
namespace cubos::engine | ||
{ | ||
struct Active_component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
struct Active_component | |
struct ActiveComponent |
engine/src/render/camera/plugin.cpp
Outdated
|
||
cubos.component<Camera>(); | ||
cubos.component<PerspectiveCamera>(); | ||
cubos.component<OrthographicCamera>(); | ||
|
||
cubos.relation<DrawsTo>(); | ||
|
||
cubos.observer("add active component on add Camera") | ||
.onAdd<Camera>() | ||
.without<Active_component>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
.without<Active_component>() | |
.without<ActiveComponent>() |
engine/src/render/camera/plugin.cpp
Outdated
.call([](Commands cmds, Query<Entity> query) { | ||
for (auto [ent] : query) | ||
{ | ||
cmds.add(ent, Active_component{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
cmds.add(ent, Active_component{}); | |
cmds.add(ent, ActiveComponent{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (2/2)
|
||
void cubos::engine::activePlugin(Cubos& cubos) | ||
{ | ||
cubos.component<Active_component>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
cubos.component<Active_component>(); | |
cubos.component<ActiveComponent>(); |
|
||
namespace cubos::engine | ||
{ | ||
struct Active_component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
struct Active_component | |
struct ActiveComponent |
|
||
#include <cubos/engine/render/active_component/active_component.hpp> | ||
|
||
CUBOS_REFLECT_IMPL(cubos::engine::Active_component) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
CUBOS_REFLECT_IMPL(cubos::engine::Active_component) | |
CUBOS_REFLECT_IMPL(cubos::engine::ActiveComponent) |
return core::ecs::TypeBuilder<Active_component>("cubos::engine::Active_component") | ||
.withField("active", &Active_component::active) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
return core::ecs::TypeBuilder<Active_component>("cubos::engine::Active_component") | |
.withField("active", &Active_component::active) | |
return core::ecs::TypeBuilder<ActiveComponent>("cubos::engine::Active_component") | |
.withField("active", &ActiveComponent::active) |
|
||
namespace cubos::engine | ||
{ | ||
struct Active_component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
struct Active_component | |
struct ActiveComponent |
|
||
namespace cubos::engine | ||
{ | ||
struct Active_component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for struct Active_component
struct Active_component | |
struct ActiveComponent |
Description
add active component for all kinds of disabling purposes
Checklist