RolePlayingDesign: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
Line 202: Line 202:
RPWorld provides onInit and onFinish methods that are called on server init and server finalization to define what to do with world on these events. There is no default behaviour and you need to extend this class to redefine the behaviour.
RPWorld provides onInit and onFinish methods that are called on server init and server finalization to define what to do with world on these events. There is no default behaviour and you need to extend this class to redefine the behaviour.


Also it provides methods for adding and getting new RPZones:
* addRPZone
* getRPZone, which can be used with either RPZone.ID or RPObject.ID


Finally it also contains methods for managing RPObjects as:
* addRPObject, that need that our RPObject contains a valid RPZone.ID inside its RPObject.ID
* getRPObject
* modifyRPObject
* changeZone that moves one object from the old zone to the new zone and adds a proper valid id.

At last, RPWorld also contains a method called nextTurn that is called by RPManager to move from one turn to the next turn. It mainly reset the delta<sup>2</sup> data.


==RPZone==
==RPZone==