0
votes

I am new to cocos2d and i went through many tutorials on tiled map . And than , I have made one tmx map using tiled. In that i made one meta layer. Now, i stuck at one issue, i want to invisible my meta layer in my map .i used this code

[self.meta.visible = no];

meta layer is my first tile layer. i want to invisible this just for better view & i also trying for collision detection .i have also added my layer & set its property like following

CCTMXLayer * Layer;

@property (atomic,retain) CCTMXLayer * Layer;

[self addchild:self.meta];

Now, I don't know how to do this?

1
just read your question twice and cannot understand what do you want to implement... - Morion
@Morion : i want make my meta layer invisible in my map in cocos2D , i have added 2 layers in one tileset in my map using Tiled editor . now in my game i don't want that meta layer part visible becauase i was using that only for collision detection . now , i hope u got some idea . - shaqir saiyed
be specific on question. try to edit question..instead of it in comments - iPhoneProcessor

1 Answers

0
votes

Try this code. Use Meta layer name according to your tileMap.

CCTMXLayer *meta = [tileMap layerNamed:@"Meta"];
meta.visible = NO;

See this image, names are case sensitive.

enter image description here