From 8ba4ef263fae91ef93307141294e7373d177d72c Mon Sep 17 00:00:00 2001 From: milimoe Date: Sat, 3 Aug 2024 22:44:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86GamingEventArgs?= =?UTF-8?q?=E7=9A=84characters=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Common/Addon/Example/ExampleGameModule.cs | 1 - Library/Common/Event/GamingEventArgs.cs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Library/Common/Addon/Example/ExampleGameModule.cs b/Library/Common/Addon/Example/ExampleGameModule.cs index 096e296..49ab2f1 100644 --- a/Library/Common/Addon/Example/ExampleGameModule.cs +++ b/Library/Common/Addon/Example/ExampleGameModule.cs @@ -56,7 +56,6 @@ namespace Milimoe.FunGame.Core.Library.Common.Addon.Example GamingEventArgs eventArgs = instance.EventArgs; room = eventArgs.Room; users = eventArgs.Users; - characters = eventArgs.Characters; // 客户端做好准备后,等待服务器的消息通知,下面可以根据需求进一步处理 } diff --git a/Library/Common/Event/GamingEventArgs.cs b/Library/Common/Event/GamingEventArgs.cs index df762ec..9cbdf2f 100644 --- a/Library/Common/Event/GamingEventArgs.cs +++ b/Library/Common/Event/GamingEventArgs.cs @@ -2,10 +2,9 @@ namespace Milimoe.FunGame.Core.Library.Common.Event { - public class GamingEventArgs(Room room, List users, Dictionary? characters = null) : GeneralEventArgs + public class GamingEventArgs(Room room, List users, params object[] objs) : GeneralEventArgs(objs) { public Room Room { get; } = room; public List Users { get; } = users; - public Dictionary Characters { get; } = characters ?? []; } }