where does it go?

Started by
3 comments, last by xSKOTTIEx 18 years, 9 months ago
i have a pure virtual base class for entities, called cObject, with basic methods: update( float timeDelta ); render(); setPosition( int x, int y ); ////etc i derive off of this class for sprites, animations, particle systems.. all renderable objects. the only problem is.... the particle system one doesnt work. i add them to objectLists that old cObjects. and if i write to my log file every time cParticle::render() is called... i check the log and its not there. so when i add this particle to the list and i call objectList->render() (Which just calls render for all of the objects ) it doesnt seem to be called the cParticle's render method. any clues why?
---------Coming soon! Microcosm II.
Advertisement
have you debugged the code at all? This will tell you exactly what is going on, when a function is getting called, and where it's getting called from. It's pretty much impossible to tell you what's going on without seeing any code, so either post your code here or use your debugger assuming you have one. Debugging is your friend and will be able to tell you what's going wrong better then anyone.
What exactly is your objectList, and how do you add the particles to it?
Can you paste your particle class (the definition should be enough), maybe you haven't overwritten the render function.
actually i did overload the render method, but i found the problem. i have an isActive() method that tells the object list if the sprite should be deleted or not. my logic for this was flawed with the cParticle class (i was doing it based on particle count, not lifetime ) but now it works fine. thanks anyway.
---------Coming soon! Microcosm II.

This topic is closed to new replies.

Advertisement