VastPark PluginFramework¶
Now available via Nuget
The VastPark.PluginFramework library aims to simplify the amount of work developers need to do in order to write plugin code for VastPark.
Reusable network and input controllers are included, as is a base class that implements IPluginComponent with virtual methods (the VastPark plugin interface).
PluginBase¶
When creating a plugin that uses the VastPark.PluginFramework library, you'll want to inherit your class from PluginBase, which implements the required framework interfaces IPluginComponent and IParkObject. Additionally, PluginBase sets up an ILogProvider on disk and supports the addition and removal of IController instances to the plugin update cycle:
Network clients¶
Most of the time, plugins will need to take into consideration each individual network client's needs.
The PluginFramework makes this easy by convention as each remote client is represented by an INetworkReceiver instance:
Upon connection, a receiver for each network client is generated:
Each incoming message is routed into the receiver associated with that specific client:
When a client disconnects, the receiver is removed: