Event System
hard_drive
0 MB
folder
3 files
build
Engine v10
history
Last update 993d ago
About This Package
About Event System
public partial class MyClass
{
public MyClass(){
EventSystem.EventCommand.RegisterServerEvent<int, string>( "server:test_event", this.EventTest2 );
EventSystem.EventCommand.RegisterGameEvent<int, string>( "game:test_event", this.EventTest );
}
public void EventTest(IClient client,int arg1, string arg2)
{
Log.Info( "eventExecuted" );
Log.Info( arg1 );
Log.Info( arg2 );
//Call Server event with TriggerServerEvent
EventSystem.EventCommand.TriggerServerEvent( "server:test_event", 1, "uno" );
}
public void EventTest2( IClient client, int arg1, string arg2 )
{
Log.Info( "eventExecuted" );
Log.Info( arg1 );
Log.Info( arg2 );
}
}
//call Client Event with TriggerClientEvent
EventSystem.EventCommand.TriggerClientEvent( client, "game:test_event", 1,"uno");You can put up to 6 arguments, I'm working on a version with websockets not necessarily useful but can be good for certain things.
You can declare your event on methods that are not static.
No usage statistics available
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
Package ID:
dicta.event_system
Created:
2023-07-29 04:26 UTC
Updated:
2023-11-09 10:40 UTC
Type:
library
Public:
Yes
Version:
43141
files:
3
Size:
0.0 MB
Engine Version:
10
Asset Version ID:
43141
Version Created:
2023-11-09 10:40 UTC
Hash:
-3477093424955541720
Manifest: Open manifest
Project Template:
Cs Proj Name:
Resources:
Code Package References:
43141
Nov 9, 2023
Changes on 2023-11-09
29843
Aug 2, 2023
add Event system with command, websocket wip
28347
Jul 29, 2023
Event System wip