When and where are node instances created
Closed this issue · 2 comments
I really liked reading your blog posts about Ash and I am studying the source code of Ash and the Asteroids example.
Thanks for the greate work!
What I don't really understand quite yet is where and when exactly node instances are created.
As a concrete example there is the BulletAgeSystem. In the EntityCreator we create a bullet component in the createUserBullet-method.
But where exactly is now the BulletAgeNode created? And how does the system or engine know that it needs to create a BulletAgeNode for the Bullet component?
The engine creates the nodes when they are needed. The class inside Ash where this happens is here - https://github.com/richardlord/Ash/blob/master/src/ash/core/ComponentMatchingFamily.as . Read this blog post to understand more - http://www.richardlord.net/blog/what-is-an-entity-framework .
The header comment in ComponentMatchingFamily makes it clear.
Thank you