25 | | === External API === |
| 25 | == External API == |
| 26 | === Synchronisable === |
| 27 | The most important part of the Network API is the Synchronisable Class (see also [wiki:network/Synchronisable Synchronisable]): |
| 28 | * This class provides the functionality for objects to get synchronised over the network: |
| 29 | * registerVar(): this function registers a variable (in the Network Engine) that needs synchronisation |
| 30 | * create |
| 31 | * Every class that needs synchronisation must fullfill some dependencies: |
| 32 | * It must (public) inherit from Synchronisable |
| 33 | * It must have a default constructor |
| 34 | * All steps in object creation that need data (from the levelfile or the network) must be in the create() function |
| 35 | * It must implement the following functions: |
| 36 | * registerAllVariables: register all variables (currently only basic types and strings) to the network engine by calling either [wiki:network/registerdata REGISTERDATA] or [wiki:network/registerstring REGISTERSTRING] |
| 37 | * create: (as described above) |
| 38 | === Host === |