diff --git a/Runtime/GameEventMgr.cs b/Runtime/GameEventMgr.cs index ea558a0..e4a45fc 100644 --- a/Runtime/GameEventMgr.cs +++ b/Runtime/GameEventMgr.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using UnityEngine; -namespace Guru +namespace DofLibrary { public class GameEventMgr diff --git a/Runtime/GameKcpClient.cs b/Runtime/GameKcpClient.cs index ee00a3f..97daccd 100644 --- a/Runtime/GameKcpClient.cs +++ b/Runtime/GameKcpClient.cs @@ -116,7 +116,7 @@ namespace DofLibrary if (OnConnected != null) { - Loom.QueueOnMainThread(() => + LoomUtil.QueueOnMainThread(() => { OnConnected.Invoke(); }); @@ -139,7 +139,7 @@ namespace DofLibrary if (msg is ServerMessage server_msg) { - Loom.QueueOnMainThread(() => + LoomUtil.QueueOnMainThread(() => { ProcessMessage(server_msg); }); @@ -169,7 +169,7 @@ namespace DofLibrary Debug.Log("[GameKcpClient]: Connection closed"); if (OnDisConnected != null) { - Loom.QueueOnMainThread(() => + LoomUtil.QueueOnMainThread(() => { OnDisConnected.Invoke(); }); diff --git a/Runtime/Loom.cs b/Runtime/LoomUtil.cs similarity index 96% rename from Runtime/Loom.cs rename to Runtime/LoomUtil.cs index c06abe2..84aa5be 100644 --- a/Runtime/Loom.cs +++ b/Runtime/LoomUtil.cs @@ -3,17 +3,17 @@ using System.Collections.Generic; using System.Threading; using UnityEngine; -namespace Guru +namespace DofLibrary { // Loom lets you easily run code on another thread and have that other thread run code on the main game thread when it needs to. - public class Loom : MonoBehaviour + public class LoomUtil : MonoBehaviour { public static int maxThreads = 10; private static int numThreads; - private static Loom _instance; + private static LoomUtil _instance; - public static Loom Instance + public static LoomUtil Instance { get { @@ -39,7 +39,7 @@ namespace Guru initialized = true; var g = new GameObject("Loom"); DontDestroyOnLoad(g); - _instance = g.AddComponent(); + _instance = g.AddComponent(); } } diff --git a/Runtime/Loom.cs.meta b/Runtime/LoomUtil.cs.meta similarity index 100% rename from Runtime/Loom.cs.meta rename to Runtime/LoomUtil.cs.meta diff --git a/Runtime/ProtobufHelper.cs b/Runtime/ProtobufHelper.cs index 62a8f40..2557ae8 100644 --- a/Runtime/ProtobufHelper.cs +++ b/Runtime/ProtobufHelper.cs @@ -2,7 +2,7 @@ using System.IO; using ProtoBuf.Meta; -namespace Guru +namespace DofLibrary { public interface ISupportInitialize {