Files
Ragon/Ragon.Relay/Sources/RelayRoomPlugin.cs
T

37 lines
694 B
C#
Raw Normal View History

2023-04-09 10:52:18 +04:00
using System;
using Ragon.Server;
2023-04-09 11:06:52 +04:00
using Ragon.Server.Entity;
using Ragon.Server.Plugin;
using Ragon.Server.Room;
2023-04-09 10:52:18 +04:00
namespace Ragon.Relay;
2023-04-13 20:42:05 +04:00
public class RelayRoomPlugin: BaseRoomPlugin
2023-04-09 10:52:18 +04:00
{
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;
}
}