I am building a simple 2D game with SFML and have a GameState object that contains a Plane and a vector of Enemies. THe plane is represented by a triangle and the enemies by a rectangle. The plane object has bullets and I am wondering what is the most appropriate way of handling collision between the bullets and the enemies. The structure of the code is the following :
GameState
/\
/ \
Plane Enemies
/
Bullets
Every object has Render and Update and possibly HandleInput methods. The way I think that this could work is if I pass the enemies vector to the plane's update method which in turn calls the bullets update method and there I do the check. Is this ok ? Is there an easier and more solid method of doing it ?