MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / ECSTest

Method ECSTest

tests/runtime/ecs/main.cpp:57–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55{
56public:
57 ECSTest() SKR_NOEXCEPT
58 {
59 storage = sugoiS_create();
60 {
61 sugoi_chunk_view_t view;
62 sugoi_entity_type_t entityType;
63 entityType.type = { &type_test, 1 };
64 entityType.meta = { nullptr, 0 };
65 auto callback = [&](sugoi_chunk_view_t* inView) {
66 view = *inView;
67 *(TestComp*)sugoiV_get_owned_rw(&view, type_test) = 123;
68 };
69 sugoiS_allocate_type(storage, &entityType, 1, SUGOI_LAMBDA(callback));
70
71 e1 = sugoiV_get_entities(&view)[0];
72 }
73 }
74
75 ~ECSTest() SKR_NOEXCEPT
76 {

Callers

nothing calls this directly

Calls 4

sugoiS_createFunction · 0.85
sugoiV_get_owned_rwFunction · 0.85
sugoiS_allocate_typeFunction · 0.85
sugoiV_get_entitiesFunction · 0.85

Tested by

no test coverage detected