JPNotification

JPNotification

Send notifications to object or user. Objects can now receive user events.
Version : 2.0
Price : $20
State : Out

Changelog

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.

API

--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 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.