Box2D Forums

It is currently Sun May 19, 2013 9:56 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Feb 15, 2011 12:13 pm 
Offline

Joined: Mon Jul 12, 2010 2:15 am
Posts: 47
Well I haven't looked though WCK classes at all really, but using the code hints I can find a lot of duplicate variables for properties. Such as.

Box.density
and
Box._density

I do know that a var starting with an underscore is normally code for either a setter or a private var.

Both work(as long as the object hasn't been crated yet) so which should I use? Should I even be able to see both?


Top
 Profile  
 
PostPosted: Tue Feb 15, 2011 2:10 pm 
Offline

Joined: Fri Dec 14, 2007 8:07 pm
Posts: 913
setting density (without an underscore) will set the density of the Box2D object if it has been created, as well as setting "_density". It's a setter method. If you set "_density" after creation, it wont do anything.


Top
 Profile  
 
PostPosted: Wed Feb 16, 2011 9:56 am 
Offline

Joined: Mon Jul 12, 2010 2:15 am
Posts: 47
Oh ok thank ya.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group