Browse Source

feat: 🎨 add the sign of playback to the GUI client

add the sign of playback to the GUI client
tags/0.1.0
Shawqeem 2 years ago
parent
commit
8cca3ea2d4
3 changed files with 18 additions and 13 deletions
  1. +2
    -2
      logic/Client/MainWindow.xaml.cs
  2. +15
    -10
      logic/Client/StatusBarOfCircumstance.xaml.cs
  3. +1
    -1
      logic/cmd/playback.cmd

+ 2
- 2
logic/Client/MainWindow.xaml.cs View File

@@ -571,7 +571,7 @@ namespace Client
{ {
if (msg.Place == human.Place) if (msg.Place == human.Place)
return true; return true;
if (human.StudentType == StudentType.TechOtaku && msg.PlayerId == playerID + Preparation.Utility.GameData.numOfPeople)
if (msg.PlayerId == playerID + Preparation.Utility.GameData.numOfPeople)//robot and its owner
return true; return true;
} }
else if (!humanOrButcher && butcher != null) else if (!humanOrButcher && butcher != null)
@@ -747,7 +747,7 @@ namespace Client


foreach (var data in listOfAll) foreach (var data in listOfAll)
{ {
StatusBarsOfCircumstance.SetValue(data, gateOpened, isEmergencyDrawed, isEmergencyOpened, playerID);
StatusBarsOfCircumstance.SetValue(data, gateOpened, isEmergencyDrawed, isEmergencyOpened, playerID, isPlaybackMode);
} }
if (!hasDrawed && mapFlag) if (!hasDrawed && mapFlag)
DrawMap(); DrawMap();


+ 15
- 10
logic/Client/StatusBarOfCircumstance.xaml.cs View File

@@ -41,7 +41,7 @@ namespace Client
} }
} }


public void SetValue(MessageOfAll obj, bool gateOpened, bool hiddenGateRefreshed, bool hiddenGateOpened, long playerId)
public void SetValue(MessageOfAll obj, bool gateOpened, bool hiddenGateRefreshed, bool hiddenGateOpened, long playerId, bool isPlaybackMode)
{ {
int min, sec; int min, sec;
sec = obj.GameTime / 1000; sec = obj.GameTime / 1000;
@@ -57,17 +57,22 @@ namespace Client
{ {
time.Text += Convert.ToString(sec); time.Text += Convert.ToString(sec);
} }
if (playerId == GameData.numOfStudent)
{
name.Text = "🚀 Tricker's";
}
else if (playerId < GameData.numOfStudent)
{
name.Text = "🚀 Student" + Convert.ToString(playerId) + "'s";
}
if (isPlaybackMode)
name.Text = "🚀 Playback";
else else
{ {
name.Text = "🚀 Spectator's";
if (playerId == GameData.numOfStudent)
{
name.Text = "🚀 Tricker's";
}
else if (playerId < GameData.numOfStudent)
{
name.Text = "🚀 Student" + Convert.ToString(playerId) + "'s";
}
else
{
name.Text = "🚀 Spectator's";
}
} }
if (obj.SubjectFinished < Preparation.Utility.GameData.numOfGeneratorRequiredForRepair) if (obj.SubjectFinished < Preparation.Utility.GameData.numOfGeneratorRequiredForRepair)
{ {


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

@@ -1,5 +1,5 @@
@echo off @echo off


start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --playbackFile .\video.thuaipb --playbackSpeed 2
start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --playbackFile .\test.thuaipb --playbackSpeed 2


ping -n 2 127.0.0.1 > NUL ping -n 2 127.0.0.1 > NUL

Loading…
Cancel
Save