summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XUtliPoolLib/XCallCommand.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XUtliPoolLib/XCallCommand.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XUtliPoolLib/XCallCommand.cs')
-rw-r--r--Client/Assets/Scripts/XUtliPoolLib/XCallCommand.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XUtliPoolLib/XCallCommand.cs b/Client/Assets/Scripts/XUtliPoolLib/XCallCommand.cs
new file mode 100644
index 00000000..9feea104
--- /dev/null
+++ b/Client/Assets/Scripts/XUtliPoolLib/XCallCommand.cs
@@ -0,0 +1,36 @@
+using System;
+
+namespace XUtliPoolLib
+{
+ public class XCallCommand
+ {
+ public static ExecuteCommandHandler handler = new ExecuteCommandHandler(XCallCommand.Execute);
+
+ public static DebugHandler debugHandler = new DebugHandler(XCallCommand.DebugString);
+
+ public static void DebugString(XGameObject gameObject, XEngineCommand command, string str, int id)
+ {
+ bool flag = command.data != null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddWarningLog2("[EngineCommand] CallCmd {0} ID:{1} data:{2} location:{3} objID:{4}", new object[]
+ {
+ str,
+ id,
+ command.data.data,
+ gameObject.m_Location,
+ gameObject.objID
+ });
+ }
+ }
+
+ public static void Execute(XGameObject gameObject, XEngineCommand command)
+ {
+ bool flag = command.data != null && command.data.commandCb != null;
+ if (flag)
+ {
+ command.data.commandCb(gameObject, command.data.data, command.commandID);
+ }
+ }
+ }
+}