Slick Forums

Discuss the Slick 2D Library
It is currently Wed Oct 17, 2018 12:43 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: RFE: Body Name.
PostPosted: Mon Feb 09, 2009 6:57 pm 
Offline
Regular
User avatar

Joined: Thu Dec 18, 2008 6:07 pm
Posts: 238
Location: Bournemouth, UK
There is a constructor:
Code:
new Body(DynamicShape shape, float m);


...and a constructor:
Code:
new Body(String name, DynamicShape shape, float m);


However, there is no method:
Code:
Body.setName(String name);

or any method:
Code:
Body.getName();


These simple methods would be nice. :)

_________________
- Gwinnell (irc.freenode.net, irc.chatspike.net)
- Game Jolt Moderator


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2009 7:48 pm 
Offline
Oldbie

Joined: Tue Jun 17, 2008 5:11 pm
Posts: 336
One thing I've found useful is simply setting the user data. I tend to pass the entire object in but I suppose you could pass a string name or other identifier:

Code:

Body b;
...

String name = "foobar";
b.setUserData(name);

...

b.getUserData().equals("foobar");

_________________
My website about game development http://anotherearlymorning.com


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group