Hey all, I have two classes, GameLayer and EnemyLayer. I am using Chipmunk and @mobilebros SpaceManager. I have a simple version of my app functioning well and responding correctly to physics when my hero and one enemy are added within GameLayer. I want to add multiple enemies and have reference to all of them separately each with it's own cpShape, so I created the enemy class to build my enemies as needed. The problem I ran into was getting a reference to the GameLayer's SpaceManger object so that each new enemy responded correctly. Can anyone advise how I can get that reference to SpaceManager from within my EnemyLayer? I would like to call something like: [EnemyLayer addNewEnemyAtPoint:position1 secondNodePoint:position2 enemyType:1] ;
Should I also be passing a reference to GameLayer's SpaceManager object in that call? Or how should I approach it?