JPNotification
Envoyez des notifications aux objets et aux users. Les objets peuvent recevoir les events des users.
Téléchargements
Démo et samples
v2.0
- Now compatible with ShiVa 2.0.
- Plugin API compiled for Mac and Linux in addition to Windows : it will provide API completion in the Script module in ShiVa Editor for each of these operating systems.
- Now uses a user token instead of an email to activate
v1.6
- Optimized for ShiVa 1.9.2
v1.5
- The pack is now able to forward events from JPShortcut.
v1.4
- Internal modifications to prevent eventual conflicts between packs.
v1.3
- Objects can now register to receive user events. It also works for gesture events sent by JPGesture.
- JPNotification.postNotification: nDelay parameter moved from position #1 to position #0
v1.2
- Fixed a random issue blocking the activation of the pack
v1.1
- Error messages now are easier to understand.
--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 )
Description
JPNotification vous permet d'envoyer des notifications à des AIModels d'objets ou de users
Tout objet ou user peut s'enregistrer afin de recevoir un évènement spécific. A n'importe quel moment, si vous décidez d'envoyer cet évènement, tous les AIModels qui se sont enregistrées vont être notifiés. C'est très utile, qui peut dire qu'il n'a jamais eu besoin de cette fonctionalité à un moment donné dans le développement d'un jeu ?
JPNotification offre également une fonctionnalité très intéressante : la possibilité pour les objets de recevoir les évènements habituellement envoyés aux users. Par exemple, un objet sera en mesure de connaitre la position du joypad ou bien l'état des touches du clavier.

