mirror of
https://github.com/enduro2d/enduro2d.git
synced 2026-09-30 02:46:47 +07:00
basic component inspectors
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user