diff --git a/VPet-Simulator.Core/Display/Main.xaml b/VPet-Simulator.Core/Display/Main.xaml index d04ee5a..803b4f7 100644 --- a/VPet-Simulator.Core/Display/Main.xaml +++ b/VPet-Simulator.Core/Display/Main.xaml @@ -8,11 +8,10 @@ x:FieldModifier="public" MouseLeftButtonUp="MainGrid_MouseLeftButtonUp" MouseRightButtonDown="MainGrid_MouseRightButtonDown" MouseMove="MainGrid_MouseWave"> - + - - + diff --git a/VPet-Simulator.Core/Display/MainLogic.cs b/VPet-Simulator.Core/Display/MainLogic.cs index 31961af..53f84b6 100644 --- a/VPet-Simulator.Core/Display/MainLogic.cs +++ b/VPet-Simulator.Core/Display/MainLogic.cs @@ -68,7 +68,16 @@ namespace VPet_Simulator.Core { if (Function.Rnd.Next(lowstrengthAskCount--) == 0) { - Say("肚子饿了,想吃东西", GraphCore.Helper.SayType.Serious);//TODO:饥饿动画//TODO:不同的饥饿说话方式 + Display(GraphCore.GraphType.Switch_Thirsty, () => Say("肚子饿了,想吃东西", GraphCore.Helper.SayType.Serious));//TODO:不同的饥饿说话方式 + lowstrengthAskCount = 15; + } + + } + private void lowStrengthDrink()//未来的Display + { + if (Function.Rnd.Next(lowstrengthAskCount--) == 0) + { + Display(GraphCore.GraphType.Switch_Thirsty, () => Say("渴了,想喝东西", GraphCore.Helper.SayType.Serious));//TODO:不同的饥饿说话方式 lowstrengthAskCount = 15; } @@ -216,6 +225,7 @@ namespace VPet_Simulator.Core if (Core.Save.StrengthDrink <= 25) { Core.Save.Health -= Function.Rnd.Next(0, 1) * TimePass; + lowStrengthDrink(); } else if (Core.Save.StrengthDrink >= 75) Core.Save.Health += Function.Rnd.Next(0, 1) * TimePass; diff --git a/VPet-Simulator.Core/Display/MessageBar.xaml b/VPet-Simulator.Core/Display/MessageBar.xaml index 32c60c2..bad8067 100644 --- a/VPet-Simulator.Core/Display/MessageBar.xaml +++ b/VPet-Simulator.Core/Display/MessageBar.xaml @@ -7,7 +7,7 @@ - diff --git a/VPet-Simulator.Core/Display/MessageBar.xaml.cs b/VPet-Simulator.Core/Display/MessageBar.xaml.cs index 4da1af7..dedaa27 100644 --- a/VPet-Simulator.Core/Display/MessageBar.xaml.cs +++ b/VPet-Simulator.Core/Display/MessageBar.xaml.cs @@ -147,5 +147,17 @@ namespace VPet_Simulator.Core ShowTimer.Dispose(); CloseTimer.Dispose(); } + public void SetPlaceIN() + { + this.Height = 500; + BorderMain.VerticalAlignment = VerticalAlignment.Bottom; + Margin = new Thickness(0); + } + public void SetPlaceOUT() + { + this.Height = double.NaN; + BorderMain.VerticalAlignment = VerticalAlignment.Top; + Margin = new Thickness(0, 500, 0, 0); + } } } diff --git a/VPet-Simulator.Core/Display/ToolBar.xaml b/VPet-Simulator.Core/Display/ToolBar.xaml index 9d07fe9..5aa8350 100644 --- a/VPet-Simulator.Core/Display/ToolBar.xaml +++ b/VPet-Simulator.Core/Display/ToolBar.xaml @@ -3,7 +3,7 @@ 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" xmlns:pu="https://opensource.panuon.com/wpf-ui" MouseEnter="UserControl_MouseEnter" - MouseLeave="UserControl_MouseLeave" Height="500" Width="500"> + MouseLeave="UserControl_MouseLeave" Height="500" Width="500" VerticalAlignment="Top"> diff --git a/VPet-Simulator.Core/Graph/GraphCore.cs b/VPet-Simulator.Core/Graph/GraphCore.cs index 855ef28..95a2760 100644 --- a/VPet-Simulator.Core/Graph/GraphCore.cs +++ b/VPet-Simulator.Core/Graph/GraphCore.cs @@ -312,6 +312,10 @@ namespace VPet_Simulator.Core /// 直播 (结束) /// WorkTWO_C_End, + /// + /// 口渴 + /// + Switch_Thirsty, } /// diff --git a/VPet-Simulator.Core/Handle/IController.cs b/VPet-Simulator.Core/Handle/IController.cs index d19766c..b55516d 100644 --- a/VPet-Simulator.Core/Handle/IController.cs +++ b/VPet-Simulator.Core/Handle/IController.cs @@ -63,6 +63,6 @@ namespace VPet_Simulator.Core /// /// 互动周期 /// - int InteractionCycle { get; } + int InteractionCycle { get; } } } diff --git a/VPet-Simulator.Core/Handle/PetLoader.cs b/VPet-Simulator.Core/Handle/PetLoader.cs index c928308..da64724 100644 --- a/VPet-Simulator.Core/Handle/PetLoader.cs +++ b/VPet-Simulator.Core/Handle/PetLoader.cs @@ -87,7 +87,7 @@ namespace VPet_Simulator.Core } } #if DEBUG - throw new Exception("未知的图像类型: " + path_name); + //throw new Exception("未知的图像类型: " + path_name); #endif } else if (File.Exists(di.FullName + @"\info.lps")) diff --git a/VPet-Simulator.Windows.Interface/Setting.cs b/VPet-Simulator.Windows.Interface/Setting.cs index 7dd704f..32f6953 100644 --- a/VPet-Simulator.Windows.Interface/Setting.cs +++ b/VPet-Simulator.Windows.Interface/Setting.cs @@ -237,6 +237,14 @@ namespace VPet_Simulator.Windows.Interface set => this["gameconfig"].SetInt("smartmoveinterval", value); } /// + /// 消息框外置 + /// + public bool MessageBarOutside + { + get => this["gameconfig"].GetBool("msgbarout"); + set => this["gameconfig"].SetBool("msgbarout", value); + } + /// /// 开机启动 /// public bool StartUPBoot diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 17b6b54..6b09b5e 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -34,7 +34,7 @@ namespace VPet_Simulator.Windows /// /// 版本号 /// - public int verison { get; } = 10; + public int verison { get; } = 40; /// /// 版本号 /// diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index f8e8862..65ba003 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -268,6 +268,9 @@ namespace VPet_Simulator.Windows Main.SetMoveMode(Set.AllowMove, Set.SmartMove, Set.SmartMoveInterval * 1000); Main.SetLogicInterval((int)(Set.LogicInterval * 1000)); + if (Set.MessageBarOutside) + Main.MsgBar.SetPlaceOUT(); + //加载图标 notifyIcon = new NotifyIcon(); notifyIcon.Text = "虚拟桌宠模拟器"; diff --git a/VPet-Simulator.Windows/WinDesign/TalkBox.xaml b/VPet-Simulator.Windows/WinDesign/TalkBox.xaml index 143f1f7..f572d27 100644 --- a/VPet-Simulator.Windows/WinDesign/TalkBox.xaml +++ b/VPet-Simulator.Windows/WinDesign/TalkBox.xaml @@ -2,7 +2,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:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500"> + xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500" VerticalAlignment="Top"> diff --git a/VPet-Simulator.Windows/WinDesign/TalkBoxAPI.xaml b/VPet-Simulator.Windows/WinDesign/TalkBoxAPI.xaml index 0580b9e..20a180d 100644 --- a/VPet-Simulator.Windows/WinDesign/TalkBoxAPI.xaml +++ b/VPet-Simulator.Windows/WinDesign/TalkBoxAPI.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:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500"> + xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500" VerticalAlignment="Top"> diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml index e814ad9..43d0ea1 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml @@ -115,6 +115,13 @@ BorderThickness="2" Click="BtnStartUpGet_Click" /> + + @@ -126,7 +133,7 @@ CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35" BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}" ToggleBrush="{DynamicResource PrimaryDark}" Content="开机启动" - CheckedToggleBrush="{DynamicResource DARKPrimaryText}" ToolTip="该游戏随着开机启动该程序" + CheckedToggleBrush="{DynamicResource DARKPrimaryText}" ToolTip="该游戏随着开机启动该程序 如需卸载游戏,请关闭该选项" Checked="StartUpBox_Checked" Unchecked="StartUpBox_Checked" />