ios - Cocos2D physics collision delegate -


I started learning coco 2D and tried to handle the phantom collision with new physics features, but the method ccPhysicsCollisionBegin always Accidents with

CCPhysicsCollisionBegin Representative methods must return a BOOL.

This is the complete method

  - (BOOL) ccPhysicsCollisionBegin: (CCFishix Cleanson Peer *) Pair Monsters Coalition: (CCNode *) Monster Projectile: Peripheral ( CCNOD *) projectile {[exorcised head;]; [Projectile chief]; Yes come back }   

In this way I add my phantom

  CCSprite * projectile = [CCSprite spriteWithImageNamed: @ "projectile.png"]; Progligistics = _ Player. Projector. PhysicsBody = [Scyphicus body body variationofradias: Progelil Consentixin / Vithth / 2.0 F and Center: Progekl. Tankpoint Inpoints]; Projector: PhysicsBodyCoolingGroup = @ "" Player Group "; Projector. PhysicsBody Collation Type = @ "Projectile Cleansing"; [_physicsWorld addChild: projectile]; Monster.position = ccp (self.contentSize.width + monster.contentSize.width / 2, randomY); Monster.physicsBody = [With Cephiforms Body Body: (CGRTact) {CPPVenzero, Monster Content Size} Conradides: 0]; monster.physicsBody.collisionGroup = @ "monsterGroup"; Monster.physicsBody.collisionType = @ "monsterCollision"; [_physicsWorld addChild: monster];   

How can I fix this problem? I'm running Xcode 5.1.1 and Cocos 2D 3.0 on OSX 10.9.2. First of all, check whether you are setting up what your conflicts representative class usually is. , This is your class, in which the world context is:

  [mainClass.world setColisionDelegate: mainClass];   

Therefore, in this mainClass you need to apply these 4 methods:

  one ???? CcPhysicsColisionBegin: Type A: typeB: A ???? CcPhysicsCollisionPreSolve: Type A: typeB: A ???? CcPhysicsColisionPostSolve: Type A: typeB: A ???? CcPhysicsCollisionSeparate: typeA: typeB:   

P: You are implementing the method ccPhysicsColisionBegin: monsterCollision: Projective Collision: . This method is custom in you. You need to implement ccPhysicsCollisionBegin: typeA: instead of typeB:

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -