diff --git a/VPet-Simulator.Core/Display/Main.xaml.cs b/VPet-Simulator.Core/Display/Main.xaml.cs index 1c28745..526a215 100644 --- a/VPet-Simulator.Core/Display/Main.xaml.cs +++ b/VPet-Simulator.Core/Display/Main.xaml.cs @@ -187,7 +187,7 @@ namespace VPet_Simulator.Core /// public void CleanState() { - MoveTimer.Stop(); + MoveTimer.Enabled = false; MainGrid.MouseMove -= MainGrid_MouseMove; } } diff --git a/VPet-Simulator.Core/Display/MainDisplay.cs b/VPet-Simulator.Core/Display/MainDisplay.cs index 35a7dc8..0341f0c 100644 --- a/VPet-Simulator.Core/Display/MainDisplay.cs +++ b/VPet-Simulator.Core/Display/MainDisplay.cs @@ -327,19 +327,19 @@ namespace VPet_Simulator.Core case 0: DisplayFall_Left(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); }); return; case 1: DisplayFall_Right(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); }); return; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); return; } @@ -357,19 +357,19 @@ namespace VPet_Simulator.Core case 0: DisplayFall_Left(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); }); break; case 1: DisplayFall_Right(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); }); break; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); break; @@ -407,19 +407,19 @@ namespace VPet_Simulator.Core case 0: DisplayClimb_Right_UP(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Right_C_End, DisplayNomal); }); return; case 1: DisplayClimb_Right_DOWN(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Right_C_End, DisplayNomal); }); return; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Right_C_End, DisplayNomal); return; } @@ -437,19 +437,19 @@ namespace VPet_Simulator.Core case 0: DisplayFall_Left(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); }); break; case 1: DisplayFall_Right(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); }); break; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Walk_Left_C_End, DisplayNomal); break; @@ -486,19 +486,19 @@ namespace VPet_Simulator.Core case 0: DisplayClimb_Left_UP(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Left_C_End, DisplayNomal); }); return; case 1: DisplayClimb_Left_DOWN(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Left_C_End, DisplayNomal); }); return; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Left_C_End, DisplayNomal); return; } @@ -510,7 +510,7 @@ namespace VPet_Simulator.Core } else {//停下来 - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Left_C_End, DisplayNomal); } } @@ -544,19 +544,19 @@ namespace VPet_Simulator.Core case 0: DisplayClimb_Right_UP(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Right_C_End, DisplayNomal); }); return; case 1: DisplayClimb_Right_DOWN(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Right_C_End, DisplayNomal); }); return; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Right_C_End, DisplayNomal); return; } @@ -568,7 +568,7 @@ namespace VPet_Simulator.Core } else {//停下来 - MoveTimer.Stop(); + MoveTimer.Enabled = false; Display(GraphCore.GraphType.Crawl_Right_C_End, DisplayNomal); } } @@ -610,7 +610,7 @@ namespace VPet_Simulator.Core DisplayFall_Right(); return; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); return; } @@ -628,7 +628,7 @@ namespace VPet_Simulator.Core DisplayFall_Right(); break; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); break; } @@ -664,7 +664,7 @@ namespace VPet_Simulator.Core //看看距离是不是不足 if (Core.Controller.GetWindowsDistanceDown() < DistanceMin * Core.Controller.ZoomRatio) {//是,停下恢复默认 - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); } //不是:继续or停下 @@ -674,7 +674,7 @@ namespace VPet_Simulator.Core } else {//停下来 - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); } } @@ -717,7 +717,7 @@ namespace VPet_Simulator.Core DisplayFall_Left(); return; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); return; } @@ -735,7 +735,7 @@ namespace VPet_Simulator.Core DisplayFall_Left(); break; default: - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); break; } @@ -771,7 +771,7 @@ namespace VPet_Simulator.Core //看看距离是不是不足 if (Core.Controller.GetWindowsDistanceDown() < DistanceMin * Core.Controller.ZoomRatio) {//是,停下恢复默认 - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); } //不是:继续or停下 @@ -781,7 +781,7 @@ namespace VPet_Simulator.Core } else {//停下来 - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayNomal(); } } @@ -820,7 +820,7 @@ namespace VPet_Simulator.Core return; default: Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); return; } @@ -833,7 +833,7 @@ namespace VPet_Simulator.Core else {//停下来 Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); } } @@ -872,7 +872,7 @@ namespace VPet_Simulator.Core return; default: Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); return; } @@ -885,7 +885,7 @@ namespace VPet_Simulator.Core else {//停下来 Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); } } @@ -920,20 +920,20 @@ namespace VPet_Simulator.Core case 0: DisplayClimb_Left_UP(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Left(); }); return; case 1: DisplayClimb_Left_DOWN(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Left(); }); return; default: //Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Left(); return; } @@ -946,7 +946,7 @@ namespace VPet_Simulator.Core else {//停下来 //Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Left(); //DisplayNomal(); } @@ -983,20 +983,20 @@ namespace VPet_Simulator.Core case 0: DisplayClimb_Right_UP(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); }); return; case 1: DisplayClimb_Right_DOWN(() => { - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); }); return; default: //Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); return; } @@ -1009,7 +1009,7 @@ namespace VPet_Simulator.Core else {//停下来 //Core.Controller.MoveWindows(0, -Core.Controller.GetWindowsDistanceUp() / Core.Controller.ZoomRatio); - MoveTimer.Stop(); + MoveTimer.Enabled = false; DisplayFalled_Right(); //DisplayNomal(); } diff --git a/VPet-Simulator.Core/Display/MessageBar.xaml b/VPet-Simulator.Core/Display/MessageBar.xaml index 16464ef..1e00757 100644 --- a/VPet-Simulator.Core/Display/MessageBar.xaml +++ b/VPet-Simulator.Core/Display/MessageBar.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="clr-namespace:VPet_Simulator.Core" mc:Ignorable="d" Height="500" + xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" xmlns:local="clr-namespace:VPet_Simulator.Core" mc:Ignorable="d" Height="500" Width="500" MouseDoubleClick="UserControl_MouseDoubleClick"> diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index 986dff9..adfb4fd 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -56,7 +56,15 @@ namespace VPet_Simulator.Windows { IsSteamUser = false; } - + //给正在玩这个游戏的主播/游戏up主做个小功能 + if (IsSteamUser) + { + rndtext.Add($"关注 {Steamworks.SteamClient.Name} 谢谢喵"); + } + else + { + rndtext.Add($"关注 {Environment.UserName} 谢谢喵"); + } //加载游戏设置 if (new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"\Setting.lps").Exists) { @@ -82,7 +90,7 @@ namespace VPet_Simulator.Windows } Task.Run(GameLoad); } - private string[] rndtext = new string[] + private List rndtext = new List { "你知道吗? 鼠标右键可以打开菜单栏", "如果你觉得目前功能太少,那就多挂会机. 宠物会自己动的", @@ -93,7 +101,7 @@ namespace VPet_Simulator.Windows "你添加了虚拟主播模拟器和虚拟桌宠模拟器到愿望单了吗? 快去加吧", "这游戏开发这么慢,都怪画师太咕了.\n记得多催催画师(@叶书天)画桌宠, 催的越快更新越快!", "长按脑袋拖动桌宠到你喜欢的任意位置", - "欢迎加入 虚拟主播模拟器群 430081239", + "欢迎加入 虚拟主播模拟器群 430081239", }; private long lastclicktime; public void GameLoad() @@ -156,7 +164,7 @@ namespace VPet_Simulator.Windows if (new TimeSpan(DateTime.Now.Ticks - lastclicktime).TotalSeconds > 20) { lastclicktime = DateTime.Now.Ticks; - Dispatcher.Invoke(() => Main.Say(rndtext[Function.Rnd.Next(rndtext.Length)])); + Dispatcher.Invoke(() => Main.Say(rndtext[Function.Rnd.Next(rndtext.Count)])); } }; DisplayGrid.Child = Main; diff --git a/VPet-Simulator.Windows/WinDesign/winConsole.xaml b/VPet-Simulator.Windows/WinDesign/winConsole.xaml index a3701e2..144b4bf 100644 --- a/VPet-Simulator.Windows/WinDesign/winConsole.xaml +++ b/VPet-Simulator.Windows/WinDesign/winConsole.xaml @@ -1,21 +1,30 @@  - + xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" Title="桌宠管理控制台" Height="450" Width="450" + FontSize="16"> + - -