On Tue, May 31, 2011 at 7:20 AM, Peter Enerccio <[email protected]> wrote:

> Hello, I am currently making a map with RectMapLayer and I found out
> that there is no auto update for every cell.
> That is, if I change the cell's image, it wont redraw itself with a new
> image.
> Any idea on how to do this?
> Thanks, Peter.
>
> --
>


calling
your_rect_map_layer_instance.set_dirty()

should force refresh.

It is a heavy method, so probably you want at most one call per frame:
   have a flag 'tiles_images_change', set it True when you change images
   At some later point in the frame update, when all potential image changes
are done do

if tiles_image_changes:
   tiles_images_changes = False
   rect_map_instance.set_dirty()

Let me know how it goes.

--
claudio

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to