why collision not working , cocos2d v3?

后端 未结 1 1884
情书的邮戳
情书的邮戳 2021-01-25 03:12

i create simple game like flapy bird with cocos2d v3 . Interface class:

@interface GameScene : CCScene

// ------------------         


        
相关标签:
1条回答
  • 2021-01-25 03:28

    Change

    -(BOOL)ccPhysicsCollisionBegin:(CCPhysicsCollisionPair *)pair typeA:(CCNode *)nodeA typeB:(CCNode *)nodeB{
    

    To:

    -(BOOL)ccPhysicsCollisionBegin:(CCPhysicsCollisionPair *)pair tubeCollision:(CCNode *)nodeA birdCollision:(CCNode *)nodeB{
    

    You have the example code of the collision delegate, so you have to adapt it to your code with your nodeA that is the tube and nodeB the bird.

    0 讨论(0)
提交回复
热议问题