ios7 - Make sprites unmovable -


i have created spritekit game shape recognition there 2 same shapes 1 @ lower part of scene while other 1 matched @ upper side of scene. creating these shapes calling method other class contain code create shape.

i able things in proper way , works fine. unable find how make upper side shapes static. mean user must able drag lower side shapes upper side shapes matching should not able drag upper side shapes match lower side shapes. have far searched in spritekit programming guide apple there no such clue in that helps me perform above mentioned task.

please me if can.

easy way set name when create them. use constant easy way ensure adding / checking right name.

static nsstring * const kcanmoveme = @"movable"; static nsstring * const kcannotmoveme = @"not-movable";  // example skspritenode *sprite = [skspritenode spritenodewithimagenamed:imagename]; sprite.name = kcanmoveme  skspritenode *sprite2 = [skspritenode spritenodewithimagenamed:imagename]; sprite.name = kcannotmoveme 

then when touch check name , know if can move or not.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -