Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#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