Slick Forums

Discuss the Slick 2D Library
It is currently Thu Dec 05, 2019 9:51 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jan 16, 2013 6:15 pm 
Offline

Joined: Wed Jan 16, 2013 6:13 pm
Posts: 2
I'm using the following code:

Code:
private void buildCollisionMap() throws SlickException
{
   ArrayList<GroupObject> objects = getObjectGroup("Collision").getObjects();
      
   if (objects.size() > 0)
   {
           for(GroupObject object : objects)
           {
              System.out.println(object.width);
              collision.add(new Rectangle(object.x, object.y, object.width, object.height));
           }
   }
}


Printing object.width will return 0, also height will return 0. The object x and y work correctly though. Printing object.name will return nothing.


Top
 Profile  
 
PostPosted: Thu Jan 17, 2013 6:43 pm 
Offline

Joined: Wed Jan 16, 2013 6:13 pm
Posts: 2
It has been fixed. I've posted the fix in the contributions forum!


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