--JPNotification API JPNotification.activate ( sUserToken, sActivationKey ) JPNotification.addObjectObserver ( hObject ) JPNotification.addUserObserver ( hUser ) JPNotification.removeObjectObserver ( hObject ) JPNotification.removeUserObserver ( hUser ) JPNotification.sendNotification ( sNotificationHandler, vParam0, vParam1, ... ) JPNotification.postNotification ( nDelay, sNotificationHandler, vParam0, vParam1, ... ) JPNotification.registerObjectToUserEvents ( hObject ) JPNotification.removeRegisteredObjectToUserEvents ( hObject )
JPNotification allows you to send notifications to objects or users AIModels.
Any object or user can register to a specific event. At any time, if you decided to trigger this event, all of the AIModels registered to this event will be notified. It is very useful, who can tell he has never be in need of this feature at a time in the development of a game?
JPNotification also offers a very interesting feature: the possibility for objects to receive events that are usually sent to users. For instance, an object will be able to know the joypad position or the state of the keyboard keys.