Class EventController
An Event Controller with extra functionality for the server.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: DuneNet.Server.Controllers
Assembly: DuneNet.Server.dll
Syntax
public sealed class EventController : BaseEventController
Methods
InvokeEvent(String, EventArguments, DuneConnection)
Invokes the target clientside event on the provided client.
Declaration
public void InvokeEvent(string eventName, EventArguments eventArguments, DuneConnection targetClientConnection)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventName | The registration name of the event to invoke. |
EventArguments | eventArguments | The arguments the event will be invoked with. Must not be null but can contain no set variables. |
DuneConnection | targetClientConnection | The connection to invoke the event on. |
Remarks
This method does NOT invoke the target event on the server. This method, therefore, works similar to a global scope RPC.
InvokeEvent(String, EventArguments, Boolean)
Invokes the target serverside event.
Declaration
public void InvokeEvent(string eventName, EventArguments eventArguments, bool invokeOnClient = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventName | The registration name of the event to invoke. |
EventArguments | eventArguments | The arguments the event will be invoked with. Must not be null but can contain no set variables. |
System.Boolean | invokeOnClient | Whether the event should be networked. True if the event should be called on clients, False otherwise. |