🚧 plugin system, webhook system
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using Ragon.Server;
|
||||
|
||||
namespace Ragon.Relay;
|
||||
|
||||
public class RelayRoomPlugin: IRoomPlugin
|
||||
{
|
||||
public void Tick(float dt)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnAttached()
|
||||
{
|
||||
Console.WriteLine("Room attached");
|
||||
}
|
||||
|
||||
public void OnDetached()
|
||||
{
|
||||
Console.WriteLine("Room detached");
|
||||
}
|
||||
|
||||
public bool OnEntityCreate(RagonRoomPlayer creator, RagonEntity entity)
|
||||
{
|
||||
Console.WriteLine($"Entity created: {entity.Id}");
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool OnEntityRemove(RagonRoomPlayer destroyer, RagonEntity entity)
|
||||
{
|
||||
Console.WriteLine($"Entity destroyed: {entity.Id}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user