mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
捏脸增加动画判断和心情增加
This commit is contained in:
parent
f13a2fd874
commit
f84dfd0ae8
@ -1668,7 +1668,7 @@ namespace VPet_Simulator.Windows
|
|||||||
var pin = Core.Graph.GraphConfig.Data["pinch"];
|
var pin = Core.Graph.GraphConfig.Data["pinch"];
|
||||||
Main.Core.TouchEvent.Insert(0, new TouchArea(
|
Main.Core.TouchEvent.Insert(0, new TouchArea(
|
||||||
new Point(pin[(gdbe)"px"], pin[(gdbe)"py"]), new Size(pin[(gdbe)"sw"], pin[(gdbe)"sh"])
|
new Point(pin[(gdbe)"px"], pin[(gdbe)"py"]), new Size(pin[(gdbe)"sw"], pin[(gdbe)"sh"])
|
||||||
, () => { DisplayPinch(); return true; }, true));
|
, DisplayPinch, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1752,9 +1752,14 @@ namespace VPet_Simulator.Windows
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示捏脸情况
|
/// 显示捏脸情况
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void DisplayPinch()
|
public bool DisplayPinch()
|
||||||
{
|
{
|
||||||
|
if (Core.Graph.FindGraphs("pinch", AnimatType.A_Start, Core.Save.Mode) == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Main.CountNomal = 0;
|
Main.CountNomal = 0;
|
||||||
|
|
||||||
if (Core.Controller.EnableFunction && Core.Save.Strength >= 10 && Core.Save.Feeling < 100)
|
if (Core.Controller.EnableFunction && Core.Save.Strength >= 10 && Core.Save.Feeling < 100)
|
||||||
{
|
{
|
||||||
Core.Save.StrengthChange(-2);
|
Core.Save.StrengthChange(-2);
|
||||||
@ -1765,28 +1770,36 @@ namespace VPet_Simulator.Windows
|
|||||||
if (Main.DisplayType.Name == "pinch")
|
if (Main.DisplayType.Name == "pinch")
|
||||||
{
|
{
|
||||||
if (Main.DisplayType.Animat == AnimatType.A_Start)
|
if (Main.DisplayType.Animat == AnimatType.A_Start)
|
||||||
return;
|
return false;
|
||||||
else if (Main.DisplayType.Animat == AnimatType.B_Loop)
|
else if (Main.DisplayType.Animat == AnimatType.B_Loop)
|
||||||
if (Dispatcher.Invoke(() => Main.PetGrid.Tag) is IGraph ig && ig.GraphInfo.Name == "pinch" && ig.GraphInfo.Animat == AnimatType.B_Loop)
|
if (Dispatcher.Invoke(() => Main.PetGrid.Tag) is IGraph ig && ig.GraphInfo.Name == "pinch" && ig.GraphInfo.Animat == AnimatType.B_Loop)
|
||||||
{
|
{
|
||||||
ig.IsContinue = true;
|
ig.IsContinue = true;
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
else if (Dispatcher.Invoke(() => Main.PetGrid2.Tag) is IGraph ig2 && ig2.GraphInfo.Name == "pinch" && ig2.GraphInfo.Animat == AnimatType.B_Loop)
|
else if (Dispatcher.Invoke(() => Main.PetGrid2.Tag) is IGraph ig2 && ig2.GraphInfo.Name == "pinch" && ig2.GraphInfo.Animat == AnimatType.B_Loop)
|
||||||
{
|
{
|
||||||
ig2.IsContinue = true;
|
ig2.IsContinue = true;
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Main_Event_TouchHead();
|
Main_Event_TouchHead();
|
||||||
Main_Event_TouchBody();
|
Main_Event_TouchBody();
|
||||||
Main.Display("pinch", AnimatType.A_Start, () =>
|
Main.Display("pinch", AnimatType.A_Start, () =>
|
||||||
Main.Display("pinch", AnimatType.B_Loop, DisplayPinch_loop));
|
Main.Display("pinch", AnimatType.B_Loop, DisplayPinch_loop));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
private void DisplayPinch_loop()
|
private void DisplayPinch_loop()
|
||||||
{
|
{
|
||||||
if (Main.isPress && Main.DisplayType.Name == "pinch" && Main.DisplayType.Animat == AnimatType.B_Loop)
|
if (Main.isPress && Main.DisplayType.Name == "pinch" && Main.DisplayType.Animat == AnimatType.B_Loop)
|
||||||
{
|
{
|
||||||
|
if (Core.Controller.EnableFunction && Core.Save.Strength >= 10 && Core.Save.Feeling < 100)
|
||||||
|
{
|
||||||
|
Core.Save.StrengthChange(-2);
|
||||||
|
Core.Save.FeelingChange(1);
|
||||||
|
Core.Save.Mode = Core.Save.CalMode();
|
||||||
|
Main.LabelDisplayShowChangeNumber(LocalizeCore.Translate("体力-{0:f0} 心情+{1:f0}"), 2, 1);
|
||||||
|
}
|
||||||
Main.Display("pinch", AnimatType.B_Loop, DisplayPinch_loop);
|
Main.Display("pinch", AnimatType.B_Loop, DisplayPinch_loop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user