wip
This commit is contained in:
@@ -11,8 +11,9 @@ namespace Game.Source
|
||||
{
|
||||
_logger.Info("Plugin started");
|
||||
|
||||
Subscribe<TestEvent>(123, OnTestEvent);
|
||||
Subscribe(500, OnTestEvent2);;
|
||||
/*Subscribe<TestEvent>(123, OnTestEvent);
|
||||
*/
|
||||
// Subscribe(500, OnTestEvent2);;
|
||||
}
|
||||
|
||||
private void OnTestEvent2(Player obj)
|
||||
@@ -53,7 +54,7 @@ namespace Game.Source
|
||||
public override void OnEntityCreated(Player creator, Entity entity)
|
||||
{
|
||||
// entity.
|
||||
Subscribe<TestEvent>(entity, 123, OnEntityTestEvent);
|
||||
// Subscribe(entity, 500, OnEntityTestEvent);
|
||||
}
|
||||
|
||||
public override void OnEntityDestroyed(Player destoyer, Entity entity)
|
||||
@@ -61,9 +62,9 @@ namespace Game.Source
|
||||
|
||||
}
|
||||
|
||||
private void OnEntityTestEvent(Player player, Entity entity, TestEvent data)
|
||||
private void OnEntityTestEvent(Player player, Entity entity)
|
||||
{
|
||||
|
||||
_logger.Info("Entity event with empty payload");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,11 +175,15 @@ namespace Ragon.Core
|
||||
}
|
||||
case RagonOperation.REPLICATE_ENTITY_EVENT:
|
||||
{
|
||||
|
||||
var evntCodeData = rawData.Slice(2, 2);
|
||||
var entityIdData = rawData.Slice(4, 4);
|
||||
var evntId = RagonHeader.ReadUShort(ref evntCodeData);
|
||||
var entityId = RagonHeader.ReadInt(ref entityIdData);
|
||||
|
||||
if (!_entities.ContainsKey(entityId))
|
||||
return;
|
||||
|
||||
if (_entities[entityId].OwnerId != peerId)
|
||||
return;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ Ragon is fully free high perfomance room based game server with plugin based arc
|
||||
|
||||
### Features:
|
||||
- Free
|
||||
- Simple matchmaking
|
||||
- Flexiable API
|
||||
- Support client authoritative
|
||||
- Support server authoritative
|
||||
@@ -28,6 +29,7 @@ Ragon is fully free high perfomance room based game server with plugin based arc
|
||||
- UDP
|
||||
|
||||
### Roadmap:
|
||||
- Allow customize matchmaking
|
||||
- Use native memory
|
||||
- Reduce allocations
|
||||
- Dashboard for monitoring entities and players in realtime
|
||||
|
||||
Reference in New Issue
Block a user