• Advertisement
Sign in to follow this  

inheritance

This topic is 4831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I am trying to setup a collision detection scheme in my game right now. Basically I'll have one array of objects that move and objects that are stationary. All moving objects will check themselves against the stationary and mobile objects. The problem is that the mobile objects arent all of the same class type. I was wondering if class inheritance could solve this problem. Would I be able to have all of my objects (mobile or immobile) inherit from the same base class and have functions that do things like return the position and apply collision response run the correct code for what class they actually are? Sorry if I'm unclear...heh. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement