mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix(SyncSet): Change Callback to Action
This commit is contained in:
parent
bed7e81555
commit
527b754061
@ -6,8 +6,7 @@ namespace Mirror
|
|||||||
{
|
{
|
||||||
public class SyncSet<T> : SyncObject, ISet<T>
|
public class SyncSet<T> : SyncObject, ISet<T>
|
||||||
{
|
{
|
||||||
public delegate void SyncSetChanged(Operation op, T item);
|
public Action<Operation, T> Callback;
|
||||||
public event SyncSetChanged Callback;
|
|
||||||
|
|
||||||
protected readonly ISet<T> objects;
|
protected readonly ISet<T> objects;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public void CallbackTest()
|
|||||||
{
|
{
|
||||||
bool called = false;
|
bool called = false;
|
||||||
|
|
||||||
clientSyncSet.Callback += (op, item) =>
|
clientSyncSet.Callback = (op, item) =>
|
||||||
{
|
{
|
||||||
called = true;
|
called = true;
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ public void CallbackRemoveTest()
|
|||||||
{
|
{
|
||||||
bool called = false;
|
bool called = false;
|
||||||
|
|
||||||
clientSyncSet.Callback += (op, item) =>
|
clientSyncSet.Callback = (op, item) =>
|
||||||
{
|
{
|
||||||
called = true;
|
called = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user