make the default value of --cl be truetags/0.1.0
| @@ -12,7 +12,7 @@ namespace Client | |||||
| public class ArgumentOptions | public class ArgumentOptions | ||||
| { | { | ||||
| [Option('u', "cl", Required = false, HelpText = "Whether to use command line")] | [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")] | [Option('i', "ip", Required = false, HelpText = "Client connected ip")] | ||||
| public string Ip { get; set; } = "127.0.0.1"; | public string Ip { get; set; } = "127.0.0.1"; | ||||
| @@ -102,14 +102,9 @@ namespace Client | |||||
| private void ReactToCommandline() | private void ReactToCommandline() | ||||
| { | { | ||||
| string[] args = Environment.GetCommandLineArgs(); | string[] args = Environment.GetCommandLineArgs(); | ||||
| if (args.Length == 2) | |||||
| { | |||||
| Playback(args[1]); | |||||
| return; | |||||
| } | |||||
| _ = Parser.Default.ParseArguments<ArgumentOptions>(args).WithParsed(o => | _ = Parser.Default.ParseArguments<ArgumentOptions>(args).WithParsed(o => | ||||
| { options = 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; | isSpectatorMode = true; | ||||
| string[] comInfo = new string[3]; | 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) | if ((map = pbClient.ReadDataFromFile(listOfProp, listOfHuman, listOfButcher, listOfBullet, listOfBombedBullet, listOfAll, listOfChest, listOfClassroom, listOfDoor, listOfHiddenGate, listOfGate, drawPicLock)) != null) | ||||
| { | { | ||||
| isClientStocked = false; | isClientStocked = false; | ||||
| PorC.Content = "⏸"; | |||||
| isPlaybackMode = true; | isPlaybackMode = true; | ||||
| defaultMap = map; | defaultMap = map; | ||||
| mapFlag = true; | mapFlag = true; | ||||
| @@ -166,6 +162,7 @@ namespace Client | |||||
| { | { | ||||
| MessageBox.Show("Failed to read the playback file!"); | MessageBox.Show("Failed to read the playback file!"); | ||||
| isClientStocked = true; | isClientStocked = true; | ||||
| PorC.Content = "▶"; | |||||
| } | } | ||||
| } | } | ||||
| @@ -1265,7 +1262,7 @@ namespace Client | |||||
| isClientStocked = true; | isClientStocked = true; | ||||
| PorC.Content = "▶"; | PorC.Content = "▶"; | ||||
| } | } | ||||
| else if (!isPlaybackMode) | |||||
| else | |||||
| { | { | ||||
| try | try | ||||
| { | { | ||||
| @@ -2,7 +2,7 @@ | |||||
| "profiles": { | "profiles": { | ||||
| "Client": { | "Client": { | ||||
| "commandName": "Project", | "commandName": "Project", | ||||
| "commandLineArgs": "--cl --playbackFile .\\video.thuaipb" | |||||
| "commandLineArgs": "--playbackFile .\\video.thuaipb" | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -1,17 +1,17 @@ | |||||
| @echo off | @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 | 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 | |||||
| ::start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 2030 | |||||
| @@ -1,5 +1,5 @@ | |||||
| @echo off | @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 | ping -n 2 127.0.0.1 > NUL | ||||
| @@ -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号技能 | | |||||
| @@ -133,8 +133,24 @@ Server脚本中参数格式一般如下: | |||||
| ### 界面介绍 | ### 界面介绍 | ||||
| * 固定方块:红色方块代表墙,绿色方块代表草,灰色方块代表窗户,黄色带锁标志的方块代表门 | * 固定方块:红色方块代表墙,绿色方块代表草,灰色方块代表窗户,黄色带锁标志的方块代表门 | ||||
| * 动态方块:蓝色方块代表大门,橙色方块代表箱子,粉色方块代表教室,上面的数字均代表进度 | * 动态方块:蓝色方块代表大门,橙色方块代表箱子,粉色方块代表教室,上面的数字均代表进度 | ||||
| * 物件:橙色圆代表捣蛋鬼,紫色圆代表学生,且上面的编号对应学生的ID | |||||
| * 物件:橙色圆代表捣蛋鬼,紫色圆代表学生,且上面的编号对应学生的ID,灰色表示Robot,它的编号表示所属的TechOtaku | |||||
| * 道具对应表如下 | |||||
| | 道具类型 | UI | | |||||
| | ---------------------- | ---- | | |||||
| | Key3 | 🔑3 | | |||||
| | Key5 | 🔑5 | | |||||
| | Key6 | 🔑6 | | |||||
| | AddSpeed | ⛸ | | |||||
| | AddLifeOrClairaudience | 🏅 | | |||||
| | AddHpOrAp | ♥ | | |||||
| | ShieldOrSpear: | 🛡 | | |||||
| | RecoveryFromDizziness | 🕶 | | |||||
| * UI:左侧为UI,表示游戏内各类信息 | * UI:左侧为UI,表示游戏内各类信息 | ||||
| ### 实机体验之键鼠操作 | ### 实机体验之键鼠操作 | ||||