Slick Forums

Discuss the Slick 2D Library
It is currently Sat May 25, 2013 11:44 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Dec 30, 2008 3:13 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1315
Location: Italy
Hi!
My request is simple: when i load tiled map, i need to change on the fly the corrisponding tileset image.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 1:02 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
You should now be able to use something like:

Code:
map.getTileSet(0).setImage(new Image("myothertileset.png"));


Assuming it conforms to the same dimensions and configuration as your original tileset it should swap out.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 10:42 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1315
Location: Italy
kevglass wrote:
You should now be able to use something like:

Code:
map.getTileSet(0).setImage(new Image("myothertileset.png"));


Assuming it conforms to the same dimensions and configuration as your original tileset it should swap out.

Kev


tnx kev :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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