Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualAngryPlatypus

Posted 08 February 2013 - 08:28 PM

Hi there,

 

1. i don't like a void pointer here. For me void means it can be pretty much everything. But your character shall only drive vehicles and not buildings or other characters right? Why not use a base class like "Drivable" or "Vehicle" i.e. use Polymorphism here?

 

2. body->SetActive(false) should do it.


#1AngryPlatypus

Posted 08 February 2013 - 08:26 PM

Hi there,

 

1. i don't like a void pointer here. For me void means it can be pretty much everything. But your character shall only drive vehicles and not buildings or other characters right? Why not use a base class like "Drivable" or "Vehicle" i.e. use Polymorphism here?

 

2. body->setActive(false) should do it.


PARTNERS