Browse Source

feat: change the status bar of student

change the status bar of student and fit the  new protos
tags/0.1.0
Shawqeem 2 years ago
parent
commit
d3e99f10d3
7 changed files with 260 additions and 116 deletions
  1. +3
    -3
      dependency/proto/Message2Clients.proto
  2. +0
    -1
      dependency/proto/MessageType.proto
  3. +112
    -62
      logic/Client/MainWindow.xaml.cs
  4. +5
    -6
      logic/Client/StatusBarOfHunter.xaml.cs
  5. +22
    -11
      logic/Client/StatusBarOfSurvivor.xaml
  6. +117
    -32
      logic/Client/StatusBarOfSurvivor.xaml.cs
  7. +1
    -1
      logic/GameClass/GameObj/Character/Character.Skill.cs

+ 3
- 3
dependency/proto/Message2Clients.proto View File

@@ -10,7 +10,7 @@ message MessageOfStudent
int32 y = 2;
int32 speed = 3;
int32 determination = 4; // 剩余的学习毅力,相当于血量
int32 addiction = 5; // 沉迷程度,相当于真实血量
int32 addiction = 5; // 沉迷程度,相当于淘汰进度
repeated double time_until_skill_available = 6;
PlaceType place = 7;
repeated PropType prop = 8;
@@ -47,8 +47,8 @@ message MessageOfTricker
int32 view_range = 12; // 视野距离
int32 radius = 13; // 半径
PlayerState player_state = 14;
double trick_desire = 15;
double class_volume = 16;
double trick_desire = 15;//bgm
double class_volume = 16;//bgm
repeated TrickerBuffType buff = 17;
}



+ 0
- 1
dependency/proto/MessageType.proto View File

@@ -74,7 +74,6 @@ enum PlayerState
LOCKING = 13;
RUMMAGING = 14;
CLIMBING = 15; // 翻窗

}

enum TrickerBuffType // 屠夫可用的增益效果类型


+ 112
- 62
logic/Client/MainWindow.xaml.cs View File

@@ -54,11 +54,10 @@ namespace Client
listOfBullet=new List<MessageOfBullet>();
listOfBombedBullet = new List<MessageOfBombedBullet>();
listOfAll = new List<MessageOfAll>();
MapObjDict = new Dictionary<MessageOfMapObj.MessageOfMapObjOneofCase, List<MessageOfMapObj>>();
MapObjDict.Add(MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage, new List<MessageOfMapObj>());
MapObjDict.Add(MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage, new List<MessageOfMapObj>());
MapObjDict.Add(MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage, new List<MessageOfMapObj>());
MapObjDict.Add(MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage, new List<MessageOfMapObj>());
listOfChest = new List<MessageOfChest>();
listOfClassroom = new List<MessageOfClassroom>();
listOfDoor = new List<MessageOfDoor>();
listOfGate = new List<MessageOfGate>();
WindowStartupLocation = WindowStartupLocation.CenterScreen;
comInfo[0] = "127.0.0.1";
comInfo[1] = "8888";
@@ -335,10 +334,10 @@ namespace Client
listOfBombedBullet.Clear();
listOfBullet.Clear();
listOfAll.Clear();
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage].Clear();
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage].Clear();
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage].Clear();
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage].Clear();
listOfChest.Clear();
listOfClassroom.Clear();
listOfDoor.Clear();
listOfGate.Clear();
MessageToClient content = responseStream.ResponseStream.Current;
switch (content.GameState)
{
@@ -370,26 +369,23 @@ namespace Client
case MessageOfObj.MessageOfObjOneofCase.BulletMessage:
listOfBullet.Add(obj.BulletMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.MapObjMessage:
switch (obj.MapObjMessage.MessageOfMapObjCase)
{
case MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage].Add(obj.MapObjMessage);
break;
}
case MessageOfObj.MessageOfObjOneofCase.ChestMessage:
listOfChest.Add(obj.ChestMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.ClassroomMessage:
listOfClassroom.Add(obj.ClassroomMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.DoorMessage:
listOfDoor.Add(obj.DoorMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.GateMessage:
listOfGate.Add(obj.GateMessage);
break;
}
}
GetMap(content.MapMessage);
IDMsg idMsg = new IDMsg();
idMsg.PlayerId = playerID;
GetMap(client.GetMap(idMsg));
listOfAll.Add(content.AllMessage);
break;
case GameState.GameRunning:
@@ -420,22 +416,17 @@ namespace Client
case MessageOfObj.MessageOfObjOneofCase.BulletMessage:
listOfBullet.Add(obj.BulletMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.MapObjMessage:
switch (obj.MapObjMessage.MessageOfMapObjCase)
{
case MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage].Add(obj.MapObjMessage);
break;
}
case MessageOfObj.MessageOfObjOneofCase.ChestMessage:
listOfChest.Add(obj.ChestMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.ClassroomMessage:
listOfClassroom.Add(obj.ClassroomMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.DoorMessage:
listOfDoor.Add(obj.DoorMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.GateMessage:
listOfGate.Add(obj.GateMessage);
break;
}
}
@@ -462,22 +453,17 @@ namespace Client
case MessageOfObj.MessageOfObjOneofCase.BulletMessage:
listOfBullet.Add(obj.BulletMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.MapObjMessage:
switch (obj.MapObjMessage.MessageOfMapObjCase)
{
case MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.DoorMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ChestMessage].Add(obj.MapObjMessage);
break;
case MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage:
MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.GateMessage].Add(obj.MapObjMessage);
break;
}
case MessageOfObj.MessageOfObjOneofCase.ChestMessage:
listOfChest.Add(obj.ChestMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.ClassroomMessage:
listOfClassroom.Add(obj.ClassroomMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.DoorMessage:
listOfDoor.Add(obj.DoorMessage);
break;
case MessageOfObj.MessageOfObjOneofCase.GateMessage:
listOfGate.Add(obj.GateMessage);
break;
}
}
@@ -772,17 +758,35 @@ namespace Client
break;
}
}
foreach (var data in MapObjDict[MessageOfMapObj.MessageOfMapObjOneofCase.ClassroomMessage])
foreach (var data in listOfClassroom)
{
TextBox icon = new()
{
FontSize = 10 * UpperLayerOfMap.ActualHeight / 650,
Width = unitWidth,
Height = unitHeight,
Text = Convert.ToString(data.Progress),
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
//Margin = new Thickness(25,25, 0, 0),
Background = Brushes.Transparent,
BorderBrush = Brushes.Transparent,
IsReadOnly = true
};
UpperLayerOfMap.Children.Add(icon);
}
foreach(var data in listOfChest)
{
TextBox icon = new()
{
FontSize = 10 * UpperLayerOfMap.ActualHeight / 650,
Width = unitWidth,
Height = unitHeight,
Text = Convert.ToString(data.ClassroomMessage.Progress),
Text = Convert.ToString(data.Progress),
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Thickness(data.ClassroomMessage.Y * unitWidth / 1000.0 - unitWidth / 2, data.ClassroomMessage.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
//Margin = new Thickness(25,25, 0, 0),
Background = Brushes.Transparent,
BorderBrush = Brushes.Transparent,
@@ -790,6 +794,49 @@ namespace Client
};
UpperLayerOfMap.Children.Add(icon);
}
foreach(var data in listOfGate)
{
TextBox icon = new()
{
FontSize = 10 * UpperLayerOfMap.ActualHeight / 650,
Width = unitWidth,
Height = unitHeight,
Text = Convert.ToString(data.Progress),
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
//Margin = new Thickness(25,25, 0, 0),
Background = Brushes.Transparent,
BorderBrush = Brushes.Transparent,
IsReadOnly = true
};
UpperLayerOfMap.Children.Add(icon);
}
foreach(var data in listOfDoor)
{
TextBox icon = new()
{
FontSize = 10 * UpperLayerOfMap.ActualHeight / 650,
Width = unitWidth,
Height = unitHeight,
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
//Margin = new Thickness(25,25, 0, 0),
Background = Brushes.Transparent,
BorderBrush = Brushes.Transparent,
IsReadOnly = true
};
if (data.IsOpen)
{
icon.Text = Convert.ToString("开");
}
else
{
icon.Text = Convert.ToString("闭");
}
UpperLayerOfMap.Children.Add(icon);
}
//}
ZoomMap();
}
@@ -1057,7 +1104,10 @@ namespace Client
private List<MessageOfBullet> listOfBullet;
private List<MessageOfBombedBullet> listOfBombedBullet;
private List<MessageOfAll> listOfAll;
private Dictionary<MessageOfMapObj.MessageOfMapObjOneofCase, List<MessageOfMapObj>> MapObjDict;
private List<MessageOfChest> listOfChest;
private List<MessageOfClassroom> listOfClassroom;
private List<MessageOfDoor> listOfDoor;
private List<MessageOfGate> listOfGate;
private object drawPicLock = new object();
private MessageOfStudent? human = null;
private MessageOfTricker? butcher = null;


+ 5
- 6
logic/Client/StatusBarOfHunter.xaml.cs View File

@@ -45,30 +45,29 @@ namespace Client
{
case TrickerType._1:
coolTime = 10000;
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\nSkill:TrickerType1";
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType1";
break;
case TrickerType._2:
coolTime = 20000;
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\nSkill:TrickerType2";
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType2";
break;
case TrickerType._3:
coolTime = 30000;
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\nSkill:TrickerType3";
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType3";
break;
case TrickerType._4:
coolTime = 40000;
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\nSkill:TrickerType4";
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType4";
break;
case TrickerType.NullTrickerType:
coolTime = 10000;
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\nSkill:NullTrickerType";
serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:NullTrickerType";
break;
}
initialized = true;
}
private void SetDynamicValue(MessageOfTricker obj)
{
skillprogress.Value = 100 - obj.TimeUntilSkillAvailable / coolTime * 100;
if (!obj.Movable) // 认为movable为真时可动
{
skillprogress.Value = 0;


+ 22
- 11
logic/Client/StatusBarOfSurvivor.xaml View File

@@ -8,21 +8,32 @@
d:DesignHeight="174" d:DesignWidth="90">
<Grid Name="background" >
<Grid.RowDefinitions>
<RowDefinition Height="35*"/>
<RowDefinition Height="67*"/>
<RowDefinition Height="22*"/>
<RowDefinition Height="20*"/>
<RowDefinition Height="36*"/>
<RowDefinition Height="19*"/>
<RowDefinition Height="19*"/>
<RowDefinition Height="27*"/>
<RowDefinition Height="26*"/>
<RowDefinition Height="27*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="31*"/>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<TextBox Name="serial" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="👥null🧓null&#xD;&#xA;Skill:" Grid.Row="0" Grid.ColumnSpan="2" FontSize="12"/>
<TextBox Name="status" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="🔧:&#xA;🏃:&#xA;♥:&#xA;🛡:" Grid.Row="1" Grid.ColumnSpan="2"/>
<TextBox Name="scores" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="Scores:" Grid.Row="2" Grid.ColumnSpan="2"/>
<TextBox Name="star" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="" Grid.Row="3" Grid.ColumnSpan="2"/>
<TextBox Name="prop" IsReadOnly="True" BorderBrush="Gray" Text="" FontSize="12" Margin="0" TextWrapping="Wrap" Grid.Row="4" Grid.Column="0"></TextBox>
<ProgressBar Name="skillprogress" Background="White" Margin="0" Grid.Row="4" Grid.Column="1"/>
<TextBox Name="serial" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="👥null🧓null&#xD;&#xA;职业:" Grid.Row="0" Grid.ColumnSpan="4" FontSize="12"/>
<TextBox Name="status" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="♥:" Grid.Row="1" Grid.ColumnSpan="4"/>
<TextBox Name="scores" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="Scores:" Grid.Row="2" Grid.ColumnSpan="4"/>
<TextBox Name="activeSkill0" IsReadOnly="True" BorderBrush="Gray" TextWrapping="Wrap" Text="" Grid.Row="3" Grid.ColumnSpan="2"/>
<ProgressBar Name="skillprogress0" Background="White" Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2"/>
<TextBox Name="activeSkill1" IsReadOnly="True" BorderBrush="Gray" TextWrapping="Wrap" Text="" Grid.Row="4" Grid.ColumnSpan="2"/>
<ProgressBar Name="skillprogress1" Background="White" Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2"/>
<TextBox Name="activeSkill2" IsReadOnly="True" BorderBrush="Gray" TextWrapping="Wrap" Text="" Grid.Row="5" Grid.ColumnSpan="2"/>
<ProgressBar Name="skillprogress2" Background="White" Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2"/>
<TextBox Name="prop0" IsReadOnly="True" BorderBrush="Gray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="1"/>
<TextBox Name="prop1" IsReadOnly="True" BorderBrush="Gray" Text="" FontSize="12" Margin="22,0,0,0" TextWrapping="Wrap" Grid.Row="6" Grid.ColumnSpan="2"/>
<TextBox Name="prop2" IsReadOnly="True" BorderBrush="Gray" Text="" FontSize="12" Margin="0,0,22,0" TextWrapping="Wrap" Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="2"/>
<TextBox Name="prop3" IsReadOnly="True" BorderBrush="Gray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="6" Grid.Column="3" Grid.ColumnSpan="1"/>
</Grid>
</UserControl>

+ 117
- 32
logic/Client/StatusBarOfSurvivor.xaml.cs View File

@@ -30,7 +30,7 @@ namespace Client
}
public void SetFontSize(double fontsize)
{
serial.FontSize = scores.FontSize = star.FontSize = status.FontSize = prop.FontSize = fontsize;
serial.FontSize = scores.FontSize = status.FontSize = activeSkill0.FontSize = activeSkill1.FontSize = activeSkill2.FontSize = prop0.FontSize = prop1.FontSize = prop2.FontSize = prop3.FontSize = fontsize;
}

private void SetStaticValue(MessageOfStudent obj)
@@ -39,69 +39,154 @@ namespace Client
{
case StudentType._1:
coolTime = 10000;
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\nSkill:StudentType1";
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType1";
break;
case StudentType._2:
coolTime = 20000;
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\nSkill:StudentType2";
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType2";
break;
case StudentType._3:
coolTime = 30000;
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\nSkill:StudentType3";
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType3";
break;
case StudentType._4:
coolTime = 40000;
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\nSkill:StudentType4";
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType4";
break;
case StudentType.NullStudentType:
coolTime = 10000;
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\nSkill:NullStudentType";
serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:NullStudentType";
break;
}
initialized = true;
}
private void SetDynamicValue(MessageOfStudent obj)
{
skillprogress.Value = 100 - obj.TimeUntilSkillAvailable[0] / coolTime * 100;
int life;
switch(obj.PlayerState)
{
case PlayerState.Idle:
life = obj.Determination;
status.Text = "♥:" + Convert.ToString(life);
break;
case PlayerState.Addicted:
life = obj.Addiction;
status.Text = "💀:" + Convert.ToString(life);
break;
case PlayerState.Graduated:
status.Text = "Graduated";
break;
case PlayerState.Quit:
status.Text = "Quit";
break;
default:
break;
}//不完全
scores.Text = "Scores:" + obj.Score;
skillprogress0.Value = 100 - obj.TimeUntilSkillAvailable[0] / coolTime * 100;
skillprogress1.Value = 100 - obj.TimeUntilSkillAvailable[1] / coolTime * 100;
skillprogress2.Value = 100 - obj.TimeUntilSkillAvailable[2] / coolTime * 100;
if (obj.State == PlayerState.Quit)
{
skillprogress.Value = 0;
skillprogress.Background = Brushes.Gray;
skillprogress0.Value = skillprogress1.Value = skillprogress2.Value = 0;
skillprogress0.Background = skillprogress1.Background= skillprogress2.Background=Brushes.Gray;
}
else
skillprogress.Background = Brushes.White;
Func<MessageOfStudent, int> life =
(obj) =>
{
if (obj.State == PlayerState.Quit || obj.State == PlayerState.Addicted)
return 0;
else
return obj.Determination;
};
// star.Text = "⭐:";准备放剩余被挂次数
status.Text = "🔧:" + Convert.ToString(0) + "\n🏃:" + Convert.ToString(obj.Speed) + "\n♥:" + Convert.ToString(life(obj)) + "\n🛡:" + Convert.ToString(0);
scores.Text = "Scores:" +obj.Score;
skillprogress0.Background = skillprogress1.Background= skillprogress2.Background=Brushes.White;
int cnt = 0;
foreach (var icon in obj.Prop)
{
switch (icon)
switch(cnt)
{
case PropType.Ptype1:
prop.Text = "🔧";
case 0:
switch (icon)
{
case PropType.Ptype1:
prop0.Text = "🔧";
break;
case PropType.Ptype2:
prop0.Text = "🛡";
break;
case PropType.Ptype3:
prop0.Text = "♥";
break;
case PropType.Ptype4:
prop0.Text = "⛸";
break;
default:
prop0.Text = " ";
break;
}
cnt++;
break;
case PropType.Ptype2:
prop.Text = "🛡";
case 1:
switch (icon)
{
case PropType.Ptype1:
prop1.Text = "🔧";
break;
case PropType.Ptype2:
prop1.Text = "🛡";
break;
case PropType.Ptype3:
prop1.Text = "♥";
break;
case PropType.Ptype4:
prop1.Text = "⛸";
break;
default:
prop1.Text = " ";
break;
}
cnt++;
break;
case PropType.Ptype3:
prop.Text = "♥";
case 2:
switch (icon)
{
case PropType.Ptype1:
prop2.Text = "🔧";
break;
case PropType.Ptype2:
prop2.Text = "🛡";
break;
case PropType.Ptype3:
prop2.Text = "♥";
break;
case PropType.Ptype4:
prop2.Text = "⛸";
break;
default:
prop2.Text = " ";
break;
}
cnt++;
break;
case PropType.Ptype4:
prop.Text = "⛸";
case 3:
switch (icon)
{
case PropType.Ptype1:
prop3.Text = "🔧";
break;
case PropType.Ptype2:
prop3.Text = "🛡";
break;
case PropType.Ptype3:
prop3.Text = "♥";
break;
case PropType.Ptype4:
prop3.Text = "⛸";
break;
default:
prop3.Text = " ";
break;
}
cnt++;
break;
default:
prop.Text = " ";
break;
}
}
}
}
public void SetValue(MessageOfStudent obj)
{


+ 1
- 1
logic/GameClass/GameObj/Character/Character.Skill.cs View File

@@ -9,7 +9,7 @@ namespace GameClass.GameObj
{
private readonly CharacterType characterType;
public CharacterType CharacterType => characterType;
private readonly IOccupation occupation;
private readonly IOccupation? occupation;
public IOccupation Occupation => occupation;

private Dictionary<ActiveSkillType, int> timeUntilActiveSkillAvailable = new();


Loading…
Cancel
Save