Out with MagicOnion, in with LiteNetLib

Removed MagicOnion
Added LiteNetLib
Created client and server abstractions
Fixed serialization bugs
This commit is contained in:
hyperion51 2020-03-24 14:36:22 +00:00
commit e96146b7bb
869 changed files with 59401 additions and 16812 deletions

View file

@ -0,0 +1,28 @@
using System;
using System.Collections;
using System.Collections.Generic;
public abstract class NotAnActionCollection{}
public class ActionCollection<T> : NotAnActionCollection where T : Message
{
private List<Action<T>> _actions = new List<Action<T>>();
public void Add(Action<T> action)
{
_actions.Add(action);
}
public void Invoke(T message)
{
foreach (var action in _actions)
{
action(message);
}
}
public void Clear()
{
_actions.Clear();
}
}