basic component inspectors

This commit is contained in:
2019-12-19 01:00:53 +07:00
parent 914a0276ff
commit 5ba7619b2c
28 changed files with 504 additions and 20 deletions
+11 -9
View File
@@ -83,7 +83,6 @@ namespace
public:
bool initialize() final {
return create_scene()
&& create_camera()
&& create_systems();
}
private:
@@ -101,6 +100,17 @@ namespace
auto scene_i = the<world>().instantiate();
scene_i.component<scene>().assign();
{
prefab prefab;
prefab.prototype()
.component<camera>(camera()
.background({1.f, 0.4f, 0.f, 1.f}));
the<world>().instantiate(
prefab,
scene_i.component<actor>()->node());
}
{
prefab prefab;
prefab.prototype()
@@ -168,14 +178,6 @@ namespace
return true;
}
bool create_camera() {
auto camera_i = the<world>().instantiate();
camera_i.component<camera>().assign(camera()
.background({1.f, 0.4f, 0.f, 1.f}));
camera_i.component<actor>().assign(node::create(camera_i));
return true;
}
bool create_systems() {
ecs::registry_filler(the<world>().registry())
.feature<struct game_feature>(ecs::feature()