示例#1
0
		void OnListening(WolfEventArgs eventArgs) {
			if(eventArgs.Listening != null)
				_listening = eventArgs.Listening;
		}
		public static void TriggerWolfChangeState(WolfEventArgs eventArgs = null) {
			if (WolfChangeState != null)
				WolfChangeState (eventArgs);
		}
		public static void TriggerWolfListening(WolfEventArgs eventArgs = null) {
			if (WolfListening != null)
				WolfListening (eventArgs);
		}
示例#4
0
		void OnWolfStateChange(WolfEventArgs e) {
			if (travelling && e.State == Wolf.STATE_AWAKEN) {
				// Don't try to go back if we already are at origin position
				if (checkIfAlreadyAtOrigin())
					return;
			
				goBack ();
			} else {
				afterGoingBack ();
			}
		}