-PageSize and PagesInBlock values can be adjust in runtime (at initialization time)
-added support for calling custon delegate function for all entities supported by selected system
This commit is contained in:
parent
1f78f2506c
commit
87e9a31d7f
3 changed files with 335 additions and 171 deletions
|
|
@ -501,6 +501,20 @@ struct TestSystem2
|
|||
|
||||
}
|
||||
|
||||
struct ExternalUpdateCallTest
|
||||
{
|
||||
int print_count = 3;
|
||||
|
||||
void update(TestSystem2.EntitiesData data)
|
||||
{
|
||||
if(print_count > 0)
|
||||
{
|
||||
print_count--;
|
||||
printf("ExternalUpdateCallTest %u %u\n", data.test[0].gg, cast(uint)data.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern(C) int main()
|
||||
{
|
||||
|
||||
|
|
@ -660,8 +674,6 @@ extern(C) int main()
|
|||
gEM.registerSystem!TestSystem2(0);
|
||||
gEM.endRegister();
|
||||
|
||||
System* sys = EntityManager.instance.getSystem(TestSystem2.system_id);
|
||||
|
||||
//gEM.generateDependencies();
|
||||
|
||||
//assert(*(cast(EntityID*)(cast(void*)tmpl.info.first_block+24)) == EntityID(1,1));
|
||||
|
|
@ -799,6 +811,12 @@ extern(C) int main()
|
|||
|
||||
gEM.commit();
|
||||
|
||||
System* sys = EntityManager.instance.getSystem(TestSystem2.system_id);
|
||||
|
||||
ExternalUpdateCallTest external_update_test;
|
||||
|
||||
EntityManager.instance.callEntitiesFunction!TestSystem2(&external_update_test.update);
|
||||
|
||||
printf("pre end\n");
|
||||
|
||||
writeEntityComponents(gEM.getEntity(entity));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue