adding image in runtime to a supertile

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
kuzniz
Posts: 19
Joined: 05 Jan 2012, 07:21

adding image in runtime to a supertile

Post by kuzniz »

Hi,

I aould like to add in runtime an image for a supertile placed on the map, what approch to take ?

shachar
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: adding image in runtime to a supertile

Post by Bax »

I think the tile should already contain the image, as an hidden skin. Then you could have a method on the skin's class to make it visible when needed.

Otherwise you have to add an empty skin with a name to a tile, then use the Tile.getSkinByName method to access it and add the new image to it dynamically.
Paolo Bax
The SmartFoxServer Team
Post Reply