Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Question about Observer pattern

$
0
0
Hello, I have a question about Observer pattern. I have Application class that has lists of objects, enemies and etc and I want to notify Observer when enemies list JUST got empty. How do I do that? Do I extend std::vector's erase function? Application has render method that draws and updates application. Also this method deletes items from vectors if they are dead or etc.

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>