diff --git a/logic/Client/CommandLineArgs.cs b/logic/Client/CommandLineArgs.cs index c79edd2..722baa1 100644 --- a/logic/Client/CommandLineArgs.cs +++ b/logic/Client/CommandLineArgs.cs @@ -12,7 +12,7 @@ namespace Client public class ArgumentOptions { [Option('u', "cl", Required = false, HelpText = "Whether to use command line")] - public bool cl { get; set; } = false; + public bool cl { get; set; } = true; [Option('i', "ip", Required = false, HelpText = "Client connected ip")] public string Ip { get; set; } = "127.0.0.1"; diff --git a/logic/Client/MainWindow.xaml.cs b/logic/Client/MainWindow.xaml.cs index 5461fb4..ffe8c03 100644 --- a/logic/Client/MainWindow.xaml.cs +++ b/logic/Client/MainWindow.xaml.cs @@ -102,14 +102,9 @@ namespace Client private void ReactToCommandline() { string[] args = Environment.GetCommandLineArgs(); - if (args.Length == 2) - { - Playback(args[1]); - return; - } _ = Parser.Default.ParseArguments(args).WithParsed(o => { options = o; }); - if ((args.Length == 3 || args.Length == 4) && options != null && Convert.ToInt64(options.PlayerID) > 2023) + if (options != null && Convert.ToInt64(options.PlayerID) > 2023) { isSpectatorMode = true; string[] comInfo = new string[3]; @@ -158,6 +153,7 @@ namespace Client if ((map = pbClient.ReadDataFromFile(listOfProp, listOfHuman, listOfButcher, listOfBullet, listOfBombedBullet, listOfAll, listOfChest, listOfClassroom, listOfDoor, listOfHiddenGate, listOfGate, drawPicLock)) != null) { isClientStocked = false; + PorC.Content = "⏸"; isPlaybackMode = true; defaultMap = map; mapFlag = true; @@ -166,6 +162,7 @@ namespace Client { MessageBox.Show("Failed to read the playback file!"); isClientStocked = true; + PorC.Content = "▶"; } } @@ -1265,7 +1262,7 @@ namespace Client isClientStocked = true; PorC.Content = "▶"; } - else if (!isPlaybackMode) + else { try { diff --git a/logic/Client/Properties/launchSettings.json b/logic/Client/Properties/launchSettings.json index a747e32..5535564 100644 --- a/logic/Client/Properties/launchSettings.json +++ b/logic/Client/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Client": { "commandName": "Project", - "commandLineArgs": "--cl --playbackFile .\\video.thuaipb" + "commandLineArgs": "--playbackFile .\\video.thuaipb" } } } \ No newline at end of file diff --git a/logic/cmd/gameServer.cmd b/logic/cmd/gameServer.cmd index 4e2bc41..611787e 100644 --- a/logic/cmd/gameServer.cmd +++ b/logic/cmd/gameServer.cmd @@ -1,17 +1,17 @@ @echo off -start cmd /k ..\Server\bin\Debug\net6.0\Server.exe --ip 0.0.0.0 --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video +start cmd /k ..\Server\bin\Debug\net6.0\Server.exe --ip 0.0.0.0 --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 60 --fileName video ping -n 2 127.0.0.1 > NUL -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 4 +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 4 --type 2 --occupation 1 -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 0 --type 1 --occupation 5 +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 0 --type 1 --occupation 1 -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 1 --type 1 --occupation 5 +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 1 --type 1 --occupation 2 -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 2 --type 1 --occupation 3 +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 2 --type 1 --occupation 5 -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 3 --type 1 --occupation 3 +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 3 --type 1 --occupation 5 -::start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 2030 \ No newline at end of file +::start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 2030 \ No newline at end of file diff --git a/logic/cmd/playback.cmd b/logic/cmd/playback.cmd index 8e413d5..ea89aa9 100644 --- a/logic/cmd/playback.cmd +++ b/logic/cmd/playback.cmd @@ -1,5 +1,5 @@ @echo off -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --playbackFile .\video.thuaipb --playbackSpeed 1 +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --playbackFile .\video.thuaipb --playbackSpeed 2 ping -n 2 127.0.0.1 > NUL \ No newline at end of file diff --git a/logic/使用文档.md b/logic/使用文档.md deleted file mode 100644 index 3f66b2d..0000000 --- a/logic/使用文档.md +++ /dev/null @@ -1,28 +0,0 @@ - - -## 键鼠控制 - -| 键位 | 效果 | -| ------------ | ---------------------------------------------- | -| W/NumPad8 | (Both)向上移动 | -| S/NumPad2 | (Both)向下移动 | -| D/NumPad6 | (Both)向右移动 | -| A/NumPad4 | (Both)向左移动 | -| J | (Tri)攻击,方向向上 | -| 鼠标双击某点 | (Tri)攻击,方向与从Tricker指向该点的向量相同 | -| K | (Stu)开始学习 | -| R | (Stu)开始唤醒(陷入沉迷状态的同伴) | -| T | (Stu)开始勉励(学习毅力下降的同伴) | -| G | (Stu)发出毕业请求 | -| H | (Stu)申请毕业(或称为开校门) | -| O | (Both)开(教学楼)门 | -| P | (Both)关(教学楼)门 | -| U | (Both)翻窗 | -| I | (Both)翻箱子 | -| E | (Both)结束当前行动,回到Idle状态 | -| F | (Both)随机捡起一个在周围的道具 | -| C | (Both)随机扔下一个已经持有的道具 | -| V | (Both)随机使用一个已经持有的道具 | -| B | (Both)使用0号技能 | -| N | (Both)使用1号技能 | -| M | (Both)使用2号技能 | diff --git a/resource/client.png b/resource/client.png index f63b284..85c31a3 100644 Binary files a/resource/client.png and b/resource/client.png differ diff --git a/使用文档.md b/使用文档.md index 92e23ba..40363d0 100644 --- a/使用文档.md +++ b/使用文档.md @@ -133,8 +133,24 @@ Server脚本中参数格式一般如下: ### 界面介绍 * 固定方块:红色方块代表墙,绿色方块代表草,灰色方块代表窗户,黄色带锁标志的方块代表门 + * 动态方块:蓝色方块代表大门,橙色方块代表箱子,粉色方块代表教室,上面的数字均代表进度 -* 物件:橙色圆代表捣蛋鬼,紫色圆代表学生,且上面的编号对应学生的ID + +* 物件:橙色圆代表捣蛋鬼,紫色圆代表学生,且上面的编号对应学生的ID,灰色表示Robot,它的编号表示所属的TechOtaku + +* 道具对应表如下 + + | 道具类型 | UI | + | ---------------------- | ---- | + | Key3 | 🔑3 | + | Key5 | 🔑5 | + | Key6 | 🔑6 | + | AddSpeed | ⛸ | + | AddLifeOrClairaudience | 🏅 | + | AddHpOrAp | ♥ | + | ShieldOrSpear: | 🛡 | + | RecoveryFromDizziness | 🕶 | + * UI:左侧为UI,表示游戏内各类信息 ### 实机体验之键鼠操作