统一调度尺量与界面优化

This commit is contained in:
ZouJin 2023-01-24 23:47:16 +08:00
parent 0ea5d40c79
commit 9f8edc1791
7 changed files with 90 additions and 82 deletions

View File

@ -124,16 +124,13 @@ namespace VPet_Simulator.Core
rasetype = -1; rasetype = -1;
DisplayRaising(); DisplayRaising();
} }
else else if (SmartMove)
{
if (SmartMove)
{ {
MoveTimer.AutoReset = true; MoveTimer.AutoReset = true;
SmartMoveTimer.Stop(); SmartMoveTimer.Stop();
SmartMoveTimer.Start(); SmartMoveTimer.Start();
} }
} }
}
private void MainGrid_MouseMove(object sender, MouseEventArgs e) private void MainGrid_MouseMove(object sender, MouseEventArgs e)
{ {

View File

@ -79,7 +79,7 @@ namespace VPet_Simulator.Core
/// </summary> /// </summary>
public void DisplayTouchHead() public void DisplayTouchHead()
{ {
if (Core.Save.Strength <= 50) if (Core.Save.Strength <= DistanceMin)
return; return;
Core.Save.StrengthChange(-1); Core.Save.StrengthChange(-1);
Core.Save.FeelingChange(1); Core.Save.FeelingChange(1);
@ -215,7 +215,7 @@ namespace VPet_Simulator.Core
public void DisplayWalk_Left() public void DisplayWalk_Left()
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceLeft() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -233,9 +233,9 @@ namespace VPet_Simulator.Core
private void DisplayWalk_Lefting() private void DisplayWalk_Lefting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceLeft() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or/爬墙 {//是,停下恢复默认 or/爬墙
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayFall_Left(() => DisplayFall_Left(() =>
@ -258,13 +258,13 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续右边走or停下 //不是:继续右边走or停下
if (Function.Rnd.Next(walklength++) < 5) if (Function.Rnd.Next(walklength++) < LoopMin)
{ {
Display(GraphCore.GraphType.Walk_Left_B_Loop, DisplayWalk_Lefting); Display(GraphCore.GraphType.Walk_Left_B_Loop, DisplayWalk_Lefting);
} }
else else
{//停下来 {//停下来
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
@ -295,7 +295,7 @@ namespace VPet_Simulator.Core
public void DisplayWalk_Right() public void DisplayWalk_Right()
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceRight() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -313,9 +313,9 @@ namespace VPet_Simulator.Core
private void DisplayWalk_Righting() private void DisplayWalk_Righting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceRight() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or/爬墙 {//是,停下恢复默认 or/爬墙
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Right_UP(() => DisplayClimb_Right_UP(() =>
@ -338,13 +338,13 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续右边走or停下 //不是:继续右边走or停下
if (Function.Rnd.Next(walklength++) < 5) if (Function.Rnd.Next(walklength++) < LoopMin)
{ {
Display(GraphCore.GraphType.Walk_Right_B_Loop, DisplayWalk_Righting); Display(GraphCore.GraphType.Walk_Right_B_Loop, DisplayWalk_Righting);
} }
else else
{//停下来 {//停下来
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
@ -375,7 +375,7 @@ namespace VPet_Simulator.Core
public void DisplayCrawl_Left() public void DisplayCrawl_Left()
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceLeft() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
Display(GraphCore.GraphType.Crawl_Left_A_Start, () => Display(GraphCore.GraphType.Crawl_Left_A_Start, () =>
@ -392,9 +392,9 @@ namespace VPet_Simulator.Core
private void DisplayCrawl_Lefting() private void DisplayCrawl_Lefting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceLeft() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or/爬墙 {//是,停下恢复默认 or/爬墙
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Left_UP(() => DisplayClimb_Left_UP(() =>
@ -417,7 +417,7 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续右边走or停下 //不是:继续右边走or停下
if (Function.Rnd.Next(walklength++) < 5) if (Function.Rnd.Next(walklength++) < LoopMin)
{ {
Display(GraphCore.GraphType.Crawl_Left_B_Loop, DisplayCrawl_Lefting); Display(GraphCore.GraphType.Crawl_Left_B_Loop, DisplayCrawl_Lefting);
} }
@ -433,7 +433,7 @@ namespace VPet_Simulator.Core
public void DisplayCrawl_Right() public void DisplayCrawl_Right()
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceRight() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
Display(GraphCore.GraphType.Crawl_Right_A_Start, () => Display(GraphCore.GraphType.Crawl_Right_A_Start, () =>
@ -450,9 +450,9 @@ namespace VPet_Simulator.Core
private void DisplayCrawl_Righting() private void DisplayCrawl_Righting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceRight() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or/爬墙 {//是,停下恢复默认 or/爬墙
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Right_UP(() => DisplayClimb_Right_UP(() =>
@ -475,7 +475,7 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续右边走or停下 //不是:继续右边走or停下
if (Function.Rnd.Next(walklength++) < 5) if (Function.Rnd.Next(walklength++) < LoopMin)
{ {
Display(GraphCore.GraphType.Crawl_Right_B_Loop, DisplayCrawl_Righting); Display(GraphCore.GraphType.Crawl_Right_B_Loop, DisplayCrawl_Righting);
} }
@ -491,7 +491,7 @@ namespace VPet_Simulator.Core
public void DisplayClimb_Left_UP(Action ifNot = null) public void DisplayClimb_Left_UP(Action ifNot = null)
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceLeft() < 100 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceUp() > 300 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() < DistanceMid * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceUp() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -512,9 +512,9 @@ namespace VPet_Simulator.Core
private void DisplayClimb_Lefting_UP() private void DisplayClimb_Lefting_UP()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceUp() < 100 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceUp() < DistanceMid * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or/爬上面的墙 {//是,停下恢复默认 or/爬上面的墙
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Top_Right(); DisplayClimb_Top_Right();
@ -529,13 +529,13 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 8) if (Function.Rnd.Next(walklength++) < LoopMid)
{ {
Display(GraphCore.GraphType.Climb_Left, DisplayClimb_Lefting_UP); Display(GraphCore.GraphType.Climb_Left, DisplayClimb_Lefting_UP);
} }
else else
{//停下来 {//停下来
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 1: case 1:
DisplayFall_Right(); DisplayFall_Right();
@ -553,7 +553,7 @@ namespace VPet_Simulator.Core
public void DisplayClimb_Left_DOWN(Action ifNot = null) public void DisplayClimb_Left_DOWN(Action ifNot = null)
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceLeft() < 50 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceDown() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() < DistanceMin * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceDown() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -575,13 +575,13 @@ namespace VPet_Simulator.Core
private void DisplayClimb_Lefting_DOWN() private void DisplayClimb_Lefting_DOWN()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceDown() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceDown() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 {//是,停下恢复默认
MoveTimer.Stop(); MoveTimer.Stop();
DisplayNomal(); DisplayNomal();
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 5) if (Function.Rnd.Next(walklength++) < LoopMin)
{ {
Display(GraphCore.GraphType.Climb_Left, DisplayClimb_Lefting_DOWN); Display(GraphCore.GraphType.Climb_Left, DisplayClimb_Lefting_DOWN);
} }
@ -597,7 +597,7 @@ namespace VPet_Simulator.Core
public void DisplayClimb_Right_UP(Action ifNot = null) public void DisplayClimb_Right_UP(Action ifNot = null)
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceRight() < 100 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceUp() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() < DistanceMid * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceUp() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -619,9 +619,9 @@ namespace VPet_Simulator.Core
private void DisplayClimb_Righting_UP() private void DisplayClimb_Righting_UP()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceUp() < 100 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceUp() < DistanceMid * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or/爬上面的墙 {//是,停下恢复默认 or/爬上面的墙
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Top_Left(); DisplayClimb_Top_Left();
@ -636,13 +636,13 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 5) if (Function.Rnd.Next(walklength++) < LoopMin)
{ {
Display(GraphCore.GraphType.Climb_Right, DisplayClimb_Righting_UP); Display(GraphCore.GraphType.Climb_Right, DisplayClimb_Righting_UP);
} }
else else
{//停下来 {//停下来
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayFall_Left(); DisplayFall_Left();
@ -660,7 +660,7 @@ namespace VPet_Simulator.Core
public void DisplayClimb_Right_DOWN(Action ifNot = null) public void DisplayClimb_Right_DOWN(Action ifNot = null)
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceRight() < 100 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceDown() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() < DistanceMid * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceDown() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -682,13 +682,13 @@ namespace VPet_Simulator.Core
private void DisplayClimb_Righting_DOWN() private void DisplayClimb_Righting_DOWN()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceDown() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceDown() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 {//是,停下恢复默认
MoveTimer.Stop(); MoveTimer.Stop();
DisplayNomal(); DisplayNomal();
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 5) if (Function.Rnd.Next(walklength++) < LoopMin)
{ {
Display(GraphCore.GraphType.Climb_Right, DisplayClimb_Righting_DOWN); Display(GraphCore.GraphType.Climb_Right, DisplayClimb_Righting_DOWN);
} }
@ -704,7 +704,7 @@ namespace VPet_Simulator.Core
public void DisplayClimb_Top_Right() public void DisplayClimb_Top_Right()
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceUp() < 100 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceRight() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceUp() < DistanceMid * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceRight() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -721,9 +721,9 @@ namespace VPet_Simulator.Core
private void DisplayClimb_Top_Righting() private void DisplayClimb_Top_Righting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceRight() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or向下爬or掉落 {//是,停下恢复默认 or向下爬or掉落
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Right_DOWN(); DisplayClimb_Right_DOWN();
@ -739,7 +739,7 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 10) if (Function.Rnd.Next(walklength++) < LoopMax)
{ {
Display(GraphType.Climb_Top_Right, DisplayClimb_Top_Righting); Display(GraphType.Climb_Top_Right, DisplayClimb_Top_Righting);
} }
@ -756,7 +756,7 @@ namespace VPet_Simulator.Core
public void DisplayClimb_Top_Left() public void DisplayClimb_Top_Left()
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceUp() < 100 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceLeft() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceUp() < DistanceMid * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceLeft() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
@ -773,9 +773,9 @@ namespace VPet_Simulator.Core
private void DisplayClimb_Top_Lefting() private void DisplayClimb_Top_Lefting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceLeft() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or向下爬 {//是,停下恢复默认 or向下爬
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Left_DOWN(); DisplayClimb_Left_DOWN();
@ -791,7 +791,7 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 10) if (Function.Rnd.Next(walklength++) < LoopMax)
{ {
Display(GraphCore.GraphType.Climb_Top_Left, DisplayClimb_Top_Lefting); Display(GraphCore.GraphType.Climb_Top_Left, DisplayClimb_Top_Lefting);
} }
@ -808,11 +808,11 @@ namespace VPet_Simulator.Core
public void DisplayFall_Left(Action ifNot = null) public void DisplayFall_Left(Action ifNot = null)
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceDown() > 400 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceLeft() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceDown() > DistanceMax * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceLeft() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
//Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio - 150); //Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio - 1DistanceMin);
MoveTimerPoint = new Point(-Core.Graph.GraphConfig.SpeedFallX, Core.Graph.GraphConfig.SpeedFallY); MoveTimerPoint = new Point(-Core.Graph.GraphConfig.SpeedFallX, Core.Graph.GraphConfig.SpeedFallY);
MoveTimer.Start(); MoveTimer.Start();
Display(GraphType.Fall_Left_A_Start, DisplayFall_Lefting); Display(GraphType.Fall_Left_A_Start, DisplayFall_Lefting);
@ -826,9 +826,9 @@ namespace VPet_Simulator.Core
private void DisplayFall_Lefting() private void DisplayFall_Lefting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceLeft() < 50 * Core.Controller.ZoomRatio || Core.Controller.GetWindowsDistanceDown() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceLeft() < DistanceMin * Core.Controller.ZoomRatio || Core.Controller.GetWindowsDistanceDown() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or向上爬 {//是,停下恢复默认 or向上爬
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Left_UP(() => DisplayClimb_Left_UP(() =>
@ -852,7 +852,7 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 7) if (Function.Rnd.Next(walklength++) < LoopMid)
{ {
Display(GraphCore.GraphType.Fall_Left_B_Loop, DisplayFall_Lefting); Display(GraphCore.GraphType.Fall_Left_B_Loop, DisplayFall_Lefting);
} }
@ -871,11 +871,11 @@ namespace VPet_Simulator.Core
public void DisplayFall_Right(Action ifNot = null) public void DisplayFall_Right(Action ifNot = null)
{ {
//看看距离是否满足调节 //看看距离是否满足调节
if (Core.Controller.GetWindowsDistanceDown() > 400 * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceRight() > 400 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceDown() > DistanceMax * Core.Controller.ZoomRatio && Core.Controller.GetWindowsDistanceRight() > DistanceMax * Core.Controller.ZoomRatio)
{ {
walklength = 0; walklength = 0;
CountNomal = 0; CountNomal = 0;
//Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio - 150); //Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio - 1DistanceMin);
MoveTimerPoint = new Point(Core.Graph.GraphConfig.SpeedFallX, Core.Graph.GraphConfig.SpeedFallY); MoveTimerPoint = new Point(Core.Graph.GraphConfig.SpeedFallX, Core.Graph.GraphConfig.SpeedFallY);
MoveTimer.Start(); MoveTimer.Start();
Display(GraphType.Fall_Right_A_Start, DisplayFall_Righting); Display(GraphType.Fall_Right_A_Start, DisplayFall_Righting);
@ -889,9 +889,9 @@ namespace VPet_Simulator.Core
private void DisplayFall_Righting() private void DisplayFall_Righting()
{ {
//看看距离是不是不足 //看看距离是不是不足
if (Core.Controller.GetWindowsDistanceRight() < 50 * Core.Controller.ZoomRatio || Core.Controller.GetWindowsDistanceDown() < 50 * Core.Controller.ZoomRatio) if (Core.Controller.GetWindowsDistanceRight() < DistanceMin * Core.Controller.ZoomRatio || Core.Controller.GetWindowsDistanceDown() < DistanceMin * Core.Controller.ZoomRatio)
{//是,停下恢复默认 or向上爬 {//是,停下恢复默认 or向上爬
switch (Function.Rnd.Next(3)) switch (Function.Rnd.Next(TreeRND))
{ {
case 0: case 0:
DisplayClimb_Right_UP(() => DisplayClimb_Right_UP(() =>
@ -915,7 +915,7 @@ namespace VPet_Simulator.Core
} }
} }
//不是:继续or停下 //不是:继续or停下
if (Function.Rnd.Next(walklength++) < 7) if (Function.Rnd.Next(walklength++) < LoopMid)
{ {
Display(GraphCore.GraphType.Fall_Right_B_Loop, DisplayFall_Righting); Display(GraphCore.GraphType.Fall_Right_B_Loop, DisplayFall_Righting);
} }

View File

@ -10,6 +10,13 @@ namespace VPet_Simulator.Core
{ {
public partial class Main public partial class Main
{ {
public const int DistanceMax = 100;
public const int DistanceMid = 100;
public const int DistanceMin = 50;
public const int LoopMax = 10;
public const int LoopMid = 7;
public const int LoopMin = 5;
public const int TreeRND = 4;
public Timer EventTimer = new Timer(15000) public Timer EventTimer = new Timer(15000)
{ {
@ -77,10 +84,9 @@ namespace VPet_Simulator.Core
Dispatcher.Invoke(() => TimeUIHandle.Invoke(this)); Dispatcher.Invoke(() => TimeUIHandle.Invoke(this));
if (DisplayType == GraphCore.GraphType.Default && !isPress) if (DisplayType == GraphCore.GraphType.Default && !isPress)
switch (Function.Rnd.Next(Math.Max(23, Core.Controller.InteractionCycle - CountNomal))) switch (Function.Rnd.Next(Math.Max(20, Core.Controller.InteractionCycle - CountNomal)))
{ {
case 0: case 0:
case 7:
//随机向右 //随机向右
DisplayWalk_Left(); DisplayWalk_Left();
break; break;
@ -97,21 +103,26 @@ namespace VPet_Simulator.Core
DisplayClimb_Right_DOWN(); DisplayClimb_Right_DOWN();
break; break;
case 5: case 5:
case 6:
DisplayWalk_Right(); DisplayWalk_Right();
break; break;
case 8: case 6:
DisplayFall_Left(); DisplayFall_Left();
break; break;
case 9: case 7:
DisplayFall_Right(); DisplayFall_Right();
break; break;
case 10: case 8:
DisplayClimb_Top_Right(); DisplayClimb_Top_Right();
break; break;
case 11: case 9:
DisplayClimb_Top_Left(); DisplayClimb_Top_Left();
break; break;
case 10:
DisplayCrawl_Left();
break;
case 11:
DisplayCrawl_Right();
break;
case 15: case 15:
case 16: case 16:
DisplayBoring(); DisplayBoring();
@ -120,14 +131,6 @@ namespace VPet_Simulator.Core
case 17: case 17:
DisplaySquat(); DisplaySquat();
break; break;
case 19:
case 20:
DisplayCrawl_Left();
break;
case 21:
case 22:
DisplayCrawl_Right();
break;
default: default:
break; break;
} }

View File

@ -46,7 +46,9 @@
</Button.ContentTemplate> </Button.ContentTemplate>
</Button> </Button>
<TextBlock x:Name="till" Grid.Row="1" Grid.ColumnSpan="5" Foreground="#FF4C4C" TextWrapping="Wrap" <TextBlock x:Name="till" Grid.Row="1" Grid.ColumnSpan="5" Foreground="#FF4C4C" TextWrapping="Wrap"
Text="宠物已经生病。通过服用药物可以恢复。" /> Text="宠物已经生病, 通过服用药物可以恢复" />
<TextBlock x:Name="tfun" Grid.Row="1" Grid.ColumnSpan="5" Foreground="#4caf50" TextWrapping="Wrap"
Text="已关闭数据计算, 可放心挂机" />
<TextBlock Grid.Row="2" Text="金钱" VerticalAlignment="Center" /> <TextBlock Grid.Row="2" Text="金钱" VerticalAlignment="Center" />
<TextBlock x:Name="tMoney" Grid.Row="2" Grid.Column="2" Foreground="{DynamicResource DARKPrimary}" <TextBlock x:Name="tMoney" Grid.Row="2" Grid.Column="2" Foreground="{DynamicResource DARKPrimary}"
Text="¥100,000" /> Text="¥100,000" />

View File

@ -51,7 +51,16 @@ namespace VPet_Simulator.Core
{ {
Tlv.Text = "Lv " + m.Core.Save.Level.ToString(); Tlv.Text = "Lv " + m.Core.Save.Level.ToString();
tMoney.Text = "$ " + m.Core.Save.Money.ToString("N2"); tMoney.Text = "$ " + m.Core.Save.Money.ToString("N2");
if (m.Core.Controller.EnableFunction)
{
till.Visibility = m.Core.Save.Mode == Save.ModeType.Ill ? Visibility.Visible : Visibility.Collapsed; till.Visibility = m.Core.Save.Mode == Save.ModeType.Ill ? Visibility.Visible : Visibility.Collapsed;
tfun.Visibility = Visibility.Collapsed;
}
else
{
till.Visibility = Visibility.Collapsed;
tfun.Visibility = Visibility.Visible;
}
pExp.Maximum = m.Core.Save.LevelUpNeed(); pExp.Maximum = m.Core.Save.LevelUpNeed();
pExp.Value = m.Core.Save.Exp; pExp.Value = m.Core.Save.Exp;
pStrength.Value = m.Core.Save.Strength; pStrength.Value = m.Core.Save.Strength;

View File

@ -156,9 +156,6 @@ namespace VPet_Simulator.Windows
{ {
Main.CleanState(); Main.CleanState();
Main.DisplayNomal(); Main.DisplayNomal();
}));
m_menu.MenuItems.Add(new MenuItem("屏幕居中", (x, y) =>
{
Left = (SystemParameters.PrimaryScreenWidth - Width) / 2; Left = (SystemParameters.PrimaryScreenWidth - Width) / 2;
Top = (SystemParameters.PrimaryScreenHeight - Height) / 2; Top = (SystemParameters.PrimaryScreenHeight - Height) / 2;
})); }));

View File

@ -478,7 +478,7 @@
<Run>版本</Run><LineBreak /> <Run>版本</Run><LineBreak />
<Run>激活</Run><LineBreak /> <Run>激活</Run><LineBreak />
</TextBlock> </TextBlock>
<TextBlock VerticalAlignment="Top" Margin="100,30,0,0"> <TextBlock VerticalAlignment="Top" Margin="100,30,0,0" TextWrapping="WrapWithOverflow">
<Run x:Name="runUserName">杨远洛里斯</Run><LineBreak /> <Run x:Name="runUserName">杨远洛里斯</Run><LineBreak />
<Run x:Name="runabVer">v1.0 (100)</Run><LineBreak /> <Run x:Name="runabVer">v1.0 (100)</Run><LineBreak />
<Run x:Name="runActivate">已通过Steam[uid]激活服务注册</Run><LineBreak /> <Run x:Name="runActivate">已通过Steam[uid]激活服务注册</Run><LineBreak />