Skip to content

Commit

Permalink
更新生病相关动画
Browse files Browse the repository at this point in the history
  • Loading branch information
LorisYounger committed Mar 4, 2023
1 parent f436ebc commit 543bff7
Show file tree
Hide file tree
Showing 137 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion VPet-Simulator.Core/Display/Main.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Core"
mc:Ignorable="d" d:DesignHeight="250" d:DesignWidth="250">
<Viewbox>
<Grid x:Name="MainGrid" Width="500" Height="500" MouseLeftButtonDown="MainGrid_MouseLeftButtonDown"
<Grid x:Name="MainGrid" Width="500" Height="500" MouseLeftButtonDown="MainGrid_MouseLeftButtonDown" x:FieldModifier="public"
MouseLeftButtonUp="MainGrid_MouseLeftButtonUp" MouseRightButtonDown="MainGrid_MouseRightButtonDown" MouseMove="MainGrid_MouseWave">
<Border x:Name="PetGrid" VerticalAlignment="Bottom" />
<Border x:Name="PetGrid2" VerticalAlignment="Bottom" />
Expand Down
4 changes: 2 additions & 2 deletions VPet-Simulator.Core/Display/Main.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ private void MainGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
private void MainGrid_MouseMove(object sender, MouseEventArgs e)
{
var mp = e.GetPosition(MainGrid);
var x = mp.X - Core.Graph.GraphConfig.RaisePoint.X;
var y = mp.Y - Core.Graph.GraphConfig.RaisePoint.Y;
var x = mp.X - Core.Graph.GraphConfig.RaisePoint[(int)Core.Save.Mode].X;
var y = mp.Y - Core.Graph.GraphConfig.RaisePoint[(int)Core.Save.Mode].Y;
Core.Controller.MoveWindows(x, y);
if (Math.Abs(x) + Math.Abs(y) > 10)
rasetype = 0;
Expand Down
1 change: 1 addition & 0 deletions VPet-Simulator.Core/Display/MainLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private void EventTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
else
{
Core.Save.Mode = Save.ModeType.Happy;
//Core.Save.Mode = Save.ModeType.Ill;
}

//UIHandle
Expand Down
4 changes: 3 additions & 1 deletion VPet-Simulator.Core/Display/MessageBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
<Label x:Name="LName" Content="虚拟桌宠名字:" Foreground="{DynamicResource PrimaryText}" HorizontalAlignment="Left" Padding="0"
FontWeight="Bold" Margin="0,0,0,6" FontSize="32"
Background="{x:Null}" />
<TextBlock x:Name="TText" Text="我说话长这样,这是我说的话巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉" TextWrapping="WrapWithOverflow"
<ScrollViewer MaxHeight="400">
<TextBlock x:Name="TText" Text="我说话长这样,这是我说的话巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉" TextWrapping="WrapWithOverflow"
FontSize="24" />
</ScrollViewer>
</StackPanel>
</Border>
</UserControl>
3 changes: 1 addition & 2 deletions VPet-Simulator.Core/Display/ToolBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid x:Name="MainGrid" x:FieldModifier="public">
<Border x:Name="BdrPanel" VerticalAlignment="Bottom" Margin="0,0,0,55" TextBlock.FontSize="24"
TextElement.FontSize="24" BorderBrush="{DynamicResource DARKPrimaryDarker}"
BorderThickness="1" Background="{DynamicResource DARKPrimaryText}" CornerRadius="5"
Expand Down Expand Up @@ -94,7 +94,6 @@
Foreground="{DynamicResource DARKPrimary}" />
</Grid>
</Border>

<Menu Width="500" VerticalAlignment="Bottom" Style="{DynamicResource ToolBarMenuStyle}">
<Menu.ItemsPanel>
<ItemsPanelTemplate>
Expand Down
26 changes: 19 additions & 7 deletions VPet-Simulator.Core/Graph/GraphCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,12 @@ public IGraph FindGraph(GraphType type, Save.ModeType mode, bool storernd = fals
RndGraph.Add(list.Count, index);
return list[index];
}
else
return list[Function.Rnd.Next(list.Count)];
}
else
if (mode != Save.ModeType.Ill)
{
return Graphs[type][Function.Rnd.Next(Graphs[type].Count)];
list = Graphs[type].FindAll(x => x.ModeType != Save.ModeType.Ill);
if (list.Count > 0)
return list[Function.Rnd.Next(list.Count)];
}
}
return null;// FindGraph(GraphType.Default, mode);
Expand Down Expand Up @@ -409,7 +409,7 @@ public class Config
/// <summary>
/// 提起定位点
/// </summary>
public Point RaisePoint;
public Point[] RaisePoint;
/// <summary>
/// 行走速度
/// </summary>
Expand Down Expand Up @@ -458,7 +458,12 @@ public Config(LpsDocument lps)
TouchHeadSize = new Size(lps["touchhead"][(gdbe)"sw"], lps["touchhead"][(gdbe)"sh"]);
TouchRaisedLocate = new Point(lps["touchraised"][(gdbe)"px"], lps["touchraised"][(gdbe)"py"]);
TouchRaisedSize = new Size(lps["touchraised"][(gdbe)"sw"], lps["touchraised"][(gdbe)"sh"]);
RaisePoint = new Point(lps["raisepoint"][(gdbe)"x"], lps["raisepoint"][(gdbe)"y"]);
RaisePoint = new Point[] {
new Point(lps["raisepoint"][(gdbe)"happy_x"], lps["raisepoint"][(gdbe)"happy_y"]),
new Point(lps["raisepoint"][(gdbe)"nomal_x"], lps["raisepoint"][(gdbe)"nomal_y"]),
new Point(lps["raisepoint"][(gdbe)"poorcondition_x"], lps["raisepoint"][(gdbe)"poorcondition_y"]),
new Point(lps["raisepoint"][(gdbe)"ill_x"], lps["raisepoint"][(gdbe)"ill_y"])
};
var s = lps["speed"];
SpeedWalk = s[(gdbe)"walk"];
SpeedClimb = s[(gdbe)"climb"];
Expand Down Expand Up @@ -489,7 +494,14 @@ public void Set(LpsDocument lps)
TouchRaisedSize = new Size(lps["touchraised"][(gdbe)"sw"], lps["touchraised"][(gdbe)"wh"]);
}
if (lps.FindLine("raisepoint") != null)
RaisePoint = new Point(lps["raisepoint"][(gdbe)"x"], lps["raisepoint"][(gdbe)"y"]);
{
RaisePoint = new Point[] {
new Point(lps["raisepoint"].GetDouble("happy_x",RaisePoint[0].X), lps["raisepoint"].GetDouble("happy_y",RaisePoint[0].Y)),
new Point(lps["raisepoint"].GetDouble ("nomal_x",RaisePoint[1].X), lps["raisepoint"].GetDouble("nomal_y",RaisePoint[1].Y)),
new Point(lps["raisepoint"].GetDouble("poorcondition_x",RaisePoint[2].X), lps["raisepoint"].GetDouble("poorcondition_y",RaisePoint[2].Y)),
new Point(lps["raisepoint"].GetDouble("ill_x",RaisePoint[3].X), lps["raisepoint"].GetDouble("ill_y",RaisePoint[3].Y))
};
}
var s = lps.FindLine("speed");
if (s != null)
{
Expand Down
2 changes: 1 addition & 1 deletion VPet-Simulator.Windows/mod/0000_core/pet/vup.lps
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pet#默认虚拟桌宠:|intor#虚拟主播模拟器默认人物形象:|path#vup:|
touchhead:|px#159:|py#16:|sw#189:|sh#178:|
touchraised:|px#0:|py#50:|sw#500:|sh#200:|
raisepoint:|x#290:|y#128:|
raisepoint:|happy_x#290:|happy_y#128:|nomal_x#290:|nomal_y#128:|poorcondition_x#290:|poorcondition_y#128:|ill_x#290:|ill_y#128:|
speed:|walk#20:|climb#10:|climbtop#8:|crawl#8:|fallx#14:|fally#10:|crawl#10:|
locate:|climbleft#145:|climbright#185:|climbtop#150:|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.

0 comments on commit 543bff7

Please sign in to comment.