Browse Source

fix: 🐛 Make the character in the correct position

Make the character in the correct position
tags/0.1.0
Shawqeem 3 years ago
parent
commit
567648ab1d
3 changed files with 16 additions and 15 deletions
  1. +12
    -11
      logic/Client/MainWindow.xaml.cs
  2. +2
    -2
      logic/Client/StatusBarOfHunter.xaml.cs
  3. +2
    -2
      logic/Client/StatusBarOfSurvivor.xaml.cs

+ 12
- 11
logic/Client/MainWindow.xaml.cs View File

@@ -690,16 +690,16 @@ namespace Client
DrawMap();
foreach (var data in listOfHuman)
{
StatusBarsOfSurvivor[data.PlayerId].SetValue(data,coolTime0,coolTime1,coolTime2);
StatusBarsOfSurvivor[data.PlayerId].SetValue(data, coolTime0, coolTime1, coolTime2);
if (CanSee(data))
{
Ellipse icon = new()
{
Width = unitWidth,
Height = unitHeight,
Width = 2 * radiusTimes * unitWidth,
Height = 2 * radiusTimes * 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(data.Y * unitWidth / 1000.0 - unitWidth * radiusTimes, data.X * unitHeight / 1000.0 - unitHeight * radiusTimes, 0, 0),
Fill = Brushes.BlueViolet,
};
UpperLayerOfMap.Children.Add(icon);
@@ -712,11 +712,11 @@ namespace Client
{
Ellipse icon = new()
{
Width = unitWidth,
Height = unitHeight,
Width = 2 * radiusTimes * unitWidth,
Height = 2 * radiusTimes * 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(data.Y * unitWidth / 1000.0 - unitWidth * radiusTimes, data.X * unitHeight / 1000.0 - unitHeight * radiusTimes, 0, 0),
Fill = Brushes.Chocolate,
};
UpperLayerOfMap.Children.Add(icon);
@@ -831,7 +831,7 @@ namespace Client
int deg = (int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfFixedGenerator);
TextBox icon = new()
{
FontSize = 9 * UpperLayerOfMap.ActualHeight / 650,
FontSize = 8 * UpperLayerOfMap.ActualHeight / 650,
Width = unitWidth,
Height = unitHeight,
Text = Convert.ToString(deg),
@@ -853,7 +853,7 @@ namespace Client
int deg = (int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfOpenedChest);
TextBox icon = new()
{
FontSize = 9 * UpperLayerOfMap.ActualHeight / 650,
FontSize = 8 * UpperLayerOfMap.ActualHeight / 650,
Width = unitWidth,
Height = unitHeight,
Text = Convert.ToString(deg),
@@ -875,7 +875,7 @@ namespace Client
int deg = (int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfOpenedDoorway);
TextBox icon = new()
{
FontSize = 9 * UpperLayerOfMap.ActualHeight / 650,
FontSize = 8 * UpperLayerOfMap.ActualHeight / 650,
Width = unitWidth,
Height = unitHeight,
Text = Convert.ToString(deg),
@@ -1342,6 +1342,7 @@ namespace Client
private string[] comInfo = new string[5];
ArgumentOptions? options = null;
bool gateOpened = false;
double coolTime0=-1,coolTime1=-1,coolTime2=-1;
double coolTime0 = -1, coolTime1 = -1, coolTime2 = -1;
const double radiusTimes = 1.0 * Preparation.Utility.GameData.characterRadius / Preparation.Utility.GameData.numOfPosGridPerCell;
}
}

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

@@ -39,7 +39,7 @@ namespace Client
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,double time0, double time1, double time2)
private void SetStaticValue(MessageOfTricker obj, double time0, double time1, double time2)
{
switch (obj.TrickerType) // 参数未设定
{
@@ -289,7 +289,7 @@ namespace Client
public void SetValue(MessageOfTricker obj, double time0, double time1, double time2)
{
if (!initialized)
SetStaticValue(obj,time0,time1,time2);
SetStaticValue(obj, time0, time1, time2);
SetDynamicValue(obj);
}
private double coolTime0, coolTime1, coolTime2;


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

@@ -33,7 +33,7 @@ namespace Client
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,double time0, double time1, double time2)
private void SetStaticValue(MessageOfStudent obj, double time0, double time1, double time2)
{
switch (obj.StudentType) // coolTime参数未设定,
{
@@ -286,7 +286,7 @@ namespace Client
public void SetValue(MessageOfStudent obj, double time0, double time1, double time2)
{
if (!initialized)
SetStaticValue(obj,time0,time1,time2);
SetStaticValue(obj, time0, time1, time2);
SetDynamicValue(obj);
}
private double coolTime0, coolTime1, coolTime2;


Loading…
Cancel
Save