♻️ plugin api
This commit is contained in:
@@ -32,7 +32,8 @@ internal class AuthorizeSuccessHandler: Handler
|
||||
{
|
||||
var playerId = buffer.ReadString();
|
||||
var playerName = buffer.ReadString();
|
||||
var playerPayload = buffer.ReadString();
|
||||
|
||||
_listenerList.OnAuthorizationSuccess(playerId, playerName);
|
||||
_listenerList.OnAuthorizationSuccess(playerId, playerName, playerPayload);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -19,11 +19,11 @@ using Ragon.Protocol;
|
||||
|
||||
namespace Ragon.Client;
|
||||
|
||||
internal class EntityDestroyHandler: Handler
|
||||
internal class EntityRemoveHandler: Handler
|
||||
{
|
||||
private readonly RagonEntityCache _entityCache;
|
||||
|
||||
public EntityDestroyHandler(RagonEntityCache entityCache)
|
||||
public EntityRemoveHandler(RagonEntityCache entityCache)
|
||||
{
|
||||
_entityCache = entityCache;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ namespace Ragon.Client
|
||||
_handlers[(byte)RagonOperation.PLAYER_LEAVED] = new PlayerLeftHandler(_entityCache, _playerCache, _listenerList);
|
||||
_handlers[(byte)RagonOperation.LOAD_SCENE] = new SceneLoadHandler(this, _listenerList);
|
||||
_handlers[(byte)RagonOperation.CREATE_ENTITY] = new EntityCreateHandler(this, _playerCache, _entityCache);
|
||||
_handlers[(byte)RagonOperation.REMOVE_ENTITY] = new EntityDestroyHandler(_entityCache);
|
||||
_handlers[(byte)RagonOperation.REMOVE_ENTITY] = new EntityRemoveHandler(_entityCache);
|
||||
_handlers[(byte)RagonOperation.REPLICATE_ENTITY_STATE] = new StateEntityHandler(_entityCache);
|
||||
_handlers[(byte)RagonOperation.REPLICATE_ENTITY_EVENT] = new EntityEventHandler(this, _playerCache, _entityCache);
|
||||
_handlers[(byte)RagonOperation.SNAPSHOT] = new SnapshotHandler(this, _listenerList, _entityCache, _playerCache);
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Ragon.Client
|
||||
_playerLeftListeners.Remove(listener);
|
||||
}
|
||||
|
||||
public void OnAuthorizationSuccess(string playerId, string playerName)
|
||||
public void OnAuthorizationSuccess(string playerId, string playerName, string payload)
|
||||
{
|
||||
foreach (var listener in _authorizationListeners)
|
||||
listener.OnAuthorizationSuccess(_client, playerId, playerName);
|
||||
|
||||
Reference in New Issue
Block a user