improve the appearance and the function of status barstags/0.1.0
| @@ -9,20 +9,17 @@ | |||
| <Grid Name="background" > | |||
| <Grid.RowDefinitions> | |||
| <RowDefinition Height="20*"/> | |||
| <RowDefinition Height="84*"/> | |||
| <RowDefinition Height="23*"/> | |||
| <RowDefinition Height="70*"/> | |||
| <RowDefinition Height="20*"/> | |||
| <RowDefinition Height="20*"/> | |||
| <RowDefinition Height="27*"/> | |||
| </Grid.RowDefinitions> | |||
| <Grid.ColumnDefinitions> | |||
| <ColumnDefinition Width="20*"/> | |||
| <ColumnDefinition Width="62*"/> | |||
| </Grid.ColumnDefinitions> | |||
| <TextBox Name="time" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="Time⏳:" Grid.Row="0" Grid.ColumnSpan="2" FontSize="12"/> | |||
| <TextBox Name="status" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="📱:
🚪:
🆘:
🏃:
⚰️:" Grid.Row="1" Grid.ColumnSpan="2"/> | |||
| <TextBox Name="scoresofstudents" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="Scores of Survivors:" Grid.Row="2" Grid.ColumnSpan="2"/> | |||
| <TextBox Name="scoresoftrickers" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="Scores of Hunters:" Grid.Row="3" Grid.ColumnSpan="2"/> | |||
| <TextBox Name="prop" IsReadOnly="True" BorderBrush="Gray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,136,0"></TextBox> | |||
| <ProgressBar Name="skillprogress" Background="White" Grid.Row="4" Grid.Column="1"/> | |||
| <TextBox Name="time" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Time⏳:" Grid.Row="0" Grid.ColumnSpan="2" FontSize="14"/> | |||
| <TextBox Name="status" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="📱:
🚪:
🆘:
🏃:
⚰️:" Grid.Row="1" Grid.ColumnSpan="2" FontSize="13"/> | |||
| <TextBox Name="scoresOfStudents" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores of Students:" Grid.Row="2" Grid.ColumnSpan="2" FontSize="12"/> | |||
| <TextBox Name="scoresOfTrickers" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores of Tricker:" Grid.Row="3" Grid.ColumnSpan="2" FontSize="12"/> | |||
| </Grid> | |||
| </UserControl> | |||
| @@ -31,7 +31,9 @@ namespace Client | |||
| } | |||
| public void SetFontSize(double fontsize) | |||
| { | |||
| time.FontSize = scoresofstudents.FontSize = scoresoftrickers.FontSize = status.FontSize = prop.FontSize = fontsize; | |||
| status.FontSize = 13 * fontsize / 12; | |||
| time.FontSize = 13 * fontsize / 12; | |||
| scoresOfStudents.FontSize = scoresOfTrickers.FontSize = fontsize; | |||
| } | |||
| public void SetValue(MessageOfAll obj) | |||
| @@ -63,8 +65,8 @@ namespace Client | |||
| } | |||
| status.Text += Convert.ToString(obj.StudentGraduated)+ "\n⚰️: "; | |||
| status.Text += Convert.ToString(obj.StudentQuited); | |||
| scoresofstudents.Text = "Scores of Survivors: " + Convert.ToString(obj.StudentScore); | |||
| scoresoftrickers.Text = "Scores of Hunters: " + Convert.ToString(obj.TrickerScore); | |||
| scoresOfStudents.Text = "Scores of Students:" + Convert.ToString(obj.StudentScore); | |||
| scoresOfTrickers.Text = "Scores of Tricker:" + Convert.ToString(obj.TrickerScore); | |||
| } | |||
| } | |||
| } | |||
| @@ -8,21 +8,34 @@ | |||
| d:DesignHeight="174" d:DesignWidth="180"> | |||
| <Grid Name="background" > | |||
| <Grid.RowDefinitions> | |||
| <RowDefinition Height="35*"/> | |||
| <RowDefinition Height="67*"/> | |||
| <RowDefinition Height="22*"/> | |||
| <RowDefinition Height="20*"/> | |||
| <RowDefinition Height="26*"/> | |||
| <RowDefinition Height="36*"/> | |||
| <RowDefinition Height="23*"/> | |||
| <RowDefinition Height="23*"/> | |||
| <RowDefinition Height="23*"/> | |||
| <RowDefinition Height="23*"/> | |||
| <RowDefinition Height="23*"/> | |||
| <RowDefinition Height="23*"/> | |||
| </Grid.RowDefinitions> | |||
| <Grid.ColumnDefinitions> | |||
| <ColumnDefinition Width="20*"/> | |||
| <ColumnDefinition Width="62*"/> | |||
| <ColumnDefinition Width="21*"/> | |||
| <ColumnDefinition Width="20*"/> | |||
| <ColumnDefinition Width="21*"/> | |||
| </Grid.ColumnDefinitions> | |||
| <TextBox Name="serial" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="👥null👻null
Skill:" Grid.Row="0" Grid.ColumnSpan="2" FontSize="12"/> | |||
| <TextBox Name="status" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="🏹:
🏃:
🤺:
🗡:" 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" TextWrapping="Wrap" Grid.Row="4" Grid.Column="0" Grid.RowSpan="2"></TextBox> | |||
| <ProgressBar Name="skillprogress" Background="White" Grid.Row="4" Grid.Column="1"/> | |||
| <TextBox Name="serial" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="👥null👻null
职业:" Grid.Row="0" Grid.ColumnSpan="4" FontSize="12"/> | |||
| <TextBox Name="status" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="🏃🏿:" Grid.Row="1" Grid.ColumnSpan="2" /> | |||
| <TextBox Name="state" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" /> | |||
| <TextBox Name="scores" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores:" Grid.Row="2" Grid.ColumnSpan="4"/> | |||
| <TextBox Name="activeSkill0" IsReadOnly="True" BorderBrush="LightGray" 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="LightGray" 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="LightGray" 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="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="1"/> | |||
| <TextBox Name="prop1" IsReadOnly="True" BorderBrush="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="1"/> | |||
| <TextBox Name="prop2" IsReadOnly="True" BorderBrush="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="7" Grid.Column="2" Grid.ColumnSpan="1"/> | |||
| <TextBox Name="prop3" IsReadOnly="True" BorderBrush="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="7" Grid.Column="3" Grid.ColumnSpan="1"/> | |||
| </Grid> | |||
| </UserControl> | |||
| @@ -36,7 +36,7 @@ namespace Client | |||
| } | |||
| public void SetFontSize(double fontsize) | |||
| { | |||
| serial.FontSize = scores.FontSize = star.FontSize = status.FontSize = prop.FontSize = fontsize; | |||
| serial.FontSize = scores.FontSize = state.FontSize = status.FontSize=activeSkill0.FontSize = activeSkill1.FontSize = activeSkill2.FontSize = prop0.FontSize = prop1.FontSize = prop2.FontSize = prop3.FontSize = fontsize; | |||
| } | |||
| private void SetStaticValue(MessageOfTricker obj) | |||
| @@ -44,58 +44,197 @@ namespace Client | |||
| switch (obj.TrickerType) // 参数未设定 | |||
| { | |||
| case TrickerType.Assassin: | |||
| coolTime = 10000; | |||
| serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType1"; | |||
| coolTime0 = coolTime1 = coolTime2 = 10000; | |||
| serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:Assassin"; | |||
| break; | |||
| case TrickerType._2: | |||
| coolTime = 20000; | |||
| coolTime0 = coolTime1 = coolTime2 = 20000; | |||
| serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType2"; | |||
| break; | |||
| case TrickerType._3: | |||
| coolTime = 30000; | |||
| coolTime0 = coolTime1 = coolTime2 = 30000; | |||
| serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType3"; | |||
| break; | |||
| case TrickerType._4: | |||
| coolTime = 40000; | |||
| coolTime0 = coolTime1 = coolTime2 = 40000; | |||
| serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:TrickerType4"; | |||
| break; | |||
| case TrickerType.NullTrickerType: | |||
| coolTime = 10000; | |||
| coolTime0 = coolTime1 = coolTime2 = -1; | |||
| serial.Text = "👥" + Convert.ToString(1) + "👻" + Convert.ToString(obj.PlayerId) + "\n职业:NullTrickerType"; | |||
| break; | |||
| } | |||
| activeSkill0.Text = "Skill0"; | |||
| activeSkill1.Text = "Skill1"; | |||
| activeSkill2.Text = "Skill2"; | |||
| initialized = true; | |||
| } | |||
| private void SetDynamicValue(MessageOfTricker obj) | |||
| { | |||
| if (obj.PlayerState==PlayerState.Stunned) | |||
| status.Text = "🏃🏿:"+Convert.ToString(obj.Speed); | |||
| switch (obj.PlayerState) | |||
| { | |||
| skillprogress.Value = 0; | |||
| skillprogress.Background = Brushes.Gray; | |||
| case PlayerState.Idle: | |||
| state.Text = "Idle"; | |||
| break; | |||
| case PlayerState.Learning: | |||
| state.Text = "Learning"; | |||
| break; | |||
| case PlayerState.Addicted: | |||
| state.Text = "Addicted"; | |||
| break; | |||
| case PlayerState.Graduated: | |||
| state.Text = "Graduated"; | |||
| break; | |||
| case PlayerState.Quit: | |||
| state.Text = "Quit"; | |||
| break; | |||
| case PlayerState.Treated: | |||
| state.Text = "Treated"; | |||
| break; | |||
| case PlayerState.Rescued: | |||
| state.Text = "Rescued"; | |||
| break; | |||
| case PlayerState.Stunned: | |||
| state.Text = "Stunned"; | |||
| break; | |||
| case PlayerState.Treating: | |||
| state.Text = "Treating"; | |||
| break; | |||
| case PlayerState.Rescuing: | |||
| state.Text = "Rescuing"; | |||
| break; | |||
| case PlayerState.Swinging: | |||
| state.Text = "Swinging"; | |||
| break; | |||
| case PlayerState.Attacking: | |||
| state.Text = "Attacking"; | |||
| break; | |||
| case PlayerState.Locking: | |||
| state.Text = "Locking"; | |||
| break; | |||
| case PlayerState.Rummaging: | |||
| state.Text ="Rummaging"; | |||
| break; | |||
| case PlayerState.Climbing: | |||
| state.Text ="Climbing"; | |||
| break; | |||
| case PlayerState.OpeningAChest: | |||
| state.Text = "OpeningAChest"; | |||
| break; | |||
| case PlayerState.UsingSpecialSkill: | |||
| state.Text = "UsingSpecialSkill"; | |||
| break; | |||
| case PlayerState.OpeningAGate: | |||
| state.Text = "OpeningAGate"; | |||
| break; | |||
| default: | |||
| break; | |||
| } | |||
| scores.Text = "Scores:" + Convert.ToString(obj.Score); | |||
| if (obj.TimeUntilSkillAvailable[0] >= 0) | |||
| skillprogress0.Value = 100 - obj.TimeUntilSkillAvailable[0] / coolTime0 * 100; | |||
| if (obj.TimeUntilSkillAvailable[1] >= 0) | |||
| skillprogress1.Value = 100 - obj.TimeUntilSkillAvailable[1] / coolTime1 * 100; | |||
| if (obj.TimeUntilSkillAvailable[2] >= 0) | |||
| skillprogress2.Value = 100 - obj.TimeUntilSkillAvailable[2] / coolTime2 * 100; | |||
| if (obj.PlayerState == PlayerState.Quit) | |||
| { | |||
| skillprogress0.Value = skillprogress1.Value = skillprogress2.Value = 0; | |||
| skillprogress0.Background = skillprogress1.Background = skillprogress2.Background = Brushes.Gray; | |||
| } | |||
| else | |||
| skillprogress.Background = Brushes.White; | |||
| // star.Text = "⭐:";不知道要放什么 | |||
| status.Text = "🏹:" + Convert.ToString(1) + "\n🏃:" + Convert.ToString(obj.Speed) + "\n🤺:" + Convert.ToString(2) + "\n🗡:" + Convert.ToString(0); | |||
| scores.Text = "Scores:" + Convert.ToString(0); | |||
| foreach(var icon in obj.Prop) | |||
| skillprogress0.Background = skillprogress1.Background = skillprogress2.Background = Brushes.White; | |||
| int cnt = 0; | |||
| foreach (var icon in obj.Prop) | |||
| { | |||
| switch (icon) | |||
| switch (cnt) | |||
| { | |||
| case PropType.Key3: | |||
| prop.Text = "🔧"; | |||
| case 0: | |||
| switch (icon) | |||
| { | |||
| case PropType.Key3: | |||
| prop0.Text = "🔧"; | |||
| break; | |||
| case PropType.Key5: | |||
| prop0.Text = "🛡"; | |||
| break; | |||
| case PropType.Key6: | |||
| prop0.Text = "♥"; | |||
| break; | |||
| case PropType.Ptype4: | |||
| prop0.Text = "⛸"; | |||
| break; | |||
| default: | |||
| prop0.Text = " "; | |||
| break; | |||
| } | |||
| cnt++; | |||
| break; | |||
| case PropType.Key5: | |||
| prop.Text = "🛡"; | |||
| case 1: | |||
| switch (icon) | |||
| { | |||
| case PropType.Key3: | |||
| prop1.Text = "🔧"; | |||
| break; | |||
| case PropType.Key5: | |||
| prop1.Text = "🛡"; | |||
| break; | |||
| case PropType.Key6: | |||
| prop1.Text = "♥"; | |||
| break; | |||
| case PropType.Ptype4: | |||
| prop1.Text = "⛸"; | |||
| break; | |||
| default: | |||
| prop1.Text = " "; | |||
| break; | |||
| } | |||
| cnt++; | |||
| break; | |||
| case PropType.Key6: | |||
| prop.Text = "♥"; | |||
| case 2: | |||
| switch (icon) | |||
| { | |||
| case PropType.Key3: | |||
| prop2.Text = "🔧"; | |||
| break; | |||
| case PropType.Key5: | |||
| prop2.Text = "🛡"; | |||
| break; | |||
| case PropType.Key6: | |||
| 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.Key3: | |||
| prop3.Text = "🔧"; | |||
| break; | |||
| case PropType.Key5: | |||
| prop3.Text = "🛡"; | |||
| break; | |||
| case PropType.Key6: | |||
| prop3.Text = "♥"; | |||
| break; | |||
| case PropType.Ptype4: | |||
| prop3.Text = "⛸"; | |||
| break; | |||
| default: | |||
| prop3.Text = " "; | |||
| break; | |||
| } | |||
| cnt++; | |||
| break; | |||
| default: | |||
| prop.Text = " "; | |||
| break; | |||
| } | |||
| } | |||
| @@ -106,7 +245,7 @@ namespace Client | |||
| SetStaticValue(obj); | |||
| SetDynamicValue(obj); | |||
| } | |||
| private int coolTime; | |||
| private int coolTime0, coolTime1, coolTime2; | |||
| private bool initialized; | |||
| } | |||
| } | |||
| @@ -11,9 +11,10 @@ | |||
| <RowDefinition Height="36*"/> | |||
| <RowDefinition Height="19*"/> | |||
| <RowDefinition Height="19*"/> | |||
| <RowDefinition Height="27*"/> | |||
| <RowDefinition Height="26*"/> | |||
| <RowDefinition Height="27*"/> | |||
| <RowDefinition Height="19*"/> | |||
| <RowDefinition Height="20*"/> | |||
| <RowDefinition Height="20*"/> | |||
| <RowDefinition Height="21*"/> | |||
| <RowDefinition Height="20*"/> | |||
| </Grid.RowDefinitions> | |||
| <Grid.ColumnDefinitions> | |||
| @@ -22,18 +23,18 @@ | |||
| <ColumnDefinition Width="10*"/> | |||
| <ColumnDefinition Width="10*"/> | |||
| </Grid.ColumnDefinitions> | |||
| <TextBox Name="serial" IsReadOnly="True" BorderBrush="White" TextWrapping="Wrap" Text="👥null🧓null
职业:" 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"/> | |||
| <TextBox Name="serial" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="👥null🧓null
职业:" Grid.Row="0" Grid.ColumnSpan="4" FontSize="12"/> | |||
| <TextBox Name="status" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="♥:" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="4"/> | |||
| <TextBox Name="scores" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores:" Grid.Row="3" Grid.ColumnSpan="4"/> | |||
| <TextBox Name="activeSkill0" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="" Grid.Row="4" Grid.ColumnSpan="2"/> | |||
| <ProgressBar Name="skillprogress0" Background="White" Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2"/> | |||
| <TextBox Name="activeSkill1" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="" Grid.Row="5" Grid.ColumnSpan="2"/> | |||
| <ProgressBar Name="skillprogress1" Background="White" Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2"/> | |||
| <TextBox Name="activeSkill2" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="" Grid.Row="6" Grid.ColumnSpan="2"/> | |||
| <ProgressBar Name="skillprogress2" Background="White" Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="2"/> | |||
| <TextBox Name="prop0" IsReadOnly="True" BorderBrush="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="1"/> | |||
| <TextBox Name="prop1" IsReadOnly="True" BorderBrush="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="1"/> | |||
| <TextBox Name="prop2" IsReadOnly="True" BorderBrush="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="7" Grid.Column="2" Grid.ColumnSpan="1"/> | |||
| <TextBox Name="prop3" IsReadOnly="True" BorderBrush="LightGray" Text="" FontSize="12" TextWrapping="Wrap" Grid.Row="7" Grid.Column="3" Grid.ColumnSpan="1"/> | |||
| </Grid> | |||
| </UserControl> | |||
| @@ -35,60 +35,103 @@ namespace Client | |||
| private void SetStaticValue(MessageOfStudent obj) | |||
| { | |||
| switch (obj.StudentType) // 参数未设定 | |||
| switch (obj.StudentType) // coolTime参数未设定, | |||
| { | |||
| case StudentType.Athlete: | |||
| coolTime = 10000; | |||
| serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType1"; | |||
| coolTime0 = coolTime1 = coolTime2 = 10000; | |||
| serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:Athlete"; | |||
| break; | |||
| case StudentType._2: | |||
| coolTime = 20000; | |||
| coolTime0 = coolTime1 = coolTime2 = 20000; | |||
| serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType2"; | |||
| break; | |||
| case StudentType._3: | |||
| coolTime = 30000; | |||
| coolTime0 = coolTime1 = coolTime2 = 30000; | |||
| serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType3"; | |||
| break; | |||
| case StudentType._4: | |||
| coolTime = 40000; | |||
| coolTime0 = coolTime1 = coolTime2 = 40000; | |||
| serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:StudentType4"; | |||
| break; | |||
| case StudentType.NullStudentType: | |||
| coolTime = 10000; | |||
| coolTime0 = coolTime1 = coolTime2 = -1; | |||
| serial.Text = "👥" + Convert.ToString(2) + "🧓" + Convert.ToString(obj.PlayerId) + "\n职业:NullStudentType"; | |||
| break; | |||
| } | |||
| activeSkill0.Text = "Skill0"; | |||
| activeSkill1.Text = "Skill1"; | |||
| activeSkill2.Text = "Skill2"; | |||
| initialized = true; | |||
| } | |||
| private void SetDynamicValue(MessageOfStudent obj) | |||
| { | |||
| int life; | |||
| int life= obj.Determination,death=obj.Addiction; | |||
| switch(obj.PlayerState) | |||
| { | |||
| case PlayerState.Idle: | |||
| life = obj.Determination; | |||
| status.Text = "♥:" + Convert.ToString(life); | |||
| status.Text = "♥:" + Convert.ToString(life)+"\nIdle"; | |||
| break; | |||
| case PlayerState.Learning: | |||
| status.Text = "♥:" + Convert.ToString(life)+ "\nLearning"; | |||
| break; | |||
| case PlayerState.Addicted: | |||
| life = obj.Addiction; | |||
| status.Text = "💀:" + Convert.ToString(life); | |||
| status.Text = "💀:" + Convert.ToString(death)+ "\nAddicted"; | |||
| break; | |||
| case PlayerState.Graduated: | |||
| status.Text = "Graduated"; | |||
| status.Text = status.Text = "♥" + "\nGraduated"; | |||
| break; | |||
| case PlayerState.Quit: | |||
| status.Text = "Quit"; | |||
| status.Text = "💀"+"\nQuit"; | |||
| break; | |||
| case PlayerState.Treated: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nTreated"; | |||
| break; | |||
| case PlayerState.Rescued: | |||
| status.Text = "💀:" + Convert.ToString(death)+ "\nRescued"; | |||
| break; | |||
| case PlayerState.Stunned: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nStunned"; | |||
| break; | |||
| case PlayerState.Treating: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nTreating"; | |||
| break; | |||
| case PlayerState.Rescuing: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nRescuing"; | |||
| break; | |||
| case PlayerState.Swinging: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nSwinging"; | |||
| break; | |||
| case PlayerState.Attacking: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nAttacking"; | |||
| break; | |||
| case PlayerState.Locking: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nLocking"; | |||
| break; | |||
| case PlayerState.Rummaging: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nRummaging"; | |||
| break; | |||
| case PlayerState.Climbing: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nClimbing"; | |||
| break; | |||
| case PlayerState.OpeningAChest: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nOpeningAChest"; | |||
| break; | |||
| case PlayerState.UsingSpecialSkill: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nUsingSpecialSkill"; | |||
| break; | |||
| case PlayerState.OpeningAGate: | |||
| status.Text = "♥:" + Convert.ToString(life) + "\nOpeningAGate"; | |||
| break; | |||
| default: | |||
| break; | |||
| }//不完全 | |||
| } | |||
| scores.Text = "Scores:" + obj.Score; | |||
| if (obj.TimeUntilSkillAvailable[0]>=0) | |||
| skillprogress0.Value = 100 - obj.TimeUntilSkillAvailable[0] / coolTime * 100; | |||
| skillprogress0.Value = 100 - obj.TimeUntilSkillAvailable[0] / coolTime0 * 100; | |||
| if(obj.TimeUntilSkillAvailable[1] >= 0) | |||
| skillprogress1.Value = 100 - obj.TimeUntilSkillAvailable[1] / coolTime * 100; | |||
| skillprogress1.Value = 100 - obj.TimeUntilSkillAvailable[1] / coolTime1 * 100; | |||
| if(obj.TimeUntilSkillAvailable[2] >= 0) | |||
| skillprogress2.Value = 100 - obj.TimeUntilSkillAvailable[2] / coolTime * 100; | |||
| skillprogress2.Value = 100 - obj.TimeUntilSkillAvailable[2] / coolTime2 * 100; | |||
| if (obj.PlayerState == PlayerState.Quit) | |||
| { | |||
| skillprogress0.Value = skillprogress1.Value = skillprogress2.Value = 0; | |||
| @@ -187,8 +230,7 @@ namespace Client | |||
| break; | |||
| default: | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| public void SetValue(MessageOfStudent obj) | |||
| @@ -197,7 +239,7 @@ namespace Client | |||
| SetStaticValue(obj); | |||
| SetDynamicValue(obj); | |||
| } | |||
| private int coolTime; | |||
| private int coolTime0, coolTime1, coolTime2; | |||
| private bool initialized; | |||
| } | |||
| } | |||
| @@ -304,7 +304,10 @@ | |||
| #### 伤害得分 | |||
| [Tricker对Student造成伤害时,得伤害*100/基本伤害(1500000)分。] | |||
| #### *[使用道具/技能得分——需要造成一定效果才能获取分数,仅使用不得分]* | |||
| #### *[使用道具/技能得分]* | |||
| ——需要造成一定效果才能获取分数,仅使用不得分 | |||
| - 不同道具/技能有不同得分 | |||
| #### 沉迷 | |||