objective c - ideal way for detecting collisions in sprite kit? -


-(void)handlecontact:(skphysicscontact*)contact{      nsarray *nodenames = @[contact.bodya.node.name, contact.bodyb.node.name];      if ([nodename containsobject:player] && [nodename containsobject:window] {  //player , windows defined strings set in skspritenode names          window      } else if ([nodename containsobject:player] && [nodename containsobject:door])          door     } //continue 10 times different defined strings except player  } 

would sort of code ideal collision detection or there better way can face this?


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -