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

34 lines
612 B
C#
Raw Normal View History

2023-04-09 10:52:18 +04:00
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;
}
}