Base plugin class that should be extended to make custom ones. More...
Public Member Functions | |
PluginBase () | |
Constructor. More... | |
virtual void | BeforeCloseGame (IBeforeCloseGameCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | BeforeJoin (IBeforeJoinGameCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | BeforeSetProperties (IBeforeSetPropertiesCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | OnCloseGame (ICloseGameCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | OnCreateGame (ICreateGameCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | OnJoin (IJoinGameCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | OnLeave (ILeaveGameCallInfo info) |
Calls info.Continue(). Override to change. Handles MasterClient switch if needs be. (if the leaving actor is MasterClient) More... | |
virtual void | OnRaiseEvent (IRaiseEventCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | OnSetProperties (ISetPropertiesCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual void | OnSetPropertiesFailed (ISetPropertiesFailedCallInfo info) |
Calls info.Continue(). Override to change. More... | |
virtual bool | OnUnknownType (Type type, ref object value) |
Does nothing. Override to change. More... | |
virtual bool | SetupInstance (IPluginHost host, Dictionary< string, string > config, out string errorMsg) |
Initialize plugin instance. More... | |
Static Public Attributes | |
static Version | PluginsVersion = new Version(1, 2) |
static Version | BuildVersion = new Version() |
Protected Member Functions | |
virtual void | OnChangeMasterClientId (int oldId, int newId) |
MasterClient change callback. More... | |
virtual void | ReportError (short errorCode, Exception exception, object state) |
Does nothing. Override to change. More... | |
virtual void | StrictModeCheck (ICallInfo info) |
void | BroadcastEvent (byte code, Dictionary< byte, object > data) |
Broadcast event to all actors joined to the room. More... | |
Protected Attributes | |
bool | fireAssert = true |
Flag to skip debug asserts used during testing More... | |
Properties | |
IPluginHost?? | PluginHost [get, protected set] |
Reference to the game hosting the plugin. More... | |
string | AppVersion [get] |
Version of the application to which this plugin belongs to. More... | |
string | AppId [get] |
ID of the application to which this plugin belongs to. More... | |
string | Region [get] |
Cloud region to which the application is connected to. More... | |
string | Cloud [get] |
Type of cloud the application is connected to. Public or Enterprise. More... | |
string | EnvironmentVerion [get] |
Full string environment information. More... | |
virtual string | Name [get] |
Name of the plugin. Default is not allowed. This should be the name used when requesting the plugin from the client in CreateGame operation. This will be returned to the client in the CreateGame operation response. More... | |
virtual string | Version [get] |
Version of the plugin. This will be returned to the client in the CreateGame operation response. More... | |
virtual bool | IsPersistent [get] |
Indicates whether or not serialized room state should be persisted between sessions. More... | |
bool | UseStrictMode [get, protected set] |
Indicates whether the plugin uses strict mode or not. If a plugin is in "strict mode" then all callbacks should be processed one of the available methods. If plugin version >= 1.0 then this should be true. If plugin version <= 0.9 then this should be false. More... | |
Properties inherited from Photon.Hive.Plugin.IGamePlugin | |
string | Name [get] |
Name of the plugin. Default is not allowed. This should be the name used when requesting the plugin from the client in CreateGame operation. This will be returned to the client in the CreateGame operation response. More... | |
string | Version [get] |
Version of the plugin. This will be returned to the client in the CreateGame operation response. More... | |
bool | IsPersistent [get] |
Flag used with webhooks plugin to indicate whether or not rooms should be persisted between connections. If true, SerializedGameState should be sent to web service before removing the room from memory. Also it could be loaded in OnCreateGame or BeforeJoin. More... | |
Base plugin class that should be extended to make custom ones.
|
inline |
Constructor.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlineprotected |
Broadcast event to all actors joined to the room.
code | Event code. |
data | Event data. |
|
inlineprotectedvirtual |
MasterClient change callback.
oldId | Actor number of the old MasterClient. |
newId | Actor number of the new MasterClient. |
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change. Handles MasterClient switch if needs be. (if the leaving actor is MasterClient)
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Calls info.Continue(). Override to change.
info | Data passed in the callback call. |
|
inlinevirtual |
Does nothing. Override to change.
type | The Type of the object. |
value | The object with unknown type. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlineprotectedvirtual |
Does nothing. Override to change.
errorCode | Code of the error. Photon.Hive.Plugin.ErrorCodes |
exception | Exception thrown. |
state | Optional object to be added in the report. It could help in debugging the error. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlinevirtual |
Initialize plugin instance.
host | The game hosting the plugin. |
config | The plugin assembly key/value configuration entries. |
errorMsg | Error message in case something wrong happens when setting up the plugin instance. |
Implements Photon.Hive.Plugin.IGamePlugin.
|
inlineprotectedvirtual |
|
protected |
Flag to skip debug asserts used during testing
|
get |
ID of the application to which this plugin belongs to.
|
get |
Version of the application to which this plugin belongs to.
|
get |
Type of cloud the application is connected to. Public or Enterprise.
|
get |
Full string environment information.
|
get |
Indicates whether or not serialized room state should be persisted between sessions.
This is mainly related to webhooks plugin in particular.
|
get |
Name of the plugin. Default is not allowed. This should be the name used when requesting the plugin from the client in CreateGame operation. This will be returned to the client in the CreateGame operation response.
|
getprotected set |
Reference to the game hosting the plugin.
|
get |
Cloud region to which the application is connected to.
|
getprotected set |
Indicates whether the plugin uses strict mode or not. If a plugin is in "strict mode" then all callbacks should be processed one of the available methods. If plugin version >= 1.0 then this should be true. If plugin version <= 0.9 then this should be false.
|
get |
Version of the plugin. This will be returned to the client in the CreateGame operation response.