-git now should ignore .dub/dub.json

-added onAdd/onRemove to test
-added onAdd/onRemove callbacks for system
-generating onAdd/onRemove listeners
This commit is contained in:
Mergul 2019-03-23 19:48:24 +00:00
parent a82ca1e659
commit 6bbc8b5152
4 changed files with 116 additions and 2 deletions

View file

@ -108,6 +108,21 @@ struct TestSystem
writeln("On Test System destroy.");
}
void onAdd(EntitiesData data)
{
writeln("Entity added ID: ",data.entites[0].id);
}
/*void onAdd()
{
}*/
void onRemove(EntitiesData data)
{
writeln("Entity destroyed ID: ",data.entites[0].id);
}
bool onBegin()
{
//writeln("On Test System begin.");
@ -127,6 +142,7 @@ struct TestSystem
static struct EntitiesData
{
size_t length;
const(Entity)[] entites;
TestComp[] test;
TestComp2[] test2;
@readonly @optional const(TestComp3)[] test3;