Thursday, 15 May 2014

ios - Why is there a collision error when I load my Swift game on any device other than the iPhone 6? -


Due to some reason when I load my sailing game on another device other than an iPhone 6 then it would be an error is. As soon as I open it, and not when there is a real conflict, I am using SpriteBilder and Xcode for this app. It says, CCPhysicsCollisionBegin Representative methods should return a BOOL , but when I load it on the iPhone, there is no error, I have examined all my collision methods, and they all have a Booleanians return. any idea? Here is an example of one of my confrontation methods.

  func ccPhysicsCollisionBegin (pair: seismographics, peer !, boat: ccnode !, life: ccnd!) - & gt;  

Just like the other methods, it actually returns a boolean back.

After some sharp digging stackoverflow, I got the answer. Obviously, my version of Cocos 2D was written in Objective-C, so instead of returning to bool , I should have returned ObjCBool ​​ It helps anyone who has the same problem!


No comments:

Post a Comment