Sign in to follow this  
xSKOTTIEx

where does it go?

Recommended Posts

xSKOTTIEx    174
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?

Share this post


Link to post
Share on other sites
Morpheus011    309
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.

Share this post


Link to post
Share on other sites
ext    180
Can you paste your particle class (the definition should be enough), maybe you haven't overwritten the render function.

Share this post


Link to post
Share on other sites
xSKOTTIEx    174
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this