Upon creation I have to send the pointer of the renderData from the Renderer to the GraphicsEngine.
This is done by passing it to the GameObject, which passes it to the Scene, which passes it the Core, which will call the corresponding method at GraphicsEngine.
The problem with this is that the Scene has access to the Core. How can I register these RenderData's at the GraphicsEngine correctly?
And this is the same with Behaviour components signaling the AudioEngine to play a sound.
And this is also the same with the Rigidbody component's RigidbodyData and the PhysicsEngine.
But there is another problem: How do I signal the objects which have collided from the PhysicsEngine?
I have thought of registering the object ID at the RigidbodyData's of teh collided objects, which Renderer will sense this, and will handle the custom behaviours. (like what happens when a bullet is collided with a player)
And if this is good then how do I signal the custom scripts that there is a collosion with another game object? Upon creation of Behaviour's I add their OnCollide method to an array at Rigidbody? Or just instead of storing the Behaviours in the general Component container, have a separated container for them and just iterate through them and call OnCollosion?
Another problem: The Window handles the input, and have to signal these Behaviour components in the Scene.
- So it has access the Scene, and on receiving input, it calls the Scene corresponding method which will spread the event somehow?