void onReceiveNotification(NSNotification n)
 {
     CCDebug.Log ("Hello I received event from:{0}", n.sender);
 }
예제 #2
0
		public void postNotification(string name, System.Object sender, NSDictionary userInfo=null){
			NSNotification notification = new NSNotification (name, sender, userInfo);
			postNotification (notification);
		}
예제 #3
0
		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);
					}
				}
			}

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

            postNotification(notification);
        }