Here you can find descriptions of event handling of cocos2d-unity. All the api of cocos2d-unity is the same with cocos2d-objc, so you can check the API documents of cocos2d-objc for more detail. You can download the completed project here(cocos2d-unity-demo).

CCLayer

Sample for handling events of CCLayer


                    public class HelloEvents : CCLayer
                    {
                        public static CCScene  Scene()
                        {
                            CCScene scene = new CCScene();
                            HelloEvents layer = new HelloEvents();
                            scene.addChild(layer);
                            return scene;
                        }
                    
                        public HelloEvents(){
                            this.isTouchEnabled = true;
                            this.touchPriority = 10;
                    
                            //kCCTouchesMode.OneByOne mode is needed to recived single touch event
                            this.touchMode = kCCTouchesMode.OneByOne;
                        }
                    
                        public override bool ccTouchBegan (UITouch touch)
                        {
                            Vector2 touchPoint = convertTouchToNodeSpace (touch);
                            CCDebug.Log ("Touch:{0}", touchPoint);
                            return true;
                        }
                    
                        public override void ccTouchMoved (UITouch touch)
                        {
                        }
                    
                        public override void ccTouchEnded (UITouch touch)
                        {
                        }
                    
                        public override void ccTouchCancelled (UITouch touch)
                        {
                        }
                    }
					
NSNotification

You can handle events like you always do in obj-c.


        public class HelloNSNotification : CCLayer
        {
            public static CCScene  Scene()
            {
                CCScene scene = new CCScene();
                HelloNSNotification layer = new HelloNSNotification();
                scene.addChild(layer);
                return scene;
            }
            public HelloNSNotification(){
                HelloNSNotificationReceiver receiver = new HelloNSNotificationReceiver ();
                addChild (receiver);
        
                HelloNSNotificationSender sender = new HelloNSNotificationSender ();
                addChild (sender);
            }
        }
        
        //receiver
        public class HelloNSNotificationReceiver : CCNode{
            public override void onEnter ()
            {
                base.onEnter ();
                
                //regist event listener to NSNotificationCenter
                NSNotificationCenter.defaultCenter.addObserver (this, onReceiveNotification, "HelloNSNotification");
            }
            
            public override void onExit ()
            {
                //remove event listener
                NSNotificationCenter.defaultCenter.removeObserver (this);
                base.onExit ();
            }
            
            void onReceiveNotification(NSNotification n){
                CCDebug.Log ("Hello I received event from:{0}", n.sender);
            }
        }
        
        //sender
        public class HelloNSNotificationSender : CCNode{
            public HelloNSNotificationSender(){
                //create a button to trigger event
                Vector2 size = CCDirector.sharedDirector.winSize;
                CCMenuItemFont.FontSize = 28;
                CCMenuItem button1 = new CCMenuItemFont("Cocos2d", onButtonTouched);
                button1.userTag = "Cocos2d";
        
                CCMenuItem button2 = new CCMenuItemFont("Unity", onButtonTouched);
                button2.userTag = "Unity";
        
                CCMenu menu = new CCMenu(button1, button2);
                menu.alignItemsHorizontallyWithPadding(20);
                menu.position = new Vector2(size.x/2, size.y/2 - 50);
                addChild(menu);
            }
            
            void onButtonTouched(object button){
                NSNotificationCenter.defaultCenter.postNotification ("HelloNSNotification", button);
            }
        }
					
Mouse Events

                    //sample for handling events of CCLayer
                    public class HelloMouseEvent : CCLayer
                    {
                        public static CCScene  Scene()
                        {
                            CCScene scene = new CCScene();
                            HelloMouseEvent layer = new HelloMouseEvent();
                            scene.addChild(layer);
                            return scene;
                        }
                        
                        public HelloMouseEvent(){
                            //only pc/mac/web version has mouse events
                            #if UNITY_STANDALONE || UNITY_WEBGL
                            this.isMouseEnabled = true;
                            this.mousePriority = 10;
                            #endif
                        }
                    
                        #if UNITY_STANDALONE || UNITY_WEBGL
                        
                        public override bool ccMouseDown (NSEvent theEvent)
                        {
                            Vector2 touchPoint = convertMouseEventToNodeSpace (theEvent);
                            CCDebug.Log ("ccMouseDown:{0}", touchPoint);
                            return true;
                        }
                    
                        public override bool ccMouseUp (NSEvent theEvent)
                        {
                            return true;
                        }
                    
                        public override bool ccMouseEntered (NSEvent theEvent)
                        {
                            return true;
                        }
                    
                        public override bool ccMouseExited (NSEvent theEvent)
                        {
                            return true;
                        }
                    
                        public override bool ccMouseMoved (NSEvent theEvent)
                        {
                            return true;
                        }
                    
                        public override bool ccMouseDragged (NSEvent theEvent)
                        {
                            return true;
                        }
                    
                        #endif
                    }
                   
Keyboard Events

                    //sample for handling events of CCLayer
                    public class HelloKeyboardEvent : CCLayer
                    {
                        public static CCScene  Scene()
                        {
                            CCScene scene = new CCScene();
                            HelloKeyboardEvent layer = new HelloKeyboardEvent();
                            scene.addChild(layer);
                            return scene;
                        }
                        
                        public HelloKeyboardEvent(){
                            //only pc/mac/web version has mouse events
                            #if UNITY_STANDALONE || UNITY_WEBGL
                            this.isKeyboardEnabled = true;
                            this.keyboardPriority = 10;
                            #endif
                        }
                        
                        #if UNITY_STANDALONE || UNITY_WEBGL
                        
                        public override bool ccKeyDown (NSEvent theEvent)
                        {
                            CCDebug.Log ("ccKeyDown={0}", theEvent.keyCode);
                            return true;
                        }
                    
                        public override bool ccKeyUp (NSEvent theEvent)
                        {
                            CCDebug.Log ("ccKeyUp={0}", theEvent.keyCode);
                            return true;
                        }
                    
                        #endif
                    }