Browse Source

Merge branch 'eesast:dev' into new

tags/v0.1.0
shangfengh GitHub 2 years ago
parent
commit
24049480cf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 14 deletions
  1. +16
    -3
      logic/Client/MainWindow.xaml.cs
  2. +0
    -7
      logic/cmd/gameServerAndClient.cmd
  3. +4
    -0
      logic/cmd/spectatorForDebug.cmd
  4. +0
    -0
      logic/cmd/spectatorForLadder.cmd
  5. +0
    -4
      logic/cmd/video.cmd

+ 16
- 3
logic/Client/MainWindow.xaml.cs View File

@@ -482,10 +482,11 @@ namespace Client
listOfHiddenGate.Clear();
listOfGate.Clear();
MessageToClient content = responseStream.ResponseStream.Current;
MessageOfMap mapMessage = new MessageOfMap();
bool mapMessageExist = false;
switch (content.GameState)
{
case GameState.GameStart:
MessageOfMap mapMessage = new MessageOfMap();
foreach (var obj in content.ObjMessage)
{
switch (obj.MessageOfObjCase)
@@ -530,11 +531,12 @@ namespace Client
break;
}
}
listOfAll.Add(content.AllMessage);
countList.Clear();
countList.Add(listOfClassroom.Count);
countList.Add(listOfDoor.Count);
countList.Add(listOfChest.Count);
countList.Add(listOfGate.Count);
listOfAll.Add(content.AllMessage);
GetMap(mapMessage);
break;
case GameState.GameRunning:
@@ -581,11 +583,22 @@ namespace Client
listOfHiddenGate.Add(obj.HiddenGateMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.MapMessage:
GetMap(obj.MapMessage);
mapMessage = obj.MapMessage;
mapMessageExist = true;//只有中间加入游戏的旁观者着一种可能,使得在这里收到地图
break;
}
}
listOfAll.Add(content.AllMessage);
if (mapMessageExist)
{
countList.Clear();
countList.Add(listOfClassroom.Count);
countList.Add(listOfDoor.Count);
countList.Add(listOfChest.Count);
countList.Add(listOfGate.Count);
GetMap(mapMessage);
mapMessageExist = false;
}
break;
case GameState.GameEnd:
MessageBox.Show("Game Over!");


+ 0
- 7
logic/cmd/gameServerAndClient.cmd View File

@@ -1,7 +0,0 @@
@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 test

ping -n 2 127.0.0.1 > NUL

start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 114514 --type 0 --occupation 1

+ 4
- 0
logic/cmd/spectatorForDebug.cmd View File

@@ -0,0 +1,4 @@
@echo off


start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --port 8888 --characterID 2030

logic/cmd/playback.cmd → logic/cmd/spectatorForLadder.cmd View File


+ 0
- 4
logic/cmd/video.cmd View File

@@ -1,4 +0,0 @@
@echo off


start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --ip thuai6.eesast.com --port 8889 --characterID 2030

Loading…
Cancel
Save