Cocos2d-XNA has all CCLayers as receivers of GamePad updates. What you need to do is enable the GamePad dispatcher at the start of your game. You do this from the Game constructor at some point at the end of your game initialization.

CCDirector.SharedDirector.GamePadEnabled = true;


Once you do this, your CCLayer classes will begin to receive GamePadState updates. It's up to your code to manage how these state updates are handled in your game.

The GamePad is the XNA GamePad, so you will receive button updates as if your game was running on an Xbox 360.

Last edited Jan 12, 2013 at 9:23 PM by totallyevil, version 1

Comments

No comments yet.