Currently, every object like the ships, the asteroids, etc. has to register themselves on the mini-map. This creates coupling and as I was refactoring the MapView, I noticed I was producing lots of errors in the game.
To remove the coupling we have to make the MapView register all the objects as they spawn. To do so we need the spawners or something to emit a signal whenever an object spawns. The MapView can then use duck typing or check for groups to see if it should register the object or not.
Currently, every object like the ships, the asteroids, etc. has to register themselves on the mini-map. This creates coupling and as I was refactoring the MapView, I noticed I was producing lots of errors in the game.
To remove the coupling we have to make the MapView register all the objects as they spawn. To do so we need the spawners or something to emit a signal whenever an object spawns. The MapView can then use duck typing or check for groups to see if it should register the object or not.