void onReceiveNotification(NSNotification n)
 {
     CCDebug.Log ("Hello I received event from:{0}", n.sender);
 }
		public void postNotification(string name, System.Object sender, NSDictionary userInfo=null){
			NSNotification notification = new NSNotification (name, sender, userInfo);
			postNotification (notification);
		}
		public void postNotification(NSNotification n){
			List<NSNotificationObserver> observers = observersForName (n.name);
			if (observers == null) return;
			for(int i=observers.Count-1; i>=0; i--){
				NSNotificationObserver observer = observers[i];
				List<NSNotificationSelectorAndSender> selectorAndSenders = observer.selectorAndSenders;
				for(int j=selectorAndSenders.Count - 1; j>=0; j--){
					NSNotificationSelectorAndSender selectorAndSender = selectorAndSenders[j];
					if(selectorAndSender.sender == null || selectorAndSender.sender == n.sender){
						selectorAndSender.selector(n);
					}
				}
			}

		}
Esempio n. 4
0
        public void postNotification(string name, System.Object sender, NSDictionary userInfo = null)
        {
            NSNotification notification = new NSNotification(name, sender, userInfo);

            postNotification(notification);
        }