Browse Source

Merge pull request #283 from Shawqeem/dev

change the default value of --cl be true
tags/0.1.0
shangfengh GitHub 2 years ago
parent
commit
ce6f62876b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 31 additions and 46 deletions
  1. +1
    -1
      logic/Client/CommandLineArgs.cs
  2. +4
    -7
      logic/Client/MainWindow.xaml.cs
  3. +1
    -1
      logic/Client/Properties/launchSettings.json
  4. +7
    -7
      logic/cmd/gameServer.cmd
  5. +1
    -1
      logic/cmd/playback.cmd
  6. +0
    -28
      logic/使用文档.md
  7. BIN
      resource/client.png
  8. +17
    -1
      使用文档.md

+ 1
- 1
logic/Client/CommandLineArgs.cs View File

@@ -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";


+ 4
- 7
logic/Client/MainWindow.xaml.cs View File

@@ -102,14 +102,9 @@ namespace Client
private void ReactToCommandline()
{
string[] args = Environment.GetCommandLineArgs();
if (args.Length == 2)
{
Playback(args[1]);
return;
}
_ = Parser.Default.ParseArguments<ArgumentOptions>(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
{


+ 1
- 1
logic/Client/Properties/launchSettings.json View File

@@ -2,7 +2,7 @@
"profiles": {
"Client": {
"commandName": "Project",
"commandLineArgs": "--cl --playbackFile .\\video.thuaipb"
"commandLineArgs": "--playbackFile .\\video.thuaipb"
}
}
}

+ 7
- 7
logic/cmd/gameServer.cmd View File

@@ -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
::start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 2030

+ 1
- 1
logic/cmd/playback.cmd View File

@@ -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

+ 0
- 28
logic/使用文档.md View File

@@ -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号技能 |

BIN
resource/client.png View File

Before After
Width: 1622  |  Height: 1092  |  Size: 135 kB Width: 1615  |  Height: 1096  |  Size: 138 kB

+ 17
- 1
使用文档.md View File

@@ -133,8 +133,24 @@ Server脚本中参数格式一般如下:
### 界面介绍

* 固定方块:红色方块代表墙,绿色方块代表草,灰色方块代表窗户,黄色带锁标志的方块代表门

* 动态方块:蓝色方块代表大门,橙色方块代表箱子,粉色方块代表教室,上面的数字均代表进度
* 物件:橙色圆代表捣蛋鬼,紫色圆代表学生,且上面的编号对应学生的ID

* 物件:橙色圆代表捣蛋鬼,紫色圆代表学生,且上面的编号对应学生的ID,灰色表示Robot,它的编号表示所属的TechOtaku

* 道具对应表如下

| 道具类型 | UI |
| ---------------------- | ---- |
| Key3 | 🔑3 |
| Key5 | 🔑5 |
| Key6 | 🔑6 |
| AddSpeed | ⛸ |
| AddLifeOrClairaudience | 🏅 |
| AddHpOrAp | ♥ |
| ShieldOrSpear: | 🛡 |
| RecoveryFromDizziness | 🕶 |

* UI:左侧为UI,表示游戏内各类信息

### 实机体验之键鼠操作


Loading…
Cancel
Save