mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
重构动画播放系统 : 代码
This commit is contained in:
parent
0cf20b7b45
commit
59c1253886
1
.gitignore
vendored
1
.gitignore
vendored
@ -351,3 +351,4 @@ MigrationBackup/
|
||||
|
||||
*.zip
|
||||
*.rar
|
||||
*_PDLC_*
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
@ -58,8 +58,6 @@ namespace VPet_Simulator.Core
|
||||
UIGrid.Children.Add(WorkTimer);
|
||||
ToolBar = new ToolBar(this);
|
||||
ToolBar.Visibility = Visibility.Collapsed;
|
||||
ToolBar.MenuWork1.Header = core.Graph.GraphConfig.StrGetString("work1");
|
||||
ToolBar.MenuWork2.Header = core.Graph.GraphConfig.StrGetString("work2");
|
||||
UIGrid.Children.Add(ToolBar);
|
||||
MsgBar = new MessageBar(this);
|
||||
MsgBar.Visibility = Visibility.Collapsed;
|
||||
@ -72,8 +70,8 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
if (!core.Controller.EnableFunction)
|
||||
Core.Save.Mode = NoFunctionMOD;
|
||||
var ig = Core.Graph.FindGraph(GraphCore.GraphType.StartUP, core.Save.Mode);
|
||||
//var ig2 = Core.Graph.FindGraph(GraphCore.GraphType.Default, core.GameSave.Mode);
|
||||
var ig = Core.Graph.FindGraph(Core.Graph.FindName(GraphType.StartUP), AnimatType.Single, core.Save.Mode);
|
||||
//var ig2 = Core.Graph.FindGraph(GraphType.Default, core.GameSave.Mode);
|
||||
PetGrid2.Visibility = Visibility.Collapsed;
|
||||
Task.Run(() =>
|
||||
{
|
||||
@ -205,7 +203,7 @@ namespace VPet_Simulator.Core
|
||||
{
|
||||
isPress = true;
|
||||
CountNomal = 0;
|
||||
if (DisplayType != GraphCore.GraphType.Default)
|
||||
if (DisplayType.Type != GraphType.Default)
|
||||
{//不是nomal! 可能会卡timer,所有全部timer清空下
|
||||
CleanState();
|
||||
if (DisplayStopMove(DisplayToNomal))
|
||||
@ -371,14 +369,14 @@ namespace VPet_Simulator.Core
|
||||
if (wavetimes++ > 4)
|
||||
if (wavetop == true)
|
||||
{
|
||||
if (wavetimes >= 10 || DisplayType == GraphCore.GraphType.Default || DisplayType == GraphType.Touch_Head_B_Loop || DisplayType == GraphType.Touch_Head_C_End)
|
||||
if (wavetimes >= 10 || DisplayType.Type == GraphType.Default || DisplayType.Type == GraphType.Touch_Head)
|
||||
DisplayTouchHead();
|
||||
//Console.WriteLine(wavetimes);
|
||||
LastInteractionTime = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wavetimes >= 10 || DisplayType == GraphCore.GraphType.Default || DisplayType == GraphType.Touch_Body_B_Loop || DisplayType == GraphType.Touch_Body_C_End)
|
||||
if (wavetimes >= 10 || DisplayType.Type == GraphType.Default || DisplayType.Type == GraphType.Touch_Body)
|
||||
DisplayTouchBody();
|
||||
LastInteractionTime = DateTime.Now;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
public partial class Main
|
||||
{
|
||||
public const int DistanceMax = 100;
|
||||
public const int DistanceMid = 100;
|
||||
public const int DistanceMin = 50;
|
||||
public const int LoopProMax = 20;
|
||||
public const int LoopMax = 10;
|
||||
public const int LoopMid = 7;
|
||||
public const int LoopMin = 5;
|
||||
public const int TreeRND = 5;
|
||||
|
||||
/// <summary>
|
||||
@ -32,29 +29,31 @@ namespace VPet_Simulator.Core
|
||||
AutoReset = true,
|
||||
Enabled = true
|
||||
};
|
||||
readonly GraphCore.Helper.SayType[] sayTypes = new GraphCore.Helper.SayType[] { GraphCore.Helper.SayType.Serious, GraphCore.Helper.SayType.Shining, GraphCore.Helper.SayType.Self };
|
||||
public void SayRnd(string text)
|
||||
/// <summary>
|
||||
/// 说话,使用随机表情
|
||||
/// </summary>
|
||||
public void SayRnd(string text, bool force = false)
|
||||
{
|
||||
Say(text, sayTypes[Function.Rnd.Next(sayTypes.Length)]);
|
||||
Say(text, Core.Graph.FindName(GraphType.Say), force);
|
||||
}
|
||||
/// <summary>
|
||||
/// 说话
|
||||
/// </summary>
|
||||
/// <param name="text">说话内容</param>
|
||||
public void Say(string text, GraphCore.Helper.SayType type = GraphCore.Helper.SayType.Shining, bool force = false)
|
||||
public void Say(string text, string graphname = null, bool force = false)
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
OnSay?.Invoke(text);
|
||||
if (force || type != GraphCore.Helper.SayType.None && DisplayType == GraphCore.GraphType.Default)
|
||||
Display(GraphCore.Helper.Convert(type, GraphCore.Helper.AnimatType.A_Start), () =>
|
||||
if (force || string.IsNullOrWhiteSpace(graphname) && DisplayType.Type == GraphType.Default)
|
||||
Display(graphname, AnimatType.A_Start, () =>
|
||||
{
|
||||
Dispatcher.Invoke(() => MsgBar.Show(Core.Save.Name, text, type));
|
||||
Saying(type);
|
||||
Dispatcher.Invoke(() => MsgBar.Show(Core.Save.Name, text, graphname));
|
||||
DisplayBLoopingForce(graphname);
|
||||
});
|
||||
else
|
||||
{
|
||||
Dispatcher.Invoke(() => MsgBar.Show(Core.Save.Name, text, type));
|
||||
Dispatcher.Invoke(() => MsgBar.Show(Core.Save.Name, text));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -112,10 +111,6 @@ namespace VPet_Simulator.Core
|
||||
labeldisplaytimer.Start();
|
||||
});
|
||||
}
|
||||
public void Saying(GraphCore.Helper.SayType type)
|
||||
{
|
||||
Display(GraphCore.Helper.Convert(type, GraphCore.Helper.AnimatType.B_Loop), () => Saying(type));
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据消耗计算相关数据
|
||||
/// </summary>
|
||||
@ -134,115 +129,102 @@ namespace VPet_Simulator.Core
|
||||
case WorkingState.Sleep:
|
||||
//睡觉消耗
|
||||
if (Core.Save.StrengthFood >= 25)
|
||||
{
|
||||
Core.Save.StrengthChange(TimePass * 4);
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
Core.Save.Health += TimePass * 2;
|
||||
}
|
||||
Core.Save.StrengthChangeFood(-TimePass / 2);
|
||||
Core.Save.StrengthChangeDrink(-TimePass / 2);
|
||||
Core.Save.FeelingChange(-freedrop / 2);
|
||||
break;
|
||||
case WorkingState.WorkONE:
|
||||
//工作
|
||||
if (Core.Save.StrengthFood <= 25)
|
||||
{
|
||||
if (Core.Save.Strength >= TimePass)
|
||||
{
|
||||
Core.Save.StrengthChange(-TimePass);
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.Health -= TimePass;
|
||||
}
|
||||
var addmoney = TimePass * 5;
|
||||
Core.Save.Money += addmoney;
|
||||
WorkTimer.GetCount += addmoney;
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.StrengthChangeFood(TimePass);
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
Core.Save.Health += TimePass;
|
||||
var addmoney = TimePass * (10 + Core.Save.Level / 2);
|
||||
Core.Save.Money += addmoney;
|
||||
WorkTimer.GetCount += addmoney;
|
||||
}
|
||||
Core.Save.StrengthChangeFood(-TimePass * 3.5);
|
||||
Core.Save.StrengthChangeDrink(-TimePass * 2.5);
|
||||
Core.Save.FeelingChange(-freedrop * 1.5);
|
||||
break;
|
||||
case WorkingState.WorkTWO:
|
||||
//工作2 更加消耗体力
|
||||
if (Core.Save.StrengthFood <= 25)
|
||||
{
|
||||
if (Core.Save.Strength >= TimePass * 2)
|
||||
{
|
||||
Core.Save.StrengthChange(-TimePass * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.Health -= TimePass;
|
||||
}
|
||||
var addmoney = TimePass * 10;
|
||||
Core.Save.Money += addmoney;
|
||||
WorkTimer.GetCount += addmoney;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
Core.Save.Health += TimePass;
|
||||
var addmoney = TimePass * (20 + Core.Save.Level);
|
||||
Core.Save.Money += addmoney;
|
||||
WorkTimer.GetCount += addmoney;
|
||||
}
|
||||
Core.Save.StrengthChangeFood(-TimePass * 4.5);
|
||||
Core.Save.StrengthChangeDrink(-TimePass * 7.5);
|
||||
Core.Save.FeelingChange(-freedrop * 2.5);
|
||||
break;
|
||||
case WorkingState.Study:
|
||||
//学习
|
||||
if (Core.Save.StrengthFood <= 25)
|
||||
{
|
||||
if (Core.Save.Strength >= TimePass)
|
||||
{
|
||||
Core.Save.StrengthChange(-TimePass);
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.Health -= TimePass;
|
||||
}
|
||||
var addmoney = TimePass * (10 + Core.Save.Level);
|
||||
Core.Save.Exp += addmoney;
|
||||
WorkTimer.GetCount += addmoney;
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.StrengthChange(TimePass);
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
Core.Save.Health += TimePass;
|
||||
var addmoney = TimePass * (30 + Core.Save.Level);
|
||||
Core.Save.Exp += addmoney;
|
||||
WorkTimer.GetCount += addmoney;
|
||||
}
|
||||
Core.Save.StrengthChangeFood(-TimePass * 1.5);
|
||||
Core.Save.StrengthChangeDrink(-TimePass * 2);
|
||||
Core.Save.FeelingChange(-freedrop * 3);
|
||||
goto default;
|
||||
default://默认
|
||||
//饮食等乱七八糟的消耗
|
||||
if (Core.Save.StrengthFood >= 50)
|
||||
{
|
||||
Core.Save.StrengthChange(TimePass * 2);
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
Core.Save.Health += Function.Rnd.Next(0, 2) * TimePass;
|
||||
Core.Save.Health += TimePass * 2;
|
||||
Core.Save.StrengthChangeFood(-TimePass / 2);
|
||||
}
|
||||
if (Core.Save.StrengthDrink >= 25)
|
||||
{
|
||||
Core.Save.StrengthChange(TimePass * 2);
|
||||
if (Core.Save.StrengthDrink >= 75)
|
||||
Core.Save.Health += TimePass * 2;
|
||||
Core.Save.StrengthChangeDrink(-TimePass / 2);
|
||||
}
|
||||
Core.Save.FeelingChange(-freedrop / 2);
|
||||
break;
|
||||
case WorkingState.Work:
|
||||
var nowwork = Core.Graph.GraphConfig.Works[StateID];
|
||||
var needfood = TimePass * nowwork.StrengthFood;
|
||||
var needdrink = TimePass * nowwork.StrengthDrink;
|
||||
double efficiency = 0;
|
||||
int addhealth = -2;
|
||||
if (Core.Save.StrengthFood <= 25)
|
||||
{//低状态低效率
|
||||
Core.Save.StrengthChangeFood(-needfood / 2);
|
||||
efficiency += 0.25;
|
||||
if (Core.Save.Strength >= needfood)
|
||||
{
|
||||
Core.Save.StrengthChange(-needfood);
|
||||
efficiency += 0.1;
|
||||
}
|
||||
addhealth -= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.StrengthChangeFood(-needfood);
|
||||
efficiency += 0.5;
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
addhealth += Function.Rnd.Next(1, 3);
|
||||
}
|
||||
if (Core.Save.StrengthDrink <= 25)
|
||||
{//低状态低效率
|
||||
Core.Save.StrengthChangeDrink(-needdrink / 2);
|
||||
efficiency += 0.25;
|
||||
if (Core.Save.Strength >= needdrink)
|
||||
{
|
||||
Core.Save.StrengthChange(-needdrink);
|
||||
efficiency += 0.1;
|
||||
}
|
||||
addhealth -= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.StrengthChangeDrink(-needdrink);
|
||||
efficiency += 0.5;
|
||||
if (Core.Save.StrengthDrink >= 75)
|
||||
addhealth += Function.Rnd.Next(1, 3);
|
||||
}
|
||||
var addmoney = Math.Max(0, TimePass * (nowwork.MoneyBase * (efficiency) + Core.Save.Level * nowwork.MoneyLevel * (efficiency - 0.5) * 2));
|
||||
if (nowwork.Type == GraphHelper.Work.WorkType.Work)
|
||||
Core.Save.Money += addmoney;
|
||||
else
|
||||
Core.Save.Exp += addmoney;
|
||||
WorkTimer.GetCount += addmoney;
|
||||
Core.Save.FeelingChange(-freedrop * nowwork.Feeling);
|
||||
break;
|
||||
default://默认
|
||||
//饮食等乱七八糟的消耗
|
||||
addhealth = -2;
|
||||
if (Core.Save.StrengthFood >= 50)
|
||||
{
|
||||
Core.Save.StrengthChangeFood(-TimePass);
|
||||
Core.Save.StrengthChange(TimePass);
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
addhealth += Function.Rnd.Next(1, 3);
|
||||
}
|
||||
else if (Core.Save.StrengthFood <= 25)
|
||||
{
|
||||
Core.Save.Health -= Function.Rnd.Next(0, 1) * TimePass;
|
||||
Core.Save.Health -= Function.Rnd.Next() * TimePass;
|
||||
addhealth -= 2;
|
||||
}
|
||||
Core.Save.StrengthChangeFood(-TimePass * 1.5);
|
||||
Core.Save.StrengthChangeDrink(-TimePass * 1.5);
|
||||
if (Core.Save.StrengthDrink >= 50)
|
||||
{
|
||||
Core.Save.StrengthChangeDrink(-TimePass);
|
||||
Core.Save.StrengthChange(TimePass);
|
||||
if (Core.Save.StrengthDrink >= 75)
|
||||
addhealth += Function.Rnd.Next(1, 3);
|
||||
}
|
||||
else if (Core.Save.StrengthDrink <= 25)
|
||||
{
|
||||
Core.Save.Health -= Function.Rnd.Next() * TimePass;
|
||||
addhealth -= 2;
|
||||
}
|
||||
if (addhealth > 0)
|
||||
Core.Save.Health += addhealth * TimePass;
|
||||
Core.Save.StrengthChangeFood(-TimePass);
|
||||
Core.Save.StrengthChangeDrink(-TimePass);
|
||||
Core.Save.FeelingChange(-freedrop);
|
||||
break;
|
||||
}
|
||||
@ -281,14 +263,24 @@ namespace VPet_Simulator.Core
|
||||
{
|
||||
//TODO:切换显示动画
|
||||
Core.Save.Mode = newmod;
|
||||
//TODO:看情况播放停止工作动画
|
||||
//看情况播放停止工作动画
|
||||
if (newmod == GameSave.ModeType.Ill && (State != WorkingState.Nomal || State != WorkingState.Sleep))
|
||||
{
|
||||
WorkTimer.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 状态计算Handle
|
||||
/// </summary>
|
||||
public event Action FunctionSpendHandle;
|
||||
/// <summary>
|
||||
/// 想要随机显示的接口 (return:是否成功)
|
||||
/// </summary>
|
||||
public List<Func<bool>> RandomInteractionAction = new List<Func<bool>>();
|
||||
/// <summary>
|
||||
/// 每隔指定时间自动触发计算 可以关闭EventTimer后手动计算
|
||||
/// </summary>
|
||||
public void EventTimer_Elapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
//所有Handle
|
||||
@ -308,81 +300,62 @@ namespace VPet_Simulator.Core
|
||||
//UIHandle
|
||||
Dispatcher.Invoke(() => TimeUIHandle.Invoke(this));
|
||||
|
||||
if (DisplayType == GraphCore.GraphType.Default && !isPress)
|
||||
if (Core.Save.Mode == GameSave.ModeType.Ill)
|
||||
{//生病时候的随机
|
||||
|
||||
if (DisplayType.Type == GraphType.Default && !isPress)
|
||||
switch (Function.Rnd.Next(Math.Max(20, Core.Controller.InteractionCycle - CountNomal)))
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
//显示移动
|
||||
DisplayMove();
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
//显示待机
|
||||
DisplayIdel();
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
DisplayIdel_StateONE();
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
//case 14:
|
||||
//case 15:
|
||||
//给其他显示留个机会
|
||||
var list = RandomInteractionAction.ToList();
|
||||
for (int i = Function.Rnd.Next(list.Count); 0 != list.Count; i = Function.Rnd.Next(list.Count))
|
||||
{
|
||||
var act = list[i];
|
||||
if (act.Invoke())
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
list.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
DisplaySleep();
|
||||
break;
|
||||
}
|
||||
else//TODO:制作随机列表
|
||||
switch (Function.Rnd.Next(Math.Max(20, Core.Controller.InteractionCycle - CountNomal)))
|
||||
{
|
||||
case 0:
|
||||
//随机向右
|
||||
DisplayWalk_Left();
|
||||
break;
|
||||
case 1:
|
||||
DisplayClimb_Left_UP();
|
||||
break;
|
||||
case 2:
|
||||
DisplayClimb_Left_DOWN();
|
||||
break;
|
||||
case 3:
|
||||
DisplayClimb_Right_UP();
|
||||
break;
|
||||
case 4:
|
||||
DisplayClimb_Right_DOWN();
|
||||
break;
|
||||
case 5:
|
||||
DisplayWalk_Right();
|
||||
break;
|
||||
case 6:
|
||||
DisplayFall_Left();
|
||||
break;
|
||||
case 7:
|
||||
DisplayFall_Right();
|
||||
break;
|
||||
case 8:
|
||||
DisplayClimb_Top_Right();
|
||||
break;
|
||||
case 9:
|
||||
DisplayClimb_Top_Left();
|
||||
break;
|
||||
case 10:
|
||||
DisplayCrawl_Left();
|
||||
break;
|
||||
case 11:
|
||||
DisplayCrawl_Right();
|
||||
break;
|
||||
case 13:
|
||||
case 14:
|
||||
DisplaySleep();
|
||||
break;
|
||||
case 15:
|
||||
case 16:
|
||||
DisplayBoring();
|
||||
break;
|
||||
case 18:
|
||||
case 17:
|
||||
DisplaySquat();
|
||||
break;
|
||||
case 12:
|
||||
case 19:
|
||||
case 20:
|
||||
DisplayIdel_StateONE();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 定点移动位置向量
|
||||
/// </summary>
|
||||
private Point MoveTimerPoint = new Point(0, 0);
|
||||
public Point MoveTimerPoint = new Point(0, 0);
|
||||
/// <summary>
|
||||
/// 定点移动定时器
|
||||
/// </summary>
|
||||
private Timer MoveTimer = new Timer(125)
|
||||
public Timer MoveTimer = new Timer(125)
|
||||
{
|
||||
AutoReset = true,
|
||||
};
|
||||
@ -436,6 +409,10 @@ namespace VPet_Simulator.Core
|
||||
/// </summary>
|
||||
public WorkingState State = WorkingState.Nomal;
|
||||
/// <summary>
|
||||
/// 当前状态辅助ID
|
||||
/// </summary>
|
||||
public int StateID = 0;
|
||||
/// <summary>
|
||||
/// 当前正在的状态
|
||||
/// </summary>
|
||||
public enum WorkingState
|
||||
@ -445,25 +422,21 @@ namespace VPet_Simulator.Core
|
||||
/// </summary>
|
||||
Nomal,
|
||||
/// <summary>
|
||||
/// 正在干活1
|
||||
/// 正在干活/学习中
|
||||
/// </summary>
|
||||
WorkONE,
|
||||
/// <summary>
|
||||
/// 正在干活1
|
||||
/// </summary>
|
||||
WorkTWO,
|
||||
/// <summary>
|
||||
/// 学习中
|
||||
/// </summary>
|
||||
Study,
|
||||
Work,
|
||||
/// <summary>
|
||||
/// 睡觉
|
||||
/// </summary>
|
||||
Sleep,
|
||||
///// <summary>
|
||||
///// 玩耍中
|
||||
///// </summary>
|
||||
//Playing,
|
||||
/// <summary>
|
||||
/// 旅游中
|
||||
/// </summary>
|
||||
Travel,
|
||||
/// <summary>
|
||||
/// 其他状态,给开发者留个空位计算
|
||||
/// </summary>
|
||||
Empty,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,8 +65,8 @@ namespace VPet_Simulator.Core
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(timeleft * 50);
|
||||
if (sayType != GraphCore.Helper.SayType.None && m.DisplayType.ToString().StartsWith("Say"))
|
||||
m.Display(GraphCore.Helper.Convert(sayType, GraphCore.Helper.AnimatType.C_End), m.DisplayToNomal);
|
||||
if (!string.IsNullOrEmpty(graphName) && m.DisplayType.Type == GraphInfo.GraphType.Say)
|
||||
m.DisplayCEndtoNomal(graphName);
|
||||
});
|
||||
ShowTimer.Stop();
|
||||
EndTimer.Start();
|
||||
@ -86,13 +86,13 @@ namespace VPet_Simulator.Core
|
||||
public Timer ShowTimer = new Timer() { Interval = 50 };
|
||||
public Timer CloseTimer = new Timer() { Interval = 20 };
|
||||
int timeleft;
|
||||
GraphCore.Helper.SayType sayType;
|
||||
string graphName;
|
||||
/// <summary>
|
||||
/// 显示消息
|
||||
/// </summary>
|
||||
/// <param name="name">名字</param>
|
||||
/// <param name="text">内容</param>
|
||||
public void Show(string name, string text, GraphCore.Helper.SayType sayType)
|
||||
public void Show(string name, string text, string graphname = null)
|
||||
{
|
||||
if (m.UIGrid.Children.IndexOf(this) != m.UIGrid.Children.Count - 1)
|
||||
{
|
||||
@ -105,7 +105,7 @@ namespace VPet_Simulator.Core
|
||||
ShowTimer.Start(); EndTimer.Stop(); CloseTimer.Stop();
|
||||
this.Visibility = Visibility.Visible;
|
||||
Opacity = .8;
|
||||
this.sayType = sayType;
|
||||
graphName = graphname;
|
||||
}
|
||||
|
||||
public void Border_MouseEnter(object sender, MouseEventArgs e)
|
||||
|
@ -109,14 +109,11 @@
|
||||
<MenuItem x:Name="MenuInteract" Header="{ll:Str 互动}" HorizontalContentAlignment="Center" Width="99"
|
||||
Padding="0">
|
||||
<MenuItem Header="{ll:Str 睡觉}" HorizontalContentAlignment="Center" Click="Sleep_Click" />
|
||||
<MenuItem Header="{ll:Str 学习}" HorizontalContentAlignment="Center" Click="Study_Click" />
|
||||
<MenuItem x:Name="MenuWork1" Header="工作1" HorizontalContentAlignment="Center" Click="Work1_Click"
|
||||
ToolTip="{ll:Str 工作}" />
|
||||
<MenuItem x:Name="MenuWork2" Header="工作2" HorizontalContentAlignment="Center" Click="Work2_Click"
|
||||
ToolTip="{ll:Str 工作}" />
|
||||
<MenuItem x:Name="MenuStudy" Header="{ll:Str 学习}" HorizontalContentAlignment="Center" />
|
||||
<MenuItem x:Name="MenuWork" Header="{ll:Str 工作}" HorizontalContentAlignment="Center" />
|
||||
<!--<MenuItem Header="说话" HorizontalContentAlignment="Center" IsEnabled="False" />-->
|
||||
</MenuItem>
|
||||
<MenuItem x:Name="MenuDIY" Header="{ll:Str 自定}" HorizontalContentAlignment="Center" Click="MenuDIY_Click"
|
||||
<MenuItem x:Name="MenuDIY" Header="{ll:Str 自定}" HorizontalContentAlignment="Center"
|
||||
x:FieldModifier="public" Padding="0" />
|
||||
<MenuItem x:Name="MenuSetting" Header="{ll:Str 系统}" HorizontalContentAlignment="Center"
|
||||
x:FieldModifier="public" Padding="0">
|
||||
|
@ -9,6 +9,12 @@ using Panuon.WPF.UI;
|
||||
using System.Windows.Threading;
|
||||
using LinePutScript;
|
||||
using LinePutScript.Localization.WPF;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
using System.Collections.Generic;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TreeView;
|
||||
using static VPet_Simulator.Core.GraphHelper;
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
@ -36,8 +42,103 @@ namespace VPet_Simulator.Core
|
||||
closePanelTimer = new Timer();
|
||||
closePanelTimer.Elapsed += ClosePanelTimer_Tick;
|
||||
m.TimeUIHandle += M_TimeUIHandle;
|
||||
|
||||
}
|
||||
|
||||
public void LoadWork()
|
||||
{
|
||||
MenuWork.Click -= MenuWork_Click;
|
||||
MenuWork.Visibility = Visibility.Visible;
|
||||
MenuStudy.Click -= MenuStudy_Click;
|
||||
MenuStudy.Visibility = Visibility.Visible;
|
||||
|
||||
MenuWork.Items.Clear();
|
||||
MenuStudy.Items.Clear();
|
||||
List<Work> ws = new List<Work>();
|
||||
List<Work> ss = new List<Work>();
|
||||
foreach (var w in m.Core.Graph.GraphConfig.Works)
|
||||
{
|
||||
if (w.Type == Work.WorkType.Work)
|
||||
{
|
||||
ws.Add(w);
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Add(w);
|
||||
}
|
||||
}
|
||||
if (ws.Count == 0)
|
||||
{
|
||||
MenuWork.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else if (ws.Count == 1)
|
||||
{
|
||||
MenuWork.Click += MenuWork_Click;
|
||||
wwork = ws[0];
|
||||
MenuWork.Header = ws[0].NameTrans;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var w in ws)
|
||||
{
|
||||
var mi = new MenuItem()
|
||||
{
|
||||
Header = w.NameTrans
|
||||
};
|
||||
mi.Click += (s, e) => StartWork(w);
|
||||
MenuWork.Items.Add(mi);
|
||||
}
|
||||
}
|
||||
if (ss.Count == 0)
|
||||
{
|
||||
MenuStudy.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else if (ss.Count == 1)
|
||||
{
|
||||
MenuStudy.Click += MenuStudy_Click;
|
||||
wstudy = ss[0];
|
||||
MenuStudy.Header = ss[0].NameTrans;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var w in ss)
|
||||
{
|
||||
var mi = new MenuItem()
|
||||
{
|
||||
Header = w.NameTrans
|
||||
};
|
||||
mi.Click += (s, e) => StartWork(w);
|
||||
MenuStudy.Items.Add(mi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void MenuStudy_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
StartWork(wstudy);
|
||||
}
|
||||
Work wwork;
|
||||
Work wstudy;
|
||||
public void StartWork(Work work)
|
||||
{
|
||||
if (!m.Core.Controller.EnableFunction || m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
if (!m.Core.Controller.EnableFunction || m.Core.Save.Level >= work.LevelLimit)
|
||||
if (m.State == Main.WorkingState.Work && m.StateID == m.Core.Graph.GraphConfig.Works.IndexOf(work))
|
||||
m.WorkTimer.Stop();
|
||||
else m.WorkTimer.Start(work);
|
||||
else
|
||||
MessageBoxX.Show(LocalizeCore.Translate("您的桌宠等级不足{0}/{2}\n无法进行{1}", m.Core.Save.Level.ToString()
|
||||
, work.NameTrans, work.LevelLimit), LocalizeCore.Translate("{0}取消", work.NameTrans));
|
||||
else
|
||||
MessageBoxX.Show(LocalizeCore.Translate("您的桌宠 {0} 生病啦,没法进行{1}", m.Core.Save.Name,
|
||||
work.NameTrans), LocalizeCore.Translate("{0}取消", work.NameTrans));
|
||||
}
|
||||
private void MenuWork_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
StartWork(wwork);
|
||||
}
|
||||
|
||||
|
||||
private void M_TimeUIHandle(Main m)
|
||||
{
|
||||
if (BdrPanel.Visibility == Visibility.Visible)
|
||||
@ -260,11 +361,6 @@ namespace VPet_Simulator.Core
|
||||
closePanelTimer.Start();
|
||||
}
|
||||
|
||||
private void MenuDIY_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//m.Say("您好,我是萝莉斯, 让我来帮您熟悉并掌握使用vos系统,成为永世流传的虚拟主播.");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
m = null;
|
||||
@ -277,7 +373,7 @@ namespace VPet_Simulator.Core
|
||||
this.Visibility = Visibility.Collapsed;
|
||||
if (m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
if (m.State == Main.WorkingState.Sleep)
|
||||
m.Display(GraphCore.GraphType.Sleep_C_End, m.DisplayNomal);
|
||||
m.Display(GraphType.Sleep, AnimatType.C_End, m.DisplayNomal);
|
||||
else if (m.State == Main.WorkingState.Nomal)
|
||||
m.DisplaySleep(true);
|
||||
else
|
||||
@ -286,44 +382,44 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
}
|
||||
|
||||
private void Study_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Visibility = Visibility.Collapsed;
|
||||
if (!m.Core.Controller.EnableFunction || m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
if (m.State == Main.WorkingState.Study)
|
||||
m.WorkTimer.Stop();
|
||||
else m.WorkTimer.Start(Main.WorkingState.Study);
|
||||
else
|
||||
MessageBoxX.Show(LocalizeCore.Translate("您的桌宠 {0} 生病啦,没法进行学习", m.Core.Save.Name), LocalizeCore.Translate("工作取消"));
|
||||
}
|
||||
//private void Study_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// this.Visibility = Visibility.Collapsed;
|
||||
// if (!m.Core.Controller.EnableFunction || m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
// if (m.State == Main.WorkingState.Study)
|
||||
// m.WorkTimer.Stop();
|
||||
// else m.WorkTimer.Start(Main.WorkingState.Study);
|
||||
// else
|
||||
// MessageBoxX.Show(LocalizeCore.Translate("您的桌宠 {0} 生病啦,没法进行学习", m.Core.Save.Name), LocalizeCore.Translate("工作取消"));
|
||||
//}
|
||||
|
||||
private void Work1_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Visibility = Visibility.Collapsed;
|
||||
if (!m.Core.Controller.EnableFunction || m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
if (m.State == Main.WorkingState.WorkONE)
|
||||
m.WorkTimer.Stop();
|
||||
else m.WorkTimer.Start(Main.WorkingState.WorkONE);
|
||||
else
|
||||
MessageBoxX.Show(LocalizeCore.Translate("您的桌宠 {0} 生病啦,没法进行工作{1}", m.Core.Save.Name,
|
||||
m.Core.Graph.GraphConfig.StrGetString("work1")), LocalizeCore.Translate("工作取消"));
|
||||
}
|
||||
//private void Work1_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// this.Visibility = Visibility.Collapsed;
|
||||
// if (!m.Core.Controller.EnableFunction || m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
// if (m.State == Main.WorkingState.WorkONE)
|
||||
// m.WorkTimer.Stop();
|
||||
// else m.WorkTimer.Start(Main.WorkingState.WorkONE);
|
||||
// else
|
||||
// MessageBoxX.Show(LocalizeCore.Translate("您的桌宠 {0} 生病啦,没法进行工作{1}", m.Core.Save.Name,
|
||||
// m.Core.Graph.GraphConfig.StrGetString("work1")), LocalizeCore.Translate("工作取消"));
|
||||
//}
|
||||
|
||||
private void Work2_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Visibility = Visibility.Collapsed;
|
||||
//private void Work2_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// this.Visibility = Visibility.Collapsed;
|
||||
|
||||
if (!m.Core.Controller.EnableFunction || m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
if (!m.Core.Controller.EnableFunction || m.Core.Save.Level >= 10)
|
||||
if (m.State == Main.WorkingState.WorkTWO)
|
||||
m.WorkTimer.Stop();
|
||||
else m.WorkTimer.Start(Main.WorkingState.WorkTWO);
|
||||
else
|
||||
MessageBoxX.Show(LocalizeCore.Translate("您的桌宠等级不足{0}/10\n无法进行工作{1}", m.Core.Save.Level.ToString()
|
||||
, m.Core.Graph.GraphConfig.StrGetString("work2")), LocalizeCore.Translate("工作取消"));
|
||||
else
|
||||
MessageBoxX.Show(LocalizeCore.Translate("您的桌宠 {0} 生病啦,没法进行工作{1}", m.Core.Save.Name,
|
||||
m.Core.Graph.GraphConfig.StrGetString("work2")), LocalizeCore.Translate("工作取消"));
|
||||
}
|
||||
// if (!m.Core.Controller.EnableFunction || m.Core.Save.Mode != GameSave.ModeType.Ill)
|
||||
// if (!m.Core.Controller.EnableFunction || m.Core.Save.Level >= 10)
|
||||
// if (m.State == Main.WorkingState.WorkTWO)
|
||||
// m.WorkTimer.Stop();
|
||||
// else m.WorkTimer.Start(Main.WorkingState.WorkTWO);
|
||||
// else
|
||||
// MessageBoxX.Show(LocalizeCore.Translate("您的桌宠等级不足{0}/10\n无法进行工作{1}", m.Core.Save.Level.ToString()
|
||||
// , m.Core.Graph.GraphConfig.StrGetString("work2")), LocalizeCore.Translate("工作取消"));
|
||||
// else
|
||||
// MessageBoxX.Show(LocalizeCore.Translate("您的桌宠 {0} 生病啦,没法进行工作{1}", m.Core.Save.Name,
|
||||
// m.Core.Graph.GraphConfig.StrGetString("work2")), LocalizeCore.Translate("工作取消"));
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,9 @@ using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
using LinePutScript.Localization.WPF;
|
||||
using static VPet_Simulator.Core.GraphHelper;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
/// <summary>
|
||||
@ -38,10 +41,6 @@ namespace VPet_Simulator.Core
|
||||
/// </summary>
|
||||
public DateTime StartTime;
|
||||
/// <summary>
|
||||
/// 最大时间(分钟)
|
||||
/// </summary>
|
||||
public int MaxTime;
|
||||
/// <summary>
|
||||
/// UI相关显示
|
||||
/// </summary>
|
||||
/// <param name="m"></param>
|
||||
@ -50,36 +49,27 @@ namespace VPet_Simulator.Core
|
||||
if (Visibility == Visibility.Hidden) return;
|
||||
TimeSpan ts = DateTime.Now - StartTime;
|
||||
TimeSpan tleft;
|
||||
if (ts.TotalMinutes > MaxTime)
|
||||
if (ts.TotalMinutes > nowWork.Time)
|
||||
{
|
||||
//学完了,停止
|
||||
//ts = TimeSpan.FromMinutes(MaxTime);
|
||||
//tleft = TimeSpan.Zero;
|
||||
//PBLeft.Value = MaxTime;
|
||||
switch (m.State)
|
||||
if (nowWork.Type == Work.WorkType.Work)
|
||||
{
|
||||
case Main.WorkingState.Study:
|
||||
m.Core.Save.Exp += GetCount * 0.2;
|
||||
Stop(() => m.Say(LocalizeCore.Translate("学习完成啦, 累计学会了 {0:f2} 经验值\n共计花费了{1}分钟",
|
||||
GetCount * 1.2, MaxTime), GraphCore.Helper.SayType.Shining, true));
|
||||
break;
|
||||
case Main.WorkingState.WorkONE:
|
||||
m.Core.Save.Money += GetCount * 0.15;
|
||||
Stop(() => m.Say(LocalizeCore.Translate("{2}完成啦, 累计赚了 {0:f2} 金钱\n共计花费了{1}分钟", GetCount * 1.15,
|
||||
MaxTime, m.Core.Graph.GraphConfig.StrGetString("work1")), GraphCore.Helper.SayType.Shining, true));
|
||||
break;
|
||||
case Main.WorkingState.WorkTWO:
|
||||
m.Core.Save.Money += GetCount * 0.25;
|
||||
Stop(() => m.Say(LocalizeCore.Translate("{2}完成啦, 累计赚了 {0:f2} 金钱\n共计花费了{1}分钟", GetCount * 1.25,
|
||||
MaxTime, m.Core.Graph.GraphConfig.StrGetString("work2")), GraphCore.Helper.SayType.Shining, true));
|
||||
break;
|
||||
m.Core.Save.Money += GetCount * nowWork.FinishBonus;
|
||||
Stop(() => m.SayRnd(LocalizeCore.Translate("{2}完成啦, 累计赚了 {0:f2} 金钱\n共计花费了{1}分钟", GetCount * (1 + nowWork.FinishBonus),
|
||||
nowWork.Time, nowWork.NameTrans), true));
|
||||
}
|
||||
|
||||
else
|
||||
m.Core.Save.Money += GetCount * nowWork.FinishBonus;
|
||||
Stop(() => m.SayRnd(LocalizeCore.Translate("{2}完成啦, 累计获得 {0:f2} 经验\n共计花费了{1}分钟", GetCount * (1 + nowWork.FinishBonus),
|
||||
nowWork.Time, nowWork.NameTrans), true));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
tleft = TimeSpan.FromMinutes(MaxTime) - ts;
|
||||
tleft = TimeSpan.FromMinutes(nowWork.Time) - ts;
|
||||
PBLeft.Value = ts.TotalMinutes;
|
||||
}
|
||||
switch (DisplayType)
|
||||
@ -91,16 +81,10 @@ namespace VPet_Simulator.Core
|
||||
ShowTimeSpan(tleft); break;
|
||||
case 2:
|
||||
tNumber.Text = GetCount.ToString("f0");
|
||||
switch (m.State)
|
||||
{
|
||||
case Main.WorkingState.Study:
|
||||
tNumberUnit.Text = "EXP";
|
||||
break;
|
||||
case Main.WorkingState.WorkONE:
|
||||
case Main.WorkingState.WorkTWO:
|
||||
tNumberUnit.Text = LocalizeCore.Translate("钱");
|
||||
break;
|
||||
}
|
||||
if (nowWork.Type == Work.WorkType.Work)
|
||||
tNumberUnit.Text = LocalizeCore.Translate("钱");
|
||||
else
|
||||
tNumberUnit.Text = LocalizeCore.Translate("EXP");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -124,49 +108,24 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
public void DisplayUI()
|
||||
{
|
||||
switch (m.State)
|
||||
{
|
||||
case Main.WorkingState.Study:
|
||||
btnStop.Content = LocalizeCore.Translate("停止学习");
|
||||
switch (DisplayType)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
tNow.Text = LocalizeCore.Translate("当前已学习");
|
||||
break;
|
||||
case 1:
|
||||
tNow.Text = LocalizeCore.Translate("剩余学习时间");
|
||||
break;
|
||||
case 2:
|
||||
tNow.Text = LocalizeCore.Translate("获得经验值");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Main.WorkingState.WorkONE:
|
||||
workdisplay(m.Core.Graph.GraphConfig.StrGetString("work1"));
|
||||
break;
|
||||
case Main.WorkingState.WorkTWO:
|
||||
workdisplay(m.Core.Graph.GraphConfig.StrGetString("work2"));
|
||||
break;
|
||||
}
|
||||
M_TimeUIHandle(m);
|
||||
}
|
||||
private void workdisplay(string workname)
|
||||
{
|
||||
btnStop.Content = LocalizeCore.Translate("停止") + workname;
|
||||
btnStop.Content = LocalizeCore.Translate("停止") + nowWork.NameTrans;
|
||||
switch (DisplayType)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
tNow.Text = LocalizeCore.Translate("当前已") + workname;
|
||||
tNow.Text = LocalizeCore.Translate("当前已") + nowWork.NameTrans;
|
||||
break;
|
||||
case 1:
|
||||
tNow.Text = LocalizeCore.Translate("剩余{0}时间", workname);
|
||||
tNow.Text = LocalizeCore.Translate("剩余{0}时间", nowWork.NameTrans);
|
||||
break;
|
||||
case 2:
|
||||
tNow.Text = LocalizeCore.Translate("累计金钱收益");
|
||||
if (nowWork.Type == Work.WorkType.Work)
|
||||
tNow.Text = LocalizeCore.Translate("累计金钱收益");
|
||||
else
|
||||
tNow.Text = LocalizeCore.Translate("获得经验值");
|
||||
break;
|
||||
}
|
||||
M_TimeUIHandle(m);
|
||||
}
|
||||
private void SwitchState_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@ -176,99 +135,33 @@ namespace VPet_Simulator.Core
|
||||
|
||||
DisplayUI();
|
||||
}
|
||||
public void Start(Main.WorkingState state)
|
||||
public void Start(Work work)
|
||||
{
|
||||
//if (state == Main.WorkingState.Nomal)
|
||||
// return;
|
||||
Visibility = Visibility.Visible;
|
||||
m.State = state;
|
||||
m.State = Main.WorkingState.Work;
|
||||
m.StateID = m.Core.Graph.GraphConfig.Works.IndexOf(work);
|
||||
StartTime = DateTime.Now;
|
||||
GetCount = 0;
|
||||
switch (state)
|
||||
{
|
||||
case Main.WorkingState.Study:
|
||||
m.Core.Graph.GraphConfig.UIStyleStudy.SetStyle(this);
|
||||
MaxTime = 45;
|
||||
m.DisplayStudy();
|
||||
break;
|
||||
case Main.WorkingState.WorkONE:
|
||||
m.Core.Graph.GraphConfig.UIStyleWork1.SetStyle(this);
|
||||
MaxTime = 60;
|
||||
m.DisplayWorkONE();
|
||||
break;
|
||||
case Main.WorkingState.WorkTWO:
|
||||
m.Core.Graph.GraphConfig.UIStyleWork2.SetStyle(this);
|
||||
MaxTime = 180;
|
||||
m.DisplayWorkTWO();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
PBLeft.Maximum = MaxTime;
|
||||
|
||||
work.SetStyle(this);
|
||||
work.Display(m);
|
||||
|
||||
PBLeft.Maximum = work.Time;
|
||||
nowWork = work;
|
||||
DisplayUI();
|
||||
}
|
||||
private Work nowWork;
|
||||
public void Stop(Action @then = null)
|
||||
{
|
||||
Visibility = Visibility.Collapsed;
|
||||
switch (m.State)
|
||||
{
|
||||
case Main.WorkingState.Study:
|
||||
m.State = Main.WorkingState.Nomal;
|
||||
m.Display(GraphCore.GraphType.Study_C_End, then ?? m.DisplayNomal);
|
||||
return;
|
||||
case Main.WorkingState.WorkONE:
|
||||
m.State = Main.WorkingState.Nomal;
|
||||
m.Display(GraphCore.GraphType.WorkONE_C_End, then ?? m.DisplayNomal);
|
||||
return;
|
||||
case Main.WorkingState.WorkTWO:
|
||||
m.State = Main.WorkingState.Nomal;
|
||||
m.Display(GraphCore.GraphType.WorkTWO_C_End, then ?? m.DisplayNomal);
|
||||
break;
|
||||
default:
|
||||
if (then == null)
|
||||
m.DisplayNomal();
|
||||
else
|
||||
then();
|
||||
return;
|
||||
}
|
||||
m.State = Main.WorkingState.Nomal;
|
||||
m.Display(nowWork.Graph, AnimatType.C_End, then ?? m.DisplayNomal);
|
||||
}
|
||||
private void btnStop_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
public class UIStyleConfig
|
||||
{
|
||||
[Line]
|
||||
public string BorderBrush = "0290D5";
|
||||
[Line]
|
||||
public string Background = "81d4fa";
|
||||
[Line]
|
||||
public string ButtonBackground = "0286C6";
|
||||
[Line]
|
||||
public string ButtonForeground = "ffffff";
|
||||
[Line]
|
||||
public string Foreground = "0286C6";
|
||||
[Line]
|
||||
public double Left = 100;
|
||||
[Line]
|
||||
public double Top = 160;
|
||||
[Line]
|
||||
public double Width = 300;
|
||||
|
||||
public void SetStyle(WorkTimer wt)
|
||||
{
|
||||
wt.Margin = new Thickness(Left, Top, 0, 0);
|
||||
wt.Width = Width;
|
||||
wt.Height = Width / 300 * 180;
|
||||
wt.Resources.Clear();
|
||||
wt.Resources.Add("BorderBrush", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + BorderBrush)));
|
||||
wt.Resources.Add("Background", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + Background)));
|
||||
wt.Resources.Add("ButtonBackground", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#AA" + ButtonBackground)));
|
||||
wt.Resources.Add("ButtonBackgroundHover", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + ButtonBackground)));
|
||||
wt.Resources.Add("ButtonForeground", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + ButtonForeground)));
|
||||
wt.Resources.Add("Foreground", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + Foreground)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
<UserControl x:Class="VPet_Simulator.Core.EyeTracking"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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" Width="500">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
@ -1,15 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// IEyeTracking.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class EyeTracking : UserControl
|
||||
{
|
||||
public EyeTracking()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@ using static VPet_Simulator.Core.IGraph;
|
||||
using LinePutScript;
|
||||
using System.IO;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
using System.Linq;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
@ -23,18 +24,16 @@ namespace VPet_Simulator.Core
|
||||
/// 创建食物动画 第二层夹心为运行时提供
|
||||
/// </summary>
|
||||
/// <param name="graphCore">动画核心</param>
|
||||
/// <param name="modetype">动画模式</param>
|
||||
/// <param name="graphtype">动画类型</param>
|
||||
/// <param name="graphinfo">动画信息</param>
|
||||
/// <param name="front_Lay">前层 动画名</param>
|
||||
/// <param name="back_Lay">后层 动画名</param>
|
||||
/// <param name="animations">中间层运动轨迹</param>
|
||||
/// <param name="isLoop">是否循环</param>
|
||||
public FoodAnimation(GraphCore graphCore, GameSave.ModeType modetype, GraphCore.GraphType graphtype, string front_Lay,
|
||||
public FoodAnimation(GraphCore graphCore, GraphInfo graphinfo, string front_Lay,
|
||||
string back_Lay, ILine animations, bool isLoop = false)
|
||||
{
|
||||
IsLoop = isLoop;
|
||||
GraphType = graphtype;
|
||||
ModeType = modetype;
|
||||
GraphInfo = graphinfo;
|
||||
GraphCore = graphCore;
|
||||
Front_Lay = front_Lay;
|
||||
Back_Lay = back_Lay;
|
||||
@ -50,53 +49,9 @@ namespace VPet_Simulator.Core
|
||||
|
||||
public static void LoadGraph(GraphCore graph, FileSystemInfo path, ILine info)
|
||||
{
|
||||
GameSave.ModeType modetype;
|
||||
var path_name = path.FullName.Trim('_').ToLower();
|
||||
if (!Enum.TryParse(info[(gstr)"mode"], true, out modetype))
|
||||
{
|
||||
if (path_name.Contains("happy"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Happy;
|
||||
}
|
||||
else if (path_name.Contains("nomal"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
else if (path_name.Contains("poorcondition"))
|
||||
{
|
||||
modetype = GameSave.ModeType.PoorCondition;
|
||||
}
|
||||
else if (path_name.Contains("ill"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Ill;
|
||||
}
|
||||
else
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
}
|
||||
GraphType graphtype = GraphType.Not_Able;
|
||||
if (!Enum.TryParse(info[(gstr)"graph"], true, out graphtype))
|
||||
{
|
||||
for (int i = 0; i < GraphTypeValue.Length; i++)
|
||||
{
|
||||
if (path_name.StartsWith(GraphTypeValue[i]))
|
||||
{
|
||||
graphtype = (GraphType)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool isLoop = info[(gbol)"loop"];
|
||||
FoodAnimation pa = new FoodAnimation(graph, modetype, graphtype, info[(gstr)"front_lay"], info[(gstr)"back_lay"], info, isLoop);
|
||||
if (graphtype == GraphType.Not_Able)
|
||||
{
|
||||
graph.AddCOMMGraph(pa, info.info);
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.AddGraph(pa, graphtype);
|
||||
}
|
||||
FoodAnimation pa = new FoodAnimation(graph, GraphHelper.GetGraphInfo(path, info), info[(gstr)"front_lay"], info[(gstr)"back_lay"], info, isLoop);
|
||||
graph.AddGraph(pa);
|
||||
}
|
||||
/// <summary>
|
||||
/// 前层名字
|
||||
@ -126,10 +81,10 @@ namespace VPet_Simulator.Core
|
||||
/// 是否循环播放
|
||||
/// </summary>
|
||||
public bool IsContinue { get; set; } = false;
|
||||
|
||||
public GameSave.ModeType ModeType { get; private set; }
|
||||
|
||||
public GraphCore.GraphType GraphType { get; private set; }
|
||||
/// <summary>
|
||||
/// 动画信息
|
||||
/// </summary>
|
||||
public GraphInfo GraphInfo { get; private set; }
|
||||
/// <summary>
|
||||
/// 是否准备完成
|
||||
/// </summary>
|
||||
@ -309,7 +264,6 @@ namespace VPet_Simulator.Core
|
||||
nowid = 0;
|
||||
PlayState = true;
|
||||
DoEndAction = true;
|
||||
GraphCore.RndGraph.Clear();
|
||||
parant.Dispatcher.Invoke(() =>
|
||||
{
|
||||
parant.Tag = this;
|
||||
@ -321,8 +275,8 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
parant.Child = FoodGrid;
|
||||
}
|
||||
IImageRun FL = (IImageRun)GraphCore.FindCOMMGraph(Front_Lay, ModeType);
|
||||
IImageRun BL = (IImageRun)GraphCore.FindCOMMGraph(Back_Lay, ModeType);
|
||||
var FL = GraphCore.FindGraph(Front_Lay, GraphInfo.Animat, GraphInfo.ModeType);
|
||||
var BL = GraphCore.FindGraph(Back_Lay, GraphInfo.Animat, GraphInfo.ModeType);
|
||||
var t1 = FL?.Run(FoodGrid.Front);
|
||||
var t2 = BL?.Run(FoodGrid.Back);
|
||||
FoodGrid.Food.Source = image;
|
||||
|
@ -1,11 +1,16 @@
|
||||
using LinePutScript;
|
||||
using LinePutScript.Converter;
|
||||
using LinePutScript.Dictionary;
|
||||
using LinePutScript.Localization.WPF;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Xml.Linq;
|
||||
using static VPet_Simulator.Core.GraphHelper;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
@ -15,7 +20,6 @@ namespace VPet_Simulator.Core
|
||||
public class GraphCore
|
||||
{
|
||||
|
||||
|
||||
public GraphCore()
|
||||
{
|
||||
if (!Directory.Exists(CachePath))
|
||||
@ -24,326 +28,15 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
|
||||
public static string CachePath = AppDomain.CurrentDomain.BaseDirectory + @"\cache";
|
||||
/// <summary>
|
||||
/// 动画类型
|
||||
/// </summary>
|
||||
public enum GraphType
|
||||
{
|
||||
// 名称 ?描述? ?动作? 大约时间(L:(1000+)M:(200-800)S:(125))
|
||||
/// <summary>
|
||||
/// 不被启用/使用的 不包含在GrapType S
|
||||
/// </summary>
|
||||
Not_Able,
|
||||
/// <summary>
|
||||
/// 被提起动态 (循环) L
|
||||
/// </summary>
|
||||
Raised_Dynamic,
|
||||
/// <summary>
|
||||
/// 被提起静态 (开始) L
|
||||
/// </summary>
|
||||
Raised_Static_A_Start,
|
||||
/// <summary>
|
||||
/// 被提起静态 (循环) L
|
||||
/// </summary>
|
||||
Raised_Static_B_Loop,
|
||||
/// <summary>
|
||||
/// 从上向右爬 (循环) M
|
||||
/// </summary>
|
||||
Climb_Top_Right,
|
||||
/// <summary>
|
||||
/// 从上向左爬 (循环) M
|
||||
/// </summary>
|
||||
Climb_Top_Left,
|
||||
/// <summary>
|
||||
/// 爬起向右 M
|
||||
/// </summary>
|
||||
Climb_Up_Right,
|
||||
/// <summary>
|
||||
/// 爬起向左 M
|
||||
/// </summary>
|
||||
Climb_Up_Left,
|
||||
/// <summary>
|
||||
/// 从右边爬 (开始) S
|
||||
/// </summary>
|
||||
Climb_Right_A_Start,
|
||||
/// <summary>
|
||||
/// 从左边爬 (开始) S
|
||||
/// </summary>
|
||||
Climb_Left_A_Start,
|
||||
/// <summary>
|
||||
/// 从右边爬 (循环) M
|
||||
/// </summary>
|
||||
Climb_Right_B_Loop,
|
||||
/// <summary>
|
||||
/// 从左边爬 (循环) M
|
||||
/// </summary>
|
||||
Climb_Left_B_Loop,
|
||||
/// <summary>
|
||||
/// 呼吸 (循环) L
|
||||
/// </summary>
|
||||
Default,
|
||||
/// <summary>
|
||||
/// 摸头 (开始) S
|
||||
/// </summary>
|
||||
Touch_Head_A_Start,
|
||||
/// <summary>
|
||||
/// 摸头 (循环) M
|
||||
/// </summary>
|
||||
Touch_Head_B_Loop,
|
||||
/// <summary>
|
||||
/// 摸头 (结束) S
|
||||
/// </summary>
|
||||
Touch_Head_C_End,
|
||||
/// <summary>
|
||||
/// 摸身体 (开始) S
|
||||
/// </summary>
|
||||
Touch_Body_A_Start,
|
||||
/// <summary>
|
||||
/// 摸身体 (循环) M
|
||||
/// </summary>
|
||||
Touch_Body_B_Loop,
|
||||
/// <summary>
|
||||
/// 摸身体 (结束) S
|
||||
/// </summary>
|
||||
Touch_Body_C_End,
|
||||
/// <summary>
|
||||
/// 爬行向右 (开始) S
|
||||
/// </summary>
|
||||
Crawl_Right_A_Start,
|
||||
/// <summary>
|
||||
/// 爬行向右 (循环) M
|
||||
/// </summary>
|
||||
Crawl_Right_B_Loop,
|
||||
/// <summary>
|
||||
/// 爬行向右 (结束) S
|
||||
/// </summary>
|
||||
Crawl_Right_C_End,
|
||||
/// <summary>
|
||||
/// 爬行向左 (开始) S
|
||||
/// </summary>
|
||||
Crawl_Left_A_Start,
|
||||
/// <summary>
|
||||
/// 爬行向左 (循环) M
|
||||
/// </summary>
|
||||
Crawl_Left_B_Loop,
|
||||
/// <summary>
|
||||
/// 爬行向左 (结束) S
|
||||
/// </summary>
|
||||
Crawl_Left_C_End,
|
||||
/// <summary>
|
||||
/// 下蹲 (开始) S
|
||||
/// </summary>
|
||||
Squat_A_Start,
|
||||
/// <summary>
|
||||
/// 下蹲 (循环) M
|
||||
/// </summary>
|
||||
Squat_B_Loop,
|
||||
/// <summary>
|
||||
/// 下蹲 (结束) S
|
||||
/// </summary>
|
||||
Squat_C_End,
|
||||
/// <summary>
|
||||
/// 下落向左 (开始) S
|
||||
/// </summary>
|
||||
Fall_Left_A_Start,
|
||||
/// <summary>
|
||||
/// 下落向左 (循环) M
|
||||
/// </summary>
|
||||
Fall_Left_B_Loop,
|
||||
/// <summary>
|
||||
/// 下落向左 (结束) S
|
||||
/// </summary>
|
||||
Fall_Left_C_End,
|
||||
/// <summary>
|
||||
/// 下落向右 (开始) S
|
||||
/// </summary>
|
||||
Fall_Right_A_Start,
|
||||
/// <summary>
|
||||
/// 下落向右 (循环) M
|
||||
/// </summary>
|
||||
Fall_Right_B_Loop,
|
||||
/// <summary>
|
||||
/// 下落向右 (结束) S
|
||||
/// </summary>
|
||||
Fall_Right_C_End,
|
||||
/// <summary>
|
||||
/// 走路向右 (开始) S
|
||||
/// </summary>
|
||||
Walk_Right_A_Start,
|
||||
/// <summary>
|
||||
/// 走路向右 (循环) M
|
||||
/// </summary>
|
||||
Walk_Right_B_Loop,
|
||||
/// <summary>
|
||||
/// 走路向右 (结束) S
|
||||
/// </summary>
|
||||
Walk_Right_C_End,
|
||||
/// <summary>
|
||||
/// 走路向左 (开始) S
|
||||
/// </summary>
|
||||
Walk_Left_A_Start,
|
||||
/// <summary>
|
||||
/// 走路向左 (循环) M
|
||||
/// </summary>
|
||||
Walk_Left_B_Loop,
|
||||
/// <summary>
|
||||
/// 走路向左 (结束) S
|
||||
/// </summary>
|
||||
Walk_Left_C_End,
|
||||
/// <summary>
|
||||
/// 无聊 (开始) S
|
||||
/// </summary>
|
||||
Boring_A_Start,
|
||||
/// <summary>
|
||||
/// 无聊 (循环) M
|
||||
/// </summary>
|
||||
Boring_B_Loop,
|
||||
/// <summary>
|
||||
/// 无聊 (结束) S
|
||||
/// </summary>
|
||||
Boring_C_End,
|
||||
/// <summary>
|
||||
/// 睡觉 (开始) S
|
||||
/// </summary>
|
||||
Sleep_A_Start,
|
||||
/// <summary>
|
||||
/// 睡觉 (循环) M
|
||||
/// </summary>
|
||||
Sleep_B_Loop,
|
||||
/// <summary>
|
||||
/// 睡觉 (结束) S
|
||||
/// </summary>
|
||||
Sleep_C_End,
|
||||
/// <summary>
|
||||
/// 说话 (开始) S
|
||||
/// </summary>
|
||||
Say_Serious_A_Start,
|
||||
/// <summary>
|
||||
/// 说话 (循环) M
|
||||
/// </summary>
|
||||
Say_Serious_B_Loop,
|
||||
/// <summary>
|
||||
/// 说话 (结束) S
|
||||
/// </summary>
|
||||
Say_Serious_C_End,
|
||||
/// <summary>
|
||||
/// 说话 (开始) S
|
||||
/// </summary>
|
||||
Say_Shining_A_Start,
|
||||
/// <summary>
|
||||
/// 说话 (循环) M
|
||||
/// </summary>
|
||||
Say_Shining_B_Loop,
|
||||
/// <summary>
|
||||
/// 说话 (结束) S
|
||||
/// </summary>
|
||||
Say_Shining_C_End,
|
||||
/// <summary>
|
||||
/// 说话 (开始) S
|
||||
/// </summary>
|
||||
Say_Self_A_Start,
|
||||
/// <summary>
|
||||
/// 说话 (循环) M
|
||||
/// </summary>
|
||||
Say_Self_B_Loop,
|
||||
/// <summary>
|
||||
/// 说话 (结束) S
|
||||
/// </summary>
|
||||
Say_Self_C_End,
|
||||
/// <summary>
|
||||
/// 待机 模式1 (开始) S
|
||||
/// </summary>
|
||||
Idel_StateONE_A_Start,
|
||||
/// <summary>
|
||||
/// 待机 模式1 (循环) M
|
||||
/// </summary>
|
||||
Idel_StateONE_B_Loop,
|
||||
/// <summary>
|
||||
/// 待机 模式1 (结束) S
|
||||
/// </summary>
|
||||
Idel_StateONE_C_End,
|
||||
/// <summary>
|
||||
/// 待机 模式2 (开始) S
|
||||
/// </summary>
|
||||
Idel_StateTWO_A_Start,
|
||||
/// <summary>
|
||||
/// 待机 模式2 (循环) M
|
||||
/// </summary>
|
||||
Idel_StateTWO_B_Loop,
|
||||
/// <summary>
|
||||
/// 待机 模式2 (结束) S
|
||||
/// </summary>
|
||||
Idel_StateTWO_C_End,
|
||||
/// <summary>
|
||||
/// 开机 M
|
||||
/// </summary>
|
||||
StartUP,
|
||||
/// <summary>
|
||||
/// 关机 M
|
||||
/// </summary>
|
||||
Shutdown,
|
||||
/// <summary>
|
||||
/// 学习 (开始) S
|
||||
/// </summary>
|
||||
Study_A_Start,
|
||||
/// <summary>
|
||||
/// 学习 (循环) M
|
||||
/// </summary>
|
||||
Study_B_Loop,
|
||||
/// <summary>
|
||||
/// 学习 (结束) S
|
||||
/// </summary>
|
||||
Study_C_End,
|
||||
/// <summary>
|
||||
/// 工作 (开始) S
|
||||
/// </summary>
|
||||
WorkONE_A_Start,
|
||||
/// <summary>
|
||||
/// 工作 (循环) M
|
||||
/// </summary>
|
||||
WorkONE_B_Loop,
|
||||
/// <summary>
|
||||
/// 工作 (结束) S
|
||||
/// </summary>
|
||||
WorkONE_C_End,
|
||||
/// <summary>
|
||||
/// 直播 (开始) S
|
||||
/// </summary>
|
||||
WorkTWO_A_Start,
|
||||
/// <summary>
|
||||
/// 直播 (循环) M
|
||||
/// </summary>
|
||||
WorkTWO_B_Loop,
|
||||
/// <summary>
|
||||
/// 直播 (结束) S
|
||||
/// </summary>
|
||||
WorkTWO_C_End,
|
||||
/// <summary>
|
||||
/// 口渴 M
|
||||
/// </summary>
|
||||
Switch_Thirsty,
|
||||
/// <summary>
|
||||
/// 饥饿 M
|
||||
/// </summary>
|
||||
Switch_Hunger,
|
||||
/// <summary>
|
||||
/// 吃东西 M
|
||||
/// </summary>
|
||||
Eat,
|
||||
/// <summary>
|
||||
/// 喝东西 M
|
||||
/// </summary>
|
||||
Drink,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 图像字典
|
||||
/// 图像名字字典: 动画类型->动画名字
|
||||
/// </summary>
|
||||
public Dictionary<GraphType, List<IGraph>> Graphs = new Dictionary<GraphType, List<IGraph>>();
|
||||
public Dictionary<GraphType, HashSet<string>> GraphsName = new Dictionary<GraphType, HashSet<string>>();
|
||||
/// <summary>
|
||||
/// 图像字典(不被主要引用)
|
||||
/// 图像字典 动画名字->状态+动作->动画
|
||||
/// </summary>
|
||||
public Dictionary<string, List<IGraph>> CommGraphs = new Dictionary<string, List<IGraph>>();
|
||||
public Dictionary<string, Dictionary<AnimatType, List<IGraph>>> GraphsList = new Dictionary<string, Dictionary<AnimatType, List<IGraph>>>();
|
||||
/// <summary>
|
||||
/// 通用UI资源
|
||||
/// </summary>
|
||||
@ -356,99 +49,68 @@ namespace VPet_Simulator.Core
|
||||
/// 添加动画
|
||||
/// </summary>
|
||||
/// <param name="graph">动画</param>
|
||||
/// <param name="type">类型</param>
|
||||
public void AddGraph(IGraph graph, GraphType type)
|
||||
public void AddGraph(IGraph graph)
|
||||
{
|
||||
//switch (graph.GraphType)
|
||||
//{
|
||||
// case GraphType.Default:
|
||||
// case GraphType.Boring_B_Loop:
|
||||
// case GraphType.Squat_B_Loop:
|
||||
// graph.IsLoop = true;
|
||||
// break;
|
||||
//}//循环真要不得,要做随机循环
|
||||
if (!Graphs.ContainsKey(type))
|
||||
if (graph.GraphInfo.Type != GraphType.Common)
|
||||
{
|
||||
Graphs.Add(type, new List<IGraph>());
|
||||
if (!GraphsName.TryGetValue(graph.GraphInfo.Type, out var d2))
|
||||
{
|
||||
d2 = new HashSet<string>();
|
||||
GraphsName.Add(graph.GraphInfo.Type, d2);
|
||||
}
|
||||
d2.Add(graph.GraphInfo.Name);
|
||||
}
|
||||
Graphs[type].Add(graph);
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加动画
|
||||
/// </summary>
|
||||
/// <param name="graph">动画</param>
|
||||
public void AddGraph(IGraph graph) => AddGraph(graph, graph.GraphType);
|
||||
/// <summary>
|
||||
/// 添加动画
|
||||
/// </summary>
|
||||
/// <param name="graph">动画</param>
|
||||
/// <param name="type">类型</param>
|
||||
public void AddCOMMGraph(IGraph graph, string Name)
|
||||
{
|
||||
if (!CommGraphs.ContainsKey(Name))
|
||||
if (!GraphsList.TryGetValue(graph.GraphInfo.Name, out var d3))
|
||||
{
|
||||
CommGraphs.Add(Name, new List<IGraph>());
|
||||
d3 = new Dictionary<AnimatType, List<IGraph>>();
|
||||
GraphsList.Add(graph.GraphInfo.Name, d3);
|
||||
}
|
||||
CommGraphs[Name].Add(graph);
|
||||
if (!d3.TryGetValue(graph.GraphInfo.Animat, out var l3))
|
||||
{
|
||||
l3 = new List<IGraph>();
|
||||
d3.Add(graph.GraphInfo.Animat, l3);
|
||||
}
|
||||
l3.Add(graph);
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加动画 自动创建
|
||||
/// </summary>
|
||||
/// <param name="path">位置</param>
|
||||
/// <param name="modetype">状态类型</param>
|
||||
/// <param name="graphtype">动画类型</param>
|
||||
///// <param name="storemem">是否储存到内存以节约加载</param>
|
||||
public void AddGraph(string path, GameSave.ModeType modetype, GraphType graphtype)//, bool storemem = false)
|
||||
{
|
||||
var paths = new DirectoryInfo(path).GetFiles();
|
||||
if (paths.Length == 0)
|
||||
return;
|
||||
if (paths.Length == 1)
|
||||
AddGraph(new Picture(this, paths[0].FullName, modetype, graphtype,
|
||||
int.Parse(paths[0].Name.Split('.').Reverse().ToArray()[1].Split('_').Last())), graphtype);
|
||||
else
|
||||
AddGraph(new PNGAnimation(this, path, paths, modetype, graphtype), graphtype);
|
||||
}
|
||||
/// <summary>
|
||||
/// 随机数字典(用于确保随机动画不会错位)
|
||||
/// </summary>
|
||||
public Dictionary<int, int> RndGraph = new Dictionary<int, int>();
|
||||
|
||||
/// <summary>
|
||||
/// 获得随机动画名字
|
||||
/// </summary>
|
||||
/// <param name="type">动画类型</param>
|
||||
/// <returns>动画名字,找不到则返回null</returns>
|
||||
public string FindName(GraphType type)
|
||||
{
|
||||
if (GraphsName.TryGetValue(type, out var gl))
|
||||
{
|
||||
return gl.ElementAt(Function.Rnd.Next(gl.Count));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/// <summary>
|
||||
/// 查找动画
|
||||
/// </summary>
|
||||
/// <param name="type">动画类型</param>
|
||||
/// <param name="GraphName">动画名字</param>
|
||||
/// <param name="mode">状态类型,找不到就找相同动画类型</param>
|
||||
///// <param name="storernd">是否储存随机数字典</param>
|
||||
public IGraph FindGraph(GraphType type, GameSave.ModeType mode)
|
||||
/// <param name="animat">动画的动作 Start Loop End</param>
|
||||
public IGraph FindGraph(string GraphName, AnimatType animat, GameSave.ModeType mode)
|
||||
{
|
||||
if (Graphs.ContainsKey(type))
|
||||
if (GraphName == null)
|
||||
return null;
|
||||
if (GraphsList.TryGetValue(GraphName, out var d3) && d3.TryGetValue(animat, out var gl))
|
||||
{
|
||||
var list = Graphs[type].FindAll(x => x.ModeType == mode);
|
||||
var list = gl.FindAll(x => x.GraphInfo.ModeType == mode);
|
||||
if (list.Count > 0)
|
||||
{
|
||||
if (list.Count == 1)
|
||||
return list[0];
|
||||
if (GraphConfig.StoreRnd.Contains(type.ToString()))
|
||||
if (RndGraph.TryGetValue(list.Count, out int index))
|
||||
{
|
||||
return list[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
index = Function.Rnd.Next(list.Count);
|
||||
RndGraph.Add(list.Count, index);
|
||||
return list[index];
|
||||
}
|
||||
else
|
||||
return list[Function.Rnd.Next(list.Count)];
|
||||
|
||||
return list[Function.Rnd.Next(list.Count)];
|
||||
}
|
||||
int i = (int)mode + 1;
|
||||
if (i < 3)
|
||||
{
|
||||
//向下兼容的动画
|
||||
list = Graphs[type].FindAll(x => x.ModeType == (GameSave.ModeType)i);
|
||||
list = gl.FindAll(x => x.GraphInfo.ModeType == (GameSave.ModeType)i);
|
||||
if (list.Count > 0)
|
||||
return list[Function.Rnd.Next(list.Count)];
|
||||
}
|
||||
@ -456,79 +118,63 @@ namespace VPet_Simulator.Core
|
||||
if (i >= 0)
|
||||
{
|
||||
//向上兼容的动画
|
||||
list = Graphs[type].FindAll(x => x.ModeType == (GameSave.ModeType)i);
|
||||
list = gl.FindAll(x => x.GraphInfo.ModeType == (GameSave.ModeType)i);
|
||||
if (list.Count > 0)
|
||||
return list[Function.Rnd.Next(list.Count)];
|
||||
}
|
||||
//如果实在找不到,就走随机数
|
||||
//if (mode != GameSave.ModeType.Ill)
|
||||
//{
|
||||
list = Graphs[type];
|
||||
list = gl;
|
||||
if (list.Count > 0)
|
||||
return list[Function.Rnd.Next(list.Count)];
|
||||
//}
|
||||
//}
|
||||
}
|
||||
return null;// FindGraph(GraphType.Default, mode);
|
||||
}
|
||||
/// <summary>
|
||||
/// 查找动画
|
||||
/// 查找动画列表
|
||||
/// </summary>
|
||||
/// <param name="type">动画类型</param>
|
||||
/// <param name="mode">状态类型,找不到就找相同动画类型</param>
|
||||
///// <param name="storernd">是否储存随机数字典</param>
|
||||
public IGraph FindCOMMGraph(string Name, GameSave.ModeType mode)
|
||||
/// <param name="animat">动画的动作 Start Loop End</param>
|
||||
public List<IGraph> FindGraphs(string GraphName, AnimatType animat, GameSave.ModeType mode)
|
||||
{
|
||||
if (CommGraphs.ContainsKey(Name))
|
||||
if (GraphName == null)
|
||||
return null;
|
||||
if (GraphsList.TryGetValue(GraphName, out var d3) && d3.TryGetValue(animat, out var gl))
|
||||
{
|
||||
var list = CommGraphs[Name].FindAll(x => x.ModeType == mode);
|
||||
var list = gl.FindAll(x => x.GraphInfo.ModeType == mode);
|
||||
if (list.Count > 0)
|
||||
{
|
||||
if (list.Count == 1)
|
||||
return list[0];
|
||||
if (GraphConfig.StoreRnd.Contains(Name))
|
||||
if (RndGraph.TryGetValue(list.Count, out int index))
|
||||
{
|
||||
return list[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
index = Function.Rnd.Next(list.Count);
|
||||
RndGraph.Add(list.Count, index);
|
||||
return list[index];
|
||||
}
|
||||
else
|
||||
return list[Function.Rnd.Next(list.Count)];
|
||||
|
||||
return list;
|
||||
}
|
||||
if (mode != GameSave.ModeType.Ill)
|
||||
int i = (int)mode + 1;
|
||||
if (i < 3)
|
||||
{
|
||||
list = CommGraphs[Name].FindAll(x => x.ModeType != GameSave.ModeType.Ill);
|
||||
//向下兼容的动画
|
||||
list = gl.FindAll(x => x.GraphInfo.ModeType == (GameSave.ModeType)i);
|
||||
if (list.Count > 0)
|
||||
return list[Function.Rnd.Next(list.Count)];
|
||||
return list;
|
||||
}
|
||||
i = (int)mode - 1;
|
||||
if (i >= 0)
|
||||
{
|
||||
//向上兼容的动画
|
||||
list = gl.FindAll(x => x.GraphInfo.ModeType == (GameSave.ModeType)i);
|
||||
if (list.Count > 0)
|
||||
return list;
|
||||
}
|
||||
//如果实在找不到,就走随机数
|
||||
//if (mode != GameSave.ModeType.Ill)
|
||||
//{
|
||||
list = gl;
|
||||
if (list.Count > 0)
|
||||
return list;
|
||||
//}
|
||||
}
|
||||
return null;// FindGraph(GraphType.Default, mode);
|
||||
}
|
||||
static string[] graphtypevalue = null;
|
||||
/// <summary>
|
||||
/// 动画类型默认前文本
|
||||
/// </summary>
|
||||
public static string[] GraphTypeValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (graphtypevalue == null)
|
||||
{
|
||||
List<string> gtv = new List<string>();
|
||||
foreach (string v in Enum.GetNames(typeof(GraphType)))
|
||||
{
|
||||
gtv.Add(v.Replace("_Start", "").Replace("_Loop", "").Replace("_End", "").ToLower());
|
||||
}
|
||||
graphtypevalue = gtv.ToArray();
|
||||
}
|
||||
return graphtypevalue;
|
||||
}
|
||||
}
|
||||
|
||||
public Config GraphConfig;
|
||||
/// <summary>
|
||||
@ -557,47 +203,28 @@ namespace VPet_Simulator.Core
|
||||
/// 提起定位点
|
||||
/// </summary>
|
||||
public Point[] RaisePoint;
|
||||
|
||||
/// <summary>
|
||||
/// 行走速度
|
||||
/// 所有移动
|
||||
/// </summary>
|
||||
public double SpeedWalk;
|
||||
public List<Move> Moves = new List<Move>();
|
||||
|
||||
/// <summary>
|
||||
/// 侧边爬行速度
|
||||
/// 所有工作/学习
|
||||
/// </summary>
|
||||
public double SpeedClimb;
|
||||
public List<Work> Works = new List<Work>();
|
||||
|
||||
public Line_D Str;
|
||||
/// <summary>
|
||||
/// 顶部爬行速度
|
||||
/// 持续时间
|
||||
/// </summary>
|
||||
public double SpeedClimbTop;
|
||||
public Line_D Duration;
|
||||
/// <summary>
|
||||
/// 爬行速度
|
||||
/// 获取持续时间
|
||||
/// </summary>
|
||||
public double SpeedCrawl;
|
||||
/// <summary>
|
||||
/// 掉落速度 X轴
|
||||
/// </summary>
|
||||
public double SpeedFallX;
|
||||
/// <summary>
|
||||
/// 掉落速度 Y轴
|
||||
/// </summary>
|
||||
public double SpeedFallY;
|
||||
/// <summary>
|
||||
/// 定位爬行左边距离
|
||||
/// </summary>
|
||||
public double LocateClimbLeft;
|
||||
/// <summary>
|
||||
/// 定位爬行右边距离
|
||||
/// </summary>
|
||||
public double LocateClimbRight;
|
||||
/// <summary>
|
||||
/// 定位爬行上边距离
|
||||
/// </summary>
|
||||
public double LocateClimbTop;
|
||||
public List<string> StoreRnd = new List<string>();
|
||||
public ILine Str;
|
||||
public WorkTimer.UIStyleConfig UIStyleWork1;
|
||||
public WorkTimer.UIStyleConfig UIStyleWork2;
|
||||
public WorkTimer.UIStyleConfig UIStyleStudy;
|
||||
/// <param name="name">动画名称</param>
|
||||
/// <returns>持续时间</returns>
|
||||
public int GetDuration(string name) => Duration.GetInt(name, 20);
|
||||
/// <summary>
|
||||
/// 获得 Str 里面储存的文本 (已翻译)
|
||||
/// </summary>
|
||||
@ -630,31 +257,17 @@ namespace VPet_Simulator.Core
|
||||
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"];
|
||||
SpeedClimbTop = s[(gdbe)"climbtop"];
|
||||
SpeedCrawl = s[(gdbe)"crawl"];
|
||||
SpeedFallX = s[(gdbe)"fallx"];
|
||||
SpeedFallY = s[(gdbe)"fally"];
|
||||
|
||||
|
||||
s = lps["locate"];
|
||||
LocateClimbLeft = s[(gdbe)"climbleft"];
|
||||
LocateClimbRight = s[(gdbe)"climbright"];
|
||||
LocateClimbTop = s[(gdbe)"climbtop"];
|
||||
|
||||
foreach (Sub sub in lps["storernd"])
|
||||
foreach (var line in lps.FindAllLine("work"))
|
||||
{
|
||||
StoreRnd.Add(sub.Name);
|
||||
Works.Add(LPSConvert.DeserializeObject<Work>(line));
|
||||
}
|
||||
var line = lps.FindLine("UIStyleConfig", "work1");
|
||||
UIStyleWork1 = line == null ? new WorkTimer.UIStyleConfig() : LPSConvert.DeserializeObject<WorkTimer.UIStyleConfig>(line);
|
||||
line = lps.FindLine("UIStyleConfig", "work2");
|
||||
UIStyleWork2 = line == null ? new WorkTimer.UIStyleConfig() : LPSConvert.DeserializeObject<WorkTimer.UIStyleConfig>(line);
|
||||
line = lps.FindLine("UIStyleConfig", "study");
|
||||
UIStyleStudy = line == null ? new WorkTimer.UIStyleConfig() : LPSConvert.DeserializeObject<WorkTimer.UIStyleConfig>(line);
|
||||
Str = lps["str"];
|
||||
foreach (var line in lps.FindAllLine("move"))
|
||||
{
|
||||
Moves.Add(LPSConvert.DeserializeObject<Move>(line));
|
||||
}
|
||||
Str = new Line_D(lps["str"]);
|
||||
Duration = new Line_D(lps["duration"]);
|
||||
}
|
||||
/// <summary>
|
||||
/// 加载更多设置,新的替换后来的,允许空内容
|
||||
@ -687,79 +300,22 @@ namespace VPet_Simulator.Core
|
||||
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))
|
||||
};
|
||||
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)
|
||||
|
||||
Str.AddRange(lps["str"]);
|
||||
Duration.AddRange(lps["duration"]);
|
||||
|
||||
foreach (var line in lps.FindAllLine("work"))
|
||||
{
|
||||
SpeedWalk = s.GetDouble("walk", SpeedWalk);
|
||||
SpeedClimb = s.GetDouble("climb", SpeedClimb);
|
||||
SpeedClimbTop = s.GetDouble("climbtop", SpeedClimbTop);
|
||||
SpeedCrawl = s.GetDouble("crawl", SpeedCrawl);
|
||||
SpeedFallX = s.GetDouble("fallx", SpeedFallX);
|
||||
SpeedFallY = s.GetDouble("fally", SpeedFallY);
|
||||
Works.Add(LPSConvert.DeserializeObject<Work>(line));
|
||||
}
|
||||
s = lps.FindLine("locate");
|
||||
if (s != null)
|
||||
foreach (var line in lps.FindAllLine("move"))
|
||||
{
|
||||
LocateClimbLeft = s.GetDouble("climbleft", LocateClimbLeft);
|
||||
LocateClimbRight = s.GetDouble("climbright", LocateClimbRight);
|
||||
LocateClimbTop = s.GetDouble("climbtop", LocateClimbTop);
|
||||
}
|
||||
foreach (Sub sub in lps["storernd"])
|
||||
{
|
||||
if (!StoreRnd.Contains(sub.Name))
|
||||
StoreRnd.Add(sub.Name);
|
||||
}
|
||||
foreach (Sub sub in lps["str"])
|
||||
{
|
||||
if (!Str.Contains(sub.Name))
|
||||
Str.Add(sub);
|
||||
Moves.Add(LPSConvert.DeserializeObject<Move>(line));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class Helper
|
||||
{
|
||||
public enum AnimatType
|
||||
{
|
||||
A_Start,
|
||||
B_Loop,
|
||||
C_End,
|
||||
}
|
||||
public enum SayType
|
||||
{
|
||||
/// <summary>
|
||||
/// 无:不执行动作
|
||||
/// </summary>
|
||||
None,
|
||||
/// <summary>
|
||||
/// 默认说话
|
||||
/// </summary>
|
||||
Default,
|
||||
/// <summary>
|
||||
/// 严肃
|
||||
/// </summary>
|
||||
Serious,
|
||||
/// <summary>
|
||||
/// 闪亮
|
||||
/// </summary>
|
||||
Shining,
|
||||
/// <summary>
|
||||
/// 自己
|
||||
/// </summary>
|
||||
Self,
|
||||
/// <summary>
|
||||
/// 错误
|
||||
/// </summary>
|
||||
Error
|
||||
}
|
||||
public static GraphType Convert(SayType sayType, AnimatType type)
|
||||
{
|
||||
string say = "Say_" + sayType.ToString() + '_' + type.ToString(); // (type == null ? "" : '_' + type.ToString());
|
||||
return (GraphType)Enum.Parse(typeof(GraphType), say);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
506
VPet-Simulator.Core/Graph/GraphHelper.cs
Normal file
506
VPet-Simulator.Core/Graph/GraphHelper.cs
Normal file
@ -0,0 +1,506 @@
|
||||
using LinePutScript;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
using static VPet_Simulator.Core.IGraph;
|
||||
using static VPet_Simulator.Core.Picture;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using LinePutScript.Converter;
|
||||
using System.Windows;
|
||||
using Panuon.WPF.UI;
|
||||
using LinePutScript.Localization.WPF;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
public static class GraphHelper
|
||||
{
|
||||
static string[][] graphtypevalue = null;
|
||||
/// <summary>
|
||||
/// 动画类型默认前文本
|
||||
/// </summary>
|
||||
public static string[][] GraphTypeValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (graphtypevalue == null)
|
||||
{
|
||||
List<string[]> gtv = new List<string[]>();
|
||||
foreach (string v in Enum.GetNames(typeof(GraphType)))
|
||||
{
|
||||
gtv.Add(v.ToLower().Split('_'));
|
||||
}
|
||||
graphtypevalue = gtv.ToArray();
|
||||
}
|
||||
return graphtypevalue;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 使用RunImage 从0开始运行该动画 若无RunImage 则使用Run
|
||||
/// </summary>
|
||||
/// <param name="graph">动画接口</param>
|
||||
/// <param name="parant">显示位置</param>
|
||||
/// <param name="EndAction">结束方法</param>
|
||||
/// <param name="image">额外图片</param>
|
||||
public static void Run(this IGraph graph, Border parant, ImageSource image, Action EndAction = null)
|
||||
{
|
||||
if (graph is IRunImage iri)
|
||||
{
|
||||
iri.Run(parant, image, EndAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.Run(parant, EndAction);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 使用ImageRun 指定图像图像控件准备运行该动画
|
||||
/// </summary>
|
||||
/// <param name="graph">动画接口</param>
|
||||
/// <param name="img">用于显示的Image</param>
|
||||
/// <param name="EndAction">结束动画</param>
|
||||
/// <returns>准备好的线程</returns>
|
||||
public static Thread Run(this IGraph graph, Image img, Action EndAction = null)
|
||||
{
|
||||
if (graph is IImageRun iri)
|
||||
{
|
||||
return iri.Run(img, EndAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 通过文件位置和信息获取动画信息
|
||||
/// </summary>
|
||||
/// <param name="path">文件夹位置</param>
|
||||
/// <param name="info">信息</param>
|
||||
/// <returns>动画信息</returns>
|
||||
public static GraphInfo GetGraphInfo(FileSystemInfo path, ILine info)
|
||||
{
|
||||
var path_name = path.Name.Substring(0, path.Name.Length - path.Extension.Length).Replace('\\', '_').ToLower().Split('_').ToList();
|
||||
if (!Enum.TryParse(info[(gstr)"mode"], true, out GameSave.ModeType modetype))
|
||||
{
|
||||
if (path_name.Contains("happy"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Happy;
|
||||
}
|
||||
else if (path_name.Contains("nomal"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
else if (path_name.Contains("poorcondition"))
|
||||
{
|
||||
modetype = GameSave.ModeType.PoorCondition;
|
||||
}
|
||||
else if (path_name.Contains("ill"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Ill;
|
||||
}
|
||||
else
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Enum.TryParse(info[(gstr)"graph"], true, out GraphType graphtype))
|
||||
{
|
||||
graphtype = GraphInfo.GraphType.Common;
|
||||
for (int i = 0; i < GraphTypeValue.Length; i++)
|
||||
{//挨个找第一个匹配的
|
||||
if (path_name.Contains(GraphTypeValue[i][0]))
|
||||
{
|
||||
int index = path_name.IndexOf(GraphTypeValue[i][0]);
|
||||
bool ismatch = true;
|
||||
for (int b = 1; b < GraphTypeValue[i].Length && b + index < path_name.Count; b++)
|
||||
{
|
||||
if (path_name[index + b] != GraphTypeValue[i][b])
|
||||
{
|
||||
ismatch = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ismatch)
|
||||
{
|
||||
graphtype = (GraphType)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Enum.TryParse(info[(gstr)"animat"], true, out AnimatType animatType))
|
||||
{
|
||||
if (path_name.Contains("a") || path_name.Contains("start"))
|
||||
{
|
||||
animatType = AnimatType.A_Start;
|
||||
}
|
||||
else if (path_name.Contains("b") || path_name.Contains("loop"))
|
||||
{
|
||||
animatType = AnimatType.B_Loop;
|
||||
}
|
||||
else if (path_name.Contains("c") || path_name.Contains("end"))
|
||||
{
|
||||
animatType = AnimatType.C_End;
|
||||
}
|
||||
else
|
||||
{
|
||||
animatType = AnimatType.Single;
|
||||
}
|
||||
}
|
||||
string name = info.Name;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
name = graphtype.ToString();
|
||||
}
|
||||
return new GraphInfo(name, graphtype, animatType, modetype);// { Info = info };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工作/学习
|
||||
/// </summary>
|
||||
public class Work
|
||||
{
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public enum WorkType { Work, Study }
|
||||
/// <summary>
|
||||
/// 工作/学习
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public WorkType Type { get; set; }
|
||||
/// <summary>
|
||||
/// 工作名称
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 工作名称 已翻译
|
||||
/// </summary>
|
||||
public string NameTrans => Name.Translate();
|
||||
/// <summary>
|
||||
/// 使用动画名称
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public string Graph { get; set; }
|
||||
/// <summary>
|
||||
/// 工作盈利/学习等级倍率
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public double MoneyLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 工作盈利/学习基本倍率
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public double MoneyBase { get; set; }
|
||||
/// <summary>
|
||||
/// 工作体力(食物)消耗倍率
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public double StrengthFood { get; set; }
|
||||
/// <summary>
|
||||
/// 工作体力(饮料)消耗倍率
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public double StrengthDrink { get; set; }
|
||||
/// <summary>
|
||||
/// 心情消耗倍率
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public double Feeling { get; set; }
|
||||
/// <summary>
|
||||
/// 等级限制
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public int LevelLimit { get; set; }
|
||||
/// <summary>
|
||||
/// 花费时间(分钟)
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public int Time { get; set; }
|
||||
/// <summary>
|
||||
/// 完成奖励倍率(0+)
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public double FinishBonus { get; set; }
|
||||
|
||||
|
||||
[Line(ignoreCase: true)]
|
||||
public string BorderBrush = "0290D5";
|
||||
[Line(ignoreCase: true)]
|
||||
public string Background = "81d4fa";
|
||||
[Line(ignoreCase: true)]
|
||||
public string ButtonBackground = "0286C6";
|
||||
[Line(ignoreCase: true)]
|
||||
public string ButtonForeground = "ffffff";
|
||||
[Line(ignoreCase: true)]
|
||||
public string Foreground = "0286C6";
|
||||
[Line(ignoreCase: true)]
|
||||
public double Left = 100;
|
||||
[Line(ignoreCase: true)]
|
||||
public double Top = 160;
|
||||
[Line(ignoreCase: true)]
|
||||
public double Width = 300;
|
||||
|
||||
public void SetStyle(WorkTimer wt)
|
||||
{
|
||||
wt.Margin = new Thickness(Left, Top, 0, 0);
|
||||
wt.Width = Width;
|
||||
wt.Height = Width / 300 * 180;
|
||||
wt.Resources.Clear();
|
||||
wt.Resources.Add("BorderBrush", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + BorderBrush)));
|
||||
wt.Resources.Add("Background", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + Background)));
|
||||
wt.Resources.Add("ButtonBackground", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#AA" + ButtonBackground)));
|
||||
wt.Resources.Add("ButtonBackgroundHover", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + ButtonBackground)));
|
||||
wt.Resources.Add("ButtonForeground", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + ButtonForeground)));
|
||||
wt.Resources.Add("Foreground", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF" + Foreground)));
|
||||
}
|
||||
/// <summary>
|
||||
/// 显示工作/学习动画
|
||||
/// </summary>
|
||||
/// <param name="m"></param>
|
||||
public void Display(Main m)
|
||||
{
|
||||
m.Display(Graph, AnimatType.A_Start, () => m.DisplayBLoopingForce(Graph));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移动
|
||||
/// </summary>
|
||||
public class Move
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用动画名称
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public string Graph { get; set; }
|
||||
/// <summary>
|
||||
/// 定位类型
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum DirectionType
|
||||
{
|
||||
None,
|
||||
Left,
|
||||
Right = 2,
|
||||
Top = 4,
|
||||
Bottom = 8
|
||||
}
|
||||
/// <summary>
|
||||
/// 定位类型
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public DirectionType LocateType { get; set; }
|
||||
/// <summary>
|
||||
/// 移动间隔
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public int Interval { get; set; } = 125;
|
||||
|
||||
[Line(ignoreCase: true)]
|
||||
private int checkType { get; set; }
|
||||
/// <summary>
|
||||
/// 检查类型
|
||||
/// </summary>
|
||||
public DirectionType CheckType
|
||||
{
|
||||
get => (DirectionType)checkType;
|
||||
set => checkType = (int)value;
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查距离左边
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int CheckLeft { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 检查距离右边
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int CheckRight { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 检查距离上面
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int CheckTop { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 检查距离下面
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int CheckBottom { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 移动速度(X轴)
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int SpeedX { get; set; }
|
||||
/// <summary>
|
||||
/// 移动速度(Y轴)
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int SpeedY { get; set; }
|
||||
/// <summary>
|
||||
/// 定位位置
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)]
|
||||
public int LocateLength { get; set; }
|
||||
/// <summary>
|
||||
/// 移动距离
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int Distance { get; set; } = 5;
|
||||
|
||||
[Line(ignoreCase: true)]
|
||||
private int triggerType { get; set; }
|
||||
/// <summary>
|
||||
/// 触发检查类型
|
||||
/// </summary>
|
||||
public DirectionType TriggerType
|
||||
{
|
||||
get => (DirectionType)triggerType;
|
||||
set => triggerType = (int)value;
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查距离左边
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int TriggerLeft { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 检查距离右边
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int TriggerRight { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 检查距离上面
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int TriggerTop { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 检查距离下面
|
||||
/// </summary>
|
||||
[Line(ignoreCase: true)] public int TriggerBottom { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 是否可以触发
|
||||
/// </summary>
|
||||
public bool Triggered(IController c)
|
||||
{
|
||||
if (TriggerType == DirectionType.None) return true;
|
||||
if (TriggerType.HasFlag(DirectionType.Left) && c.GetWindowsDistanceLeft() < TriggerLeft * c.ZoomRatio)
|
||||
return false;
|
||||
if (TriggerType.HasFlag(DirectionType.Right) && c.GetWindowsDistanceRight() < TriggerRight * c.ZoomRatio)
|
||||
return false;
|
||||
if (TriggerType.HasFlag(DirectionType.Top) && c.GetWindowsDistanceUp() < TriggerTop * c.ZoomRatio)
|
||||
return false;
|
||||
if (TriggerType.HasFlag(DirectionType.Bottom) && c.GetWindowsDistanceDown() < TriggerBottom * c.ZoomRatio)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否可以继续动
|
||||
/// </summary>
|
||||
public bool Checked(IController c)
|
||||
{
|
||||
if (CheckType == DirectionType.None) return true;
|
||||
if (CheckType.HasFlag(DirectionType.Left) && c.GetWindowsDistanceLeft() < CheckLeft * c.ZoomRatio)
|
||||
return false;
|
||||
if (CheckType.HasFlag(DirectionType.Right) && c.GetWindowsDistanceRight() < CheckRight * c.ZoomRatio)
|
||||
return false;
|
||||
if (CheckType.HasFlag(DirectionType.Top) && c.GetWindowsDistanceUp() < CheckTop * c.ZoomRatio)
|
||||
return false;
|
||||
if (CheckType.HasFlag(DirectionType.Bottom) && c.GetWindowsDistanceDown() < CheckBottom * c.ZoomRatio)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
int walklength = 0;
|
||||
/// <summary>
|
||||
/// 获取兼容支持下个播放的移动
|
||||
/// </summary>
|
||||
public Move GetCompatibilityMove(Main main)
|
||||
{
|
||||
List<Move> ms = new List<Move>();
|
||||
bool x = SpeedX > 0;
|
||||
bool y = SpeedY > 0;
|
||||
foreach (Move m in main.Core.Graph.GraphConfig.Moves)
|
||||
{
|
||||
if (m == this) continue;
|
||||
int bns = 0;
|
||||
if (SpeedX != 0 && m.SpeedX != 0)
|
||||
{
|
||||
if ((m.SpeedX > 0) == x)
|
||||
bns--;
|
||||
else
|
||||
bns++;
|
||||
}
|
||||
if (SpeedY != 0 && m.SpeedY != 0)
|
||||
{
|
||||
if ((m.SpeedY > 0) == y)
|
||||
bns--;
|
||||
else
|
||||
bns++;
|
||||
}
|
||||
if (bns >= 0 && m.Triggered(main.Core.Controller))
|
||||
{
|
||||
ms.Add(m);
|
||||
}
|
||||
}
|
||||
if (ms.Count == 0) return null;
|
||||
return ms[Function.Rnd.Next(ms.Count)];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示开始移动 (假设已经检查过了)
|
||||
/// </summary>
|
||||
public void Display(Main m)
|
||||
{
|
||||
walklength = 0;
|
||||
m.CountNomal = 0;
|
||||
m.Display(Graph, AnimatType.A_Start, () =>
|
||||
{
|
||||
m.MoveTimerPoint = new Point(SpeedX, SpeedY);
|
||||
m.MoveTimer.Interval = Interval;
|
||||
m.MoveTimer.Start();
|
||||
Displaying(m);
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 显示正在移动
|
||||
/// </summary>
|
||||
/// <param name="m"></param>
|
||||
public void Displaying(Main m)
|
||||
{
|
||||
//看看距离是不是不足
|
||||
if (Checked(m.Core.Controller))
|
||||
{//是,停下恢复默认 or/爬墙
|
||||
if (Function.Rnd.Next(Main.TreeRND) <= 1)
|
||||
{
|
||||
var newmove = GetCompatibilityMove(m);
|
||||
if (newmove != null)
|
||||
{
|
||||
newmove.Display(m);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m.MoveTimer.Enabled = false;
|
||||
m.Display(Graph, AnimatType.C_End, m.DisplayToNomal);
|
||||
return;
|
||||
}
|
||||
//不是:继续右边走or停下
|
||||
if (Function.Rnd.Next(walklength++) < Distance)
|
||||
{
|
||||
m.Display(Graph, AnimatType.B_Loop, () => Displaying(m));
|
||||
}
|
||||
else if (Function.Rnd.Next(Main.TreeRND) <= 1)
|
||||
{//停下来
|
||||
var newmove = GetCompatibilityMove(m);
|
||||
if (newmove != null)
|
||||
{
|
||||
newmove.Display(m);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m.MoveTimer.Enabled = false;
|
||||
m.Display(Graph, AnimatType.C_End, m.DisplayToNomal);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
175
VPet-Simulator.Core/Graph/GraphInfo.cs
Normal file
175
VPet-Simulator.Core/Graph/GraphInfo.cs
Normal file
@ -0,0 +1,175 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 动画信息
|
||||
/// </summary>
|
||||
/// 新版本动画类型是根据整体类型+名字定义而成
|
||||
/// 动画类型->动画名字
|
||||
/// 动画名字->状态+动作->动画
|
||||
/// 类型: 主要动作分类
|
||||
/// 动画名字: 用户自定义, 同名字动画支持相同随机,不再使用StoreRand
|
||||
/// 动作: 动画的动作 Start Loop End
|
||||
/// 状态: 动画的状态 Save.GameSave.ModeType
|
||||
public class GraphInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建动画信息
|
||||
/// </summary>
|
||||
/// <param name="name">动画名字: 用户自定义 同名字动画支持相同随机,不再使用StoreRand</param>
|
||||
/// <param name="animat">动作: 动画的动作 Start Loop End</param>
|
||||
/// <param name="type">类型: 主要动作分类</param>
|
||||
/// <param name="modeType">状态: 4种状态</param>
|
||||
public GraphInfo(string name, GraphType type = GraphType.Common, AnimatType animat = AnimatType.Single, GameSave.ModeType modeType = GameSave.ModeType.Nomal)
|
||||
{
|
||||
Name = name;
|
||||
Animat = animat;
|
||||
Type = type;
|
||||
ModeType = modeType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: 主要动作分类
|
||||
/// </summary>
|
||||
/// * 为必须有的动画
|
||||
public enum GraphType
|
||||
{
|
||||
/// <summary>
|
||||
/// 通用动画,用于被被其他动画调用或者mod等用途
|
||||
/// </summary>
|
||||
/// 不被默认启用/使用的 不包含在GrapType
|
||||
Common,
|
||||
/// <summary>
|
||||
/// 被提起动态 *
|
||||
/// </summary>
|
||||
Raised_Dynamic,
|
||||
/// <summary>
|
||||
/// 被提起静态 (开始&循环&结束) *
|
||||
/// </summary>
|
||||
Raised_Static,
|
||||
/// <summary>
|
||||
/// 现在所有会动的东西都是MOVE
|
||||
/// </summary>
|
||||
Move,
|
||||
/// <summary>
|
||||
/// 呼吸 *
|
||||
/// </summary>
|
||||
Default,
|
||||
/// <summary>
|
||||
/// 摸头 (开始&循环&结束)
|
||||
/// </summary>
|
||||
Touch_Head,
|
||||
/// <summary>
|
||||
/// 摸身体 (开始&循环&结束)
|
||||
/// </summary>
|
||||
Touch_Body,
|
||||
/// <summary>
|
||||
/// 空闲 (包括下蹲/无聊等通用空闲随机动画) (开始&循环&结束)
|
||||
/// </summary>
|
||||
Idel,
|
||||
/// <summary>
|
||||
/// 睡觉 (开始&循环&结束) *
|
||||
/// </summary>
|
||||
Sleep,
|
||||
/// <summary>
|
||||
/// 说话 (开始&循环&结束) *
|
||||
/// </summary>
|
||||
Say,
|
||||
/// <summary>
|
||||
/// 待机 模式1 (开始&循环&结束)
|
||||
/// </summary>
|
||||
State_ONE,
|
||||
/// <summary>
|
||||
/// 待机 模式2 (开始&循环&结束)
|
||||
/// </summary>
|
||||
State_TWO,
|
||||
/// <summary>
|
||||
/// 开机 *
|
||||
/// </summary>
|
||||
StartUP,
|
||||
/// <summary>
|
||||
/// 关机
|
||||
/// </summary>
|
||||
Shutdown,
|
||||
/// <summary>
|
||||
/// 学习 (开始&循环&结束) *
|
||||
/// </summary>
|
||||
Study,
|
||||
/// <summary>
|
||||
/// 工作 (开始&循环&结束) *
|
||||
/// </summary>
|
||||
Work,
|
||||
/// <summary>
|
||||
/// 向上切换状态
|
||||
/// </summary>
|
||||
Switch_Up,
|
||||
/// <summary>
|
||||
/// 向下切换状态
|
||||
/// </summary>
|
||||
Switch_Down,
|
||||
/// <summary>
|
||||
/// 口渴
|
||||
/// </summary>
|
||||
Switch_Thirsty,
|
||||
/// <summary>
|
||||
/// 饥饿
|
||||
/// </summary>
|
||||
Switch_Hunger,
|
||||
/// <summary>
|
||||
/// 吃东西
|
||||
/// </summary>
|
||||
Eat,
|
||||
/// <summary>
|
||||
/// 喝东西
|
||||
/// </summary>
|
||||
Drink,
|
||||
}
|
||||
/// <summary>
|
||||
/// 动作: 动画的动作 Start Loop End
|
||||
/// </summary>
|
||||
public enum AnimatType
|
||||
{
|
||||
/// <summary>
|
||||
/// 动画只有一个动作
|
||||
/// </summary>
|
||||
Single,
|
||||
/// <summary>
|
||||
/// 开始动作
|
||||
/// </summary>
|
||||
A_Start,
|
||||
/// <summary>
|
||||
/// 循环动作
|
||||
/// </summary>
|
||||
B_Loop,
|
||||
/// <summary>
|
||||
/// 结束动作
|
||||
/// </summary>
|
||||
C_End,
|
||||
}
|
||||
/// <summary>
|
||||
/// 动画名字: 用户自定义 同名字动画支持相同随机,不再使用StoreRand
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 动作: 动画的动作 Start Loop End
|
||||
/// </summary>
|
||||
public AnimatType Animat { get; set; }
|
||||
/// <summary>
|
||||
/// 类型: 主要动作分类
|
||||
/// </summary>
|
||||
public GraphType Type { get; set; }
|
||||
/// <summary>
|
||||
/// 状态: 4种状态
|
||||
/// </summary>
|
||||
public GameSave.ModeType ModeType { get; set; }
|
||||
///// <summary>
|
||||
///// 其他附带的储存信息
|
||||
///// </summary>
|
||||
//public ILine Info { get; set; }
|
||||
}
|
||||
}
|
@ -1,8 +1,15 @@
|
||||
using System;
|
||||
using LinePutScript;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
|
||||
using static VPet_Simulator.Core.IGraph;
|
||||
using static VPet_Simulator.Core.Picture;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
/// <summary>
|
||||
@ -30,22 +37,10 @@ namespace VPet_Simulator.Core
|
||||
/// 是否准备完成
|
||||
/// </summary>
|
||||
bool IsReady { get; }
|
||||
///// <summary>
|
||||
///// 从0开始运行该动画, 等待部署完成后执行
|
||||
///// </summary>
|
||||
//void WaitForReadyRun(Border parant, Action EndAction = null);
|
||||
///// <summary>//经过测试,储存到内存好处多多,不储存也要占用很多内存,干脆存了吧
|
||||
///// 是否储存到内存以支持快速显示
|
||||
///// </summary>
|
||||
//bool StoreMemory { get; }
|
||||
/// <summary>
|
||||
/// 该动画模式
|
||||
/// 该动画信息
|
||||
/// </summary>
|
||||
GameSave.ModeType ModeType { get; }
|
||||
/// <summary>
|
||||
/// 该动画类型
|
||||
/// </summary>
|
||||
GraphType GraphType { get; }
|
||||
GraphInfo GraphInfo { get; }
|
||||
/// <summary>
|
||||
/// 停止动画
|
||||
/// </summary>
|
||||
|
@ -40,9 +40,11 @@ namespace VPet_Simulator.Core
|
||||
/// </summary>
|
||||
public bool IsContinue { get; set; } = false;
|
||||
|
||||
public GameSave.ModeType ModeType { get; private set; }
|
||||
/// <summary>
|
||||
/// 动画信息
|
||||
/// </summary>
|
||||
public GraphInfo GraphInfo { get; private set; }
|
||||
|
||||
public GraphCore.GraphType GraphType { get; private set; }
|
||||
/// <summary>
|
||||
/// 是否准备完成
|
||||
/// </summary>
|
||||
@ -63,13 +65,12 @@ namespace VPet_Simulator.Core
|
||||
/// <param name="path">文件夹位置</param>
|
||||
/// <param name="paths">文件内容列表</param>
|
||||
/// <param name="isLoop">是否循环</param>
|
||||
public PNGAnimation(GraphCore graphCore, string path, FileInfo[] paths, GameSave.ModeType modetype, GraphCore.GraphType graphtype, bool isLoop = false)
|
||||
public PNGAnimation(GraphCore graphCore, string path, FileInfo[] paths, GraphInfo graphinfo, bool isLoop = false)
|
||||
{
|
||||
Animations = new List<Animation>();
|
||||
IsLoop = isLoop;
|
||||
//StoreMemory = storemem;
|
||||
GraphType = graphtype;
|
||||
ModeType = modetype;
|
||||
GraphInfo = graphinfo;
|
||||
GraphCore = graphCore;
|
||||
if (!GraphCore.CommConfig.ContainsKey("PA_Setup"))
|
||||
{
|
||||
@ -146,59 +147,16 @@ namespace VPet_Simulator.Core
|
||||
|
||||
public static void LoadGraph(GraphCore graph, FileSystemInfo path, ILine info)
|
||||
{
|
||||
if(!(path is DirectoryInfo p))
|
||||
if (!(path is DirectoryInfo p))
|
||||
{
|
||||
Picture.LoadGraph(graph, path, info);
|
||||
return;
|
||||
}
|
||||
var paths = p.GetFiles();
|
||||
GameSave.ModeType modetype;
|
||||
var path_name = path.FullName.Trim('_').ToLower();
|
||||
if (!Enum.TryParse(info[(gstr)"mode"], true, out modetype))
|
||||
{
|
||||
if (path_name.Contains("happy"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Happy;
|
||||
}
|
||||
else if (path_name.Contains("nomal"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
else if (path_name.Contains("poorcondition"))
|
||||
{
|
||||
modetype = GameSave.ModeType.PoorCondition;
|
||||
}
|
||||
else if (path_name.Contains("ill"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Ill;
|
||||
}
|
||||
else
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
}
|
||||
GraphType graphtype = GraphType.Not_Able;
|
||||
if (!Enum.TryParse(info[(gstr)"graph"], true, out graphtype))
|
||||
{
|
||||
for (int i = 0; i < GraphTypeValue.Length; i++)
|
||||
{
|
||||
if (path_name.StartsWith(GraphTypeValue[i]))
|
||||
{
|
||||
graphtype = (GraphType)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isLoop = info[(gbol)"loop"];
|
||||
PNGAnimation pa = new PNGAnimation(graph, path.FullName, paths, modetype, graphtype, isLoop);
|
||||
if(graphtype == GraphType.Not_Able)
|
||||
{
|
||||
graph.AddCOMMGraph(pa, info.info);
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.AddGraph(pa, graphtype);
|
||||
}
|
||||
PNGAnimation pa = new PNGAnimation(graph, path.FullName, paths, GraphHelper.GetGraphInfo(path, info), isLoop);
|
||||
graph.AddGraph(pa);
|
||||
}
|
||||
|
||||
public double Width;
|
||||
|
@ -9,25 +9,25 @@ using LinePutScript;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
using static VPet_Simulator.Core.Picture;
|
||||
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Picture.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class Picture : IImageRun
|
||||
public class Picture : IImageRun
|
||||
{
|
||||
/// <summary>
|
||||
/// 新建新静态图像
|
||||
/// </summary>
|
||||
/// <param name="path">图片路径</param>
|
||||
public Picture(GraphCore graphCore, string path, GameSave.ModeType modetype, GraphCore.GraphType graphType, int length = 1000, bool isloop = false)
|
||||
public Picture(GraphCore graphCore, string path, GraphInfo graphinfo, int length = 1000, bool isloop = false)
|
||||
{
|
||||
ModeType = modetype;
|
||||
GraphInfo = graphinfo;
|
||||
IsLoop = isloop;
|
||||
Length = length;
|
||||
GraphCore = graphCore;
|
||||
Path = path;
|
||||
GraphType = graphType;
|
||||
if (!GraphCore.CommConfig.ContainsKey("PIC_Setup"))
|
||||
{
|
||||
GraphCore.CommConfig["PIC_Setup"] = true;
|
||||
@ -43,43 +43,6 @@ namespace VPet_Simulator.Core
|
||||
PNGAnimation.LoadGraph(graph, path, info);
|
||||
return;
|
||||
}
|
||||
GameSave.ModeType modetype;
|
||||
var path_name = path.FullName.Trim('_').ToLower();
|
||||
if (!Enum.TryParse(info[(gstr)"mode"], true, out modetype))
|
||||
{
|
||||
if (path_name.Contains("happy"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Happy;
|
||||
}
|
||||
else if (path_name.Contains("nomal"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
else if (path_name.Contains("poorcondition"))
|
||||
{
|
||||
modetype = GameSave.ModeType.PoorCondition;
|
||||
}
|
||||
else if (path_name.Contains("ill"))
|
||||
{
|
||||
modetype = GameSave.ModeType.Ill;
|
||||
}
|
||||
else
|
||||
{
|
||||
modetype = GameSave.ModeType.Nomal;
|
||||
}
|
||||
}
|
||||
GraphType graphtype = GraphType.Not_Able;
|
||||
if (!Enum.TryParse(info[(gstr)"graph"], true, out graphtype))
|
||||
{
|
||||
for (int i = 0; i < GraphTypeValue.Length; i++)
|
||||
{
|
||||
if (path_name.StartsWith(GraphTypeValue[i]))
|
||||
{
|
||||
graphtype = (GraphType)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int length = info.GetInt("length");
|
||||
if (length == 0)
|
||||
{
|
||||
@ -87,21 +50,13 @@ namespace VPet_Simulator.Core
|
||||
length = 1000;
|
||||
}
|
||||
bool isLoop = info[(gbol)"loop"];
|
||||
Picture pa = new Picture(graph, path.FullName, modetype, graphtype, length, isLoop);
|
||||
if (graphtype == GraphType.Not_Able)
|
||||
{
|
||||
graph.AddCOMMGraph(pa, info.info);
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.AddGraph(pa, graphtype);
|
||||
}
|
||||
Picture pa = new Picture(graph, path.FullName, GraphHelper.GetGraphInfo(path, info), length, isLoop);
|
||||
graph.AddGraph(pa);
|
||||
}
|
||||
/// <summary>
|
||||
/// 图片资源
|
||||
/// </summary>
|
||||
public string Path;
|
||||
public GameSave.ModeType ModeType { get; private set; }
|
||||
private GraphCore GraphCore;
|
||||
public bool PlayState { get; set; }
|
||||
public bool IsLoop { get; set; }
|
||||
@ -109,7 +64,10 @@ namespace VPet_Simulator.Core
|
||||
//public bool StoreMemory => true;//经过测试,储存到内存好处多多,不储存也要占用很多内存,干脆存了吧
|
||||
public bool IsContinue { get; set; }
|
||||
|
||||
public GraphCore.GraphType GraphType { get; set; }
|
||||
/// <summary>
|
||||
/// 动画信息
|
||||
/// </summary>
|
||||
public GraphInfo GraphInfo { get; private set; }
|
||||
|
||||
public bool IsReady => true;
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace VPet_Simulator.Core
|
||||
/// <summary>
|
||||
/// 金钱
|
||||
/// </summary>
|
||||
[Line(Type = LPSConvert.ConvertType.ToFloat, Name = "money")]
|
||||
[Line(Type = LPSConvert.ConvertType.ToFloat, Name = "money")]
|
||||
public double Money { get; set; }
|
||||
/// <summary>
|
||||
/// 经验值
|
||||
@ -125,7 +125,22 @@ namespace VPet_Simulator.Core
|
||||
/// <summary>
|
||||
/// 心情
|
||||
/// </summary>
|
||||
public double Feeling { get => feeling; set => feeling = Math.Min(100, Math.Max(0, value)); }
|
||||
public double Feeling
|
||||
{
|
||||
get => feeling; set
|
||||
{
|
||||
|
||||
value = Math.Min(100, value);
|
||||
if (value <= 0)
|
||||
{
|
||||
Health += value / 2;
|
||||
Likability += value / 2;
|
||||
feeling = 0;
|
||||
}
|
||||
else
|
||||
feeling = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Line(Type = LPSConvert.ConvertType.ToFloat)]
|
||||
private double feeling { get; set; }
|
||||
|
@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 食物接口
|
||||
/// </summary>
|
||||
public interface IFood
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -4,8 +4,10 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using static VPet_Simulator.Core.GameSave;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
|
||||
|
||||
namespace VPet_Simulator.Core
|
||||
{
|
||||
/// <summary>
|
||||
@ -20,7 +22,7 @@ namespace VPet_Simulator.Core
|
||||
{
|
||||
var g = new GraphCore();
|
||||
foreach (var p in path)
|
||||
LoadGraph(g, new DirectoryInfo(p), "");
|
||||
LoadGraph(g, new DirectoryInfo(p));
|
||||
g.GraphConfig = Config;
|
||||
return g;
|
||||
}
|
||||
@ -54,7 +56,7 @@ namespace VPet_Simulator.Core
|
||||
{ "picture", Picture.LoadGraph },
|
||||
{ "foodanimation", FoodAnimation.LoadGraph },
|
||||
};
|
||||
public static void LoadGraph(GraphCore graph, DirectoryInfo di, string path_name)
|
||||
public static void LoadGraph(GraphCore graph, DirectoryInfo di)
|
||||
{
|
||||
var list = di.EnumerateDirectories();
|
||||
if (File.Exists(di.FullName + @"\info.lps"))
|
||||
@ -88,49 +90,19 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
}
|
||||
else if (list.Count() == 0)
|
||||
{
|
||||
//自动加载 PNG ANMIN
|
||||
path_name = path_name.Trim('_').ToLower();
|
||||
for (int i = 0; i < GraphTypeValue.Length; i++)
|
||||
{
|
||||
if (path_name.StartsWith(GraphTypeValue[i]))
|
||||
{
|
||||
bool isused = false;
|
||||
if (path_name.Contains("happy"))
|
||||
{
|
||||
graph.AddGraph(di.FullName, GameSave.ModeType.Happy, (GraphType)i);
|
||||
isused = true;
|
||||
}
|
||||
if (path_name.Contains("nomal"))
|
||||
{
|
||||
graph.AddGraph(di.FullName, GameSave.ModeType.Nomal, (GraphType)i);
|
||||
isused = true;
|
||||
}
|
||||
if (path_name.Contains("poorcondition"))
|
||||
{
|
||||
graph.AddGraph(di.FullName, GameSave.ModeType.PoorCondition, (GraphType)i);
|
||||
isused = true;
|
||||
}
|
||||
if (path_name.Contains("ill"))
|
||||
{
|
||||
graph.AddGraph(di.FullName, GameSave.ModeType.Ill, (GraphType)i);
|
||||
isused = true;
|
||||
}
|
||||
if (!isused)
|
||||
{
|
||||
graph.AddGraph(di.FullName, GameSave.ModeType.Nomal, (GraphType)i);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
#if DEBUG
|
||||
MessageBox.Show(LocalizeCore.Translate("未知的图像类型: ") + path_name);
|
||||
#endif
|
||||
{//开始自动生成
|
||||
var paths = di.GetFiles();
|
||||
if (paths.Length == 0)
|
||||
return;
|
||||
if (paths.Length == 1)
|
||||
Picture.LoadGraph(graph, paths[0], new Line("picture"));
|
||||
else
|
||||
PNGAnimation.LoadGraph(graph, di, new Line("pnganimation"));
|
||||
}
|
||||
else
|
||||
foreach (var p in list)
|
||||
{
|
||||
LoadGraph(graph, p, path_name + "_" + p.Name);
|
||||
LoadGraph(graph, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
15
VPet-Simulator.Core/Properties/Resources.Designer.cs
generated
15
VPet-Simulator.Core/Properties/Resources.Designer.cs
generated
@ -1,24 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VPet_Simulator.Core.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
@ -32,12 +33,12 @@ namespace VPet_Simulator.Core.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if ((resourceMan == null)) {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VPet_Simulator.Core.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
|
22
VPet-Simulator.Core/Properties/Settings.Designer.cs
generated
22
VPet-Simulator.Core/Properties/Settings.Designer.cs
generated
@ -1,28 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VPet_Simulator.Core.Properties
|
||||
{
|
||||
namespace VPet_Simulator.Core.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Deterministic>true</Deterministic>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -79,8 +80,8 @@
|
||||
<Reference Include="Panuon.WPF, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Panuon.WPF.UI, Version=1.1.13.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.UI.1.1.14\lib\net462\Panuon.WPF.UI.dll</HintPath>
|
||||
<Reference Include="Panuon.WPF.UI, Version=1.1.15.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.UI.1.1.15\lib\net462\Panuon.WPF.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@ -127,10 +128,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Graph\EyeTracking.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Display\WorkTimer.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@ -147,9 +144,8 @@
|
||||
</Compile>
|
||||
<Compile Include="Graph\FoodAnimation.cs" />
|
||||
<Compile Include="Graph\GraphCore.cs" />
|
||||
<Compile Include="Graph\EyeTracking.xaml.cs">
|
||||
<DependentUpon>EyeTracking.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Graph\GraphHelper.cs" />
|
||||
<Compile Include="Graph\GraphInfo.cs" />
|
||||
<Compile Include="Graph\IGraph.cs" />
|
||||
<Compile Include="Graph\Picture.cs" />
|
||||
<Compile Include="Graph\PNGAnimation.cs" />
|
||||
|
@ -3,5 +3,5 @@
|
||||
<package id="LinePutScript" version="1.8.3" targetFramework="net462" />
|
||||
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net462" />
|
||||
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
|
||||
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net462" />
|
||||
<package id="Panuon.WPF.UI" version="1.1.15" targetFramework="net462" />
|
||||
</packages>
|
@ -59,7 +59,7 @@ namespace VPet_Simulator.Windows.Interface
|
||||
/// 需要饮料时会说的话
|
||||
/// </summary>
|
||||
List<LowText> LowDrinkText { get; }
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 图片资源
|
||||
/// </summary>
|
||||
ImageResources ImageSources { get; }
|
||||
@ -77,14 +77,27 @@ namespace VPet_Simulator.Windows.Interface
|
||||
/// </summary>
|
||||
void LoadDIY();
|
||||
/// <summary>
|
||||
/// 运行动作
|
||||
/// 显示设置页面
|
||||
/// </summary>
|
||||
/// <param name="action">动作名称</param>
|
||||
void RunAction(string action);
|
||||
///// <summary>
|
||||
///// 语言字典
|
||||
///// </summary>
|
||||
//Dictionary<string, LPS_D> GetLanguage();
|
||||
/// <param name="page">设置页</param>
|
||||
void ShowSetting(int page = -1);
|
||||
/// <summary>
|
||||
/// 显示更好买页面
|
||||
/// </summary>
|
||||
/// <param name="type">食物类型</param>
|
||||
void ShowBetterBuy(Food.FoodType type);
|
||||
/// <summary>
|
||||
/// 关闭桌宠
|
||||
/// </summary>
|
||||
void Close();
|
||||
/// <summary>
|
||||
/// 重启桌宠
|
||||
/// </summary>
|
||||
void Restart();
|
||||
/// <summary>
|
||||
/// 鼠标穿透
|
||||
/// </summary>
|
||||
bool MouseHitThrough { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -48,6 +48,10 @@ namespace VPet_Simulator.Windows.Interface
|
||||
/// 药品
|
||||
/// </summary>
|
||||
Drug,
|
||||
/// <summary>
|
||||
/// 礼品 (没做)
|
||||
/// </summary>
|
||||
Gift,
|
||||
}
|
||||
/// <summary>
|
||||
/// 食物类型
|
||||
|
@ -12,6 +12,7 @@
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -97,8 +98,8 @@
|
||||
<Reference Include="Panuon.WPF, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Panuon.WPF.UI, Version=1.1.13.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.UI.1.1.14\lib\net462\Panuon.WPF.UI.dll</HintPath>
|
||||
<Reference Include="Panuon.WPF.UI, Version=1.1.15.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.UI.1.1.15\lib\net462\Panuon.WPF.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
@ -122,9 +123,6 @@
|
||||
<Compile Include="Setting.cs" />
|
||||
<Compile Include="Source.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\VPet-Simulator.Core\VPet-Simulator.Core.csproj">
|
||||
<Project>{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}</Project>
|
||||
@ -137,5 +135,8 @@
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -3,5 +3,5 @@
|
||||
<package id="LinePutScript" version="1.8.3" targetFramework="net462" />
|
||||
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net462" />
|
||||
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
|
||||
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net462" />
|
||||
<package id="Panuon.WPF.UI" version="1.1.15" targetFramework="net462" />
|
||||
</packages>
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="SendKeys" value="SendInput"/>
|
||||
</appSettings>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using VPet_Simulator.Core;
|
||||
using VPet_Simulator.Windows.Interface;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
using ToolBar = VPet_Simulator.Core.ToolBar;
|
||||
|
||||
namespace VPet_Simulator.Windows
|
||||
@ -35,7 +36,7 @@ namespace VPet_Simulator.Windows
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
public int verison { get; } = 30;
|
||||
public int verison { get; } = 50;
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
@ -150,98 +151,15 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
}
|
||||
|
||||
public void RunAction(string action)
|
||||
public void ShowSetting(int page = -1)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case "DisplayNomal":
|
||||
Main.DisplayNomal();
|
||||
break;
|
||||
case "DisplayTouchHead":
|
||||
Main.DisplayTouchHead();
|
||||
break;
|
||||
case "DisplayTouchBody":
|
||||
Main.DisplayTouchBody();
|
||||
break;
|
||||
case "DisplayBoring":
|
||||
Main.DisplayBoring();
|
||||
break;
|
||||
case "DisplaySquat":
|
||||
Main.DisplaySquat();
|
||||
break;
|
||||
case "DisplaySleep":
|
||||
Main.DisplaySleep();
|
||||
break;
|
||||
case "DisplayRaised":
|
||||
Main.DisplayRaised();
|
||||
break;
|
||||
case "DisplayFalled_Left":
|
||||
Main.DisplayFalled_Left();
|
||||
break;
|
||||
case "DisplayFalled_Right":
|
||||
Main.DisplayFalled_Right();
|
||||
break;
|
||||
case "DisplayWalk":
|
||||
if (Function.Rnd.Next(2) == 0)
|
||||
Main.DisplayWalk_Left();
|
||||
else
|
||||
Main.DisplayWalk_Right();
|
||||
break;
|
||||
case "DisplayWalk_Left":
|
||||
Main.DisplayWalk_Left();
|
||||
break;
|
||||
case "DisplayWalk_Right":
|
||||
Main.DisplayWalk_Right();
|
||||
break;
|
||||
case "DisplayCrawl":
|
||||
if (Function.Rnd.Next(2) == 0)
|
||||
Main.DisplayCrawl_Left();
|
||||
else
|
||||
Main.DisplayCrawl_Right();
|
||||
break;
|
||||
case "DisplayCrawl_Left":
|
||||
Main.DisplayCrawl_Left();
|
||||
break;
|
||||
case "DisplayCrawl_Right":
|
||||
Main.DisplayCrawl_Right();
|
||||
break;
|
||||
case "DisplayClimb_Left_UP":
|
||||
Main.DisplayClimb_Left_UP();
|
||||
break;
|
||||
case "DisplayClimb_Left_DOWN":
|
||||
Main.DisplayClimb_Left_DOWN();
|
||||
break;
|
||||
case "DisplayClimb_Right_UP":
|
||||
Main.DisplayClimb_Right_UP();
|
||||
break;
|
||||
case "DisplayClimb_Right_DOWN":
|
||||
Main.DisplayClimb_Right_DOWN();
|
||||
break;
|
||||
case "DisplayClimb_Top_Right":
|
||||
Main.DisplayClimb_Top_Right();
|
||||
break;
|
||||
case "DisplayClimb_Top_Left":
|
||||
Main.DisplayClimb_Top_Left();
|
||||
break;
|
||||
case "DisplayFall":
|
||||
if (Function.Rnd.Next(2) == 0)
|
||||
Main.DisplayFall_Left();
|
||||
else
|
||||
Main.DisplayFall_Right();
|
||||
break;
|
||||
case "DisplayFall_Left":
|
||||
Main.DisplayFall_Left();
|
||||
break;
|
||||
case "DisplayFall_Right":
|
||||
Main.DisplayFall_Right();
|
||||
break;
|
||||
case "DisplayIdel_StateONE":
|
||||
Main.DisplayIdel_StateONE();
|
||||
break;
|
||||
case "DisplayIdel_StateTWO":
|
||||
Main.DisplayIdel_StateTWO();
|
||||
break;
|
||||
}
|
||||
if (page >= 0 && page <= 6)
|
||||
winSetting.MainTab.SelectedIndex = page;
|
||||
winSetting.Show();
|
||||
}
|
||||
public void ShowBetterBuy(Food.FoodType type)
|
||||
{
|
||||
winBetterBuy.Show(type);
|
||||
}
|
||||
int lowstrengthAskCountFood = 20;
|
||||
int lowstrengthAskCountDrink = 20;
|
||||
@ -257,19 +175,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthFood > 60)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthFood > 40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Hunger, Main.DisplayToNomal));
|
||||
Task.Run(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
||||
return;
|
||||
}
|
||||
if (Core.Save.StrengthDrink < 75 && Function.Rnd.Next(lowstrengthAskCountDrink--) == 0)
|
||||
@ -280,19 +198,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthDrink > 60)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthDrink > 40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Thirsty, Main.DisplayToNomal));
|
||||
Task.Run(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -306,19 +224,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthFood > 40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthFood > 20)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Hunger, Main.DisplayToNomal));
|
||||
Task.Run(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
||||
return;
|
||||
}
|
||||
if (Core.Save.StrengthDrink < 60 && Function.Rnd.Next(lowstrengthAskCountDrink--) == 0)
|
||||
@ -329,19 +247,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthDrink > 40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthDrink > 20)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Thirsty, Main.DisplayToNomal));
|
||||
Task.Run(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ using System.Windows.Interop;
|
||||
using static VPet_Simulator.Windows.PerformanceDesktopTransparentWindow;
|
||||
using System.Windows.Shapes;
|
||||
using Line = LinePutScript.Line;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
|
||||
namespace VPet_Simulator.Windows
|
||||
{
|
||||
@ -130,7 +131,7 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
else
|
||||
{
|
||||
Main.DisplayClose(() => Dispatcher.Invoke(base.Close));
|
||||
Main.Display(GraphType.Shutdown, AnimatType.Single, () => Dispatcher.Invoke(base.Close));
|
||||
}
|
||||
}
|
||||
public void Restart()
|
||||
@ -157,7 +158,7 @@ namespace VPet_Simulator.Windows
|
||||
System.Environment.Exit(0);
|
||||
}
|
||||
|
||||
private List<Tuple<string, Helper.SayType>> rndtext;
|
||||
private List<string> rndtext;
|
||||
public long lastclicktime { get; set; }
|
||||
|
||||
public void LoadLatestSave()
|
||||
@ -249,27 +250,27 @@ namespace VPet_Simulator.Windows
|
||||
AutoSaveTimer.Start();
|
||||
}
|
||||
|
||||
rndtext = new List<Tuple<string, Helper.SayType>>
|
||||
rndtext = new List<string>
|
||||
{
|
||||
new Tuple<string, Helper.SayType>("你知道吗? 鼠标右键可以打开菜单栏".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("如果你觉得目前功能太少,那就多挂会机. 宠物会自己动的".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("你知道吗? 你可以在设置里面修改游戏的缩放比例".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("想要宠物不乱动? 设置里可以设置智能移动或者关闭移动".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("有建议/游玩反馈? 来 菜单-系统-反馈中心 反馈吧".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("你现在乱点说话是说话系统的一部分,不过还没做,在做了在做了ing".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("你添加了虚拟主播模拟器和虚拟桌宠模拟器到愿望单了吗? 快去加吧".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("这游戏开发这么慢,都怪画师太咕了".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("长按脑袋拖动桌宠到你喜欢的任意位置".Translate(), Helper.SayType.Serious),
|
||||
new Tuple<string, Helper.SayType>("欢迎加入 虚拟主播模拟器群 430081239".Translate(), Helper.SayType.Shining),
|
||||
"你知道吗? 鼠标右键可以打开菜单栏".Translate(),
|
||||
"如果你觉得目前功能太少,那就多挂会机. 宠物会自己动的".Translate(),
|
||||
"你知道吗? 你可以在设置里面修改游戏的缩放比例".Translate(),
|
||||
"想要宠物不乱动? 设置里可以设置智能移动或者关闭移动".Translate(),
|
||||
"有建议/游玩反馈? 来 菜单-系统-反馈中心 反馈吧".Translate(),
|
||||
"你现在乱点说话是说话系统的一部分,不过还没做,在做了在做了ing".Translate(),
|
||||
"你添加了虚拟主播模拟器和虚拟桌宠模拟器到愿望单了吗? 快去加吧".Translate(),
|
||||
"这游戏开发这么慢,都怪画师太咕了".Translate(),
|
||||
"长按脑袋拖动桌宠到你喜欢的任意位置".Translate(),
|
||||
"欢迎加入 虚拟主播模拟器群 430081239".Translate()
|
||||
};
|
||||
//给正在玩这个游戏的主播/游戏up主做个小功能
|
||||
if (IsSteamUser)
|
||||
{
|
||||
rndtext.Add(new Tuple<string, Helper.SayType>("关注 {0} 谢谢喵".Translate(SteamClient.Name), Helper.SayType.Shining));
|
||||
rndtext.Add("关注 {0} 谢谢喵".Translate(SteamClient.Name));
|
||||
}
|
||||
else
|
||||
{
|
||||
rndtext.Add(new Tuple<string, Helper.SayType>("关注 {0} 谢谢喵".Translate(Environment.UserName), Helper.SayType.Shining));
|
||||
rndtext.Add("关注 {0} 谢谢喵".Translate(Environment.UserName));
|
||||
}
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
@ -325,8 +326,7 @@ namespace VPet_Simulator.Windows
|
||||
if (new TimeSpan(DateTime.Now.Ticks - lastclicktime).TotalSeconds > 20)
|
||||
{
|
||||
lastclicktime = DateTime.Now.Ticks;
|
||||
var v = rndtext[Function.Rnd.Next(rndtext.Count)];
|
||||
Main.Say(v.Item1, v.Item2);
|
||||
Main.Say(rndtext[Function.Rnd.Next(rndtext.Count)]);
|
||||
}
|
||||
};
|
||||
Main.PlayVoiceVolume = Set.VoiceVolume;
|
||||
@ -435,7 +435,7 @@ namespace VPet_Simulator.Windows
|
||||
notifyIcon.ShowBalloonTip(10, "你好".Translate() + (IsSteamUser ? Steamworks.SteamClient.Name : Environment.UserName),
|
||||
"欢迎使用虚拟桌宠模拟器!\n如果遇到桌宠爬不见了,可以在我这里设置居中或退出桌宠".Translate(), ToolTipIcon.Info);
|
||||
Thread.Sleep(2000);
|
||||
Main.Say("欢迎使用虚拟桌宠模拟器\n这是个中期的测试版,若有bug请多多包涵\n欢迎加群虚拟主播模拟器430081239或在菜单栏-管理-反馈中提交bug或建议".Translate(), GraphCore.Helper.SayType.Shining);
|
||||
Main.Say("欢迎使用虚拟桌宠模拟器\n这是个中期的测试版,若有bug请多多包涵\n欢迎加群虚拟主播模拟器430081239或在菜单栏-管理-反馈中提交bug或建议".Translate());
|
||||
});
|
||||
}
|
||||
else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 6, 26) && LocalizeCore.CurrentCulture.StartsWith("cn"))
|
||||
@ -522,6 +522,15 @@ namespace VPet_Simulator.Windows
|
||||
private readonly bool _dwmEnabled;
|
||||
private readonly IntPtr _hwnd;
|
||||
public bool HitThrough { get; private set; } = false;
|
||||
public bool MouseHitThrough
|
||||
{
|
||||
get => HitThrough;
|
||||
set
|
||||
{
|
||||
if (value != HitThrough)
|
||||
SetTransparentHitThrough();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置点击穿透到后面透明的窗口
|
||||
/// </summary>
|
||||
|
@ -1,69 +1,61 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VPet_Simulator.Windows.Properties
|
||||
{
|
||||
|
||||
|
||||
namespace VPet_Simulator.Windows.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VPet_Simulator.Windows.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VPet_Simulator.Windows.Properties
|
||||
{
|
||||
|
||||
|
||||
namespace VPet_Simulator.Windows.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
@ -8,13 +8,14 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>VPet_Simulator.Windows</RootNamespace>
|
||||
<AssemblyName>VPet-Simulator.Windows</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -78,8 +79,11 @@
|
||||
<Reference Include="ChatGPT.API.Framework, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ChatGPT.API.Framework.1.0.4\lib\net462\ChatGPT.API.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Facepunch.Steamworks.Win64, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Facepunch.Steamworks.2.3.3\lib\net46\Facepunch.Steamworks.Win64.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LinePutScript, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\LinePutScript.1.8.3\lib\net48\LinePutScript.dll</HintPath>
|
||||
<HintPath>..\packages\LinePutScript.1.8.3\lib\net462\LinePutScript.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LinePutScript.Localization.WPF, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\LinePutScript.Localization.WPF.1.0.6\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
|
||||
@ -88,10 +92,10 @@
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Panuon.WPF, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net48\Panuon.WPF.dll</HintPath>
|
||||
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Panuon.WPF.UI, Version=1.1.13.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.UI.1.1.14\lib\net48\Panuon.WPF.UI.dll</HintPath>
|
||||
<Reference Include="Panuon.WPF.UI, Version=1.1.15.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Panuon.WPF.UI.1.1.15\lib\net462\Panuon.WPF.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@ -209,11 +213,7 @@
|
||||
<ItemGroup Condition="'$(Platform)' == 'x86'">
|
||||
<Reference Include="Facepunch.Steamworks.Win32, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Facepunch.Steamworks.win32.2.3.3\lib\net46\Facepunch.Steamworks.Win32.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(Platform)' == 'x64'">
|
||||
<Reference Include="Facepunch.Steamworks.Win64, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Facepunch.Steamworks.2.3.3\lib\net46\Facepunch.Steamworks.Win64.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -258,6 +258,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="steam_api64.dll" />
|
||||
<Resource Include="vpeticon.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
@ -267,9 +268,6 @@
|
||||
<Content Include="steam_api.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="steam_api64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="IWshRuntimeLibrary">
|
||||
|
@ -106,7 +106,7 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
m.Say(exp.ToString(), GraphCore.Helper.SayType.Serious);
|
||||
m.Say(exp.ToString());//, GraphCore.Helper.SayType.Serious);
|
||||
rettype = false;
|
||||
}
|
||||
Dispatcher.Invoke(() => this.IsEnabled = true);
|
||||
|
@ -44,7 +44,7 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
if (mw.CGPTClient == null)
|
||||
{
|
||||
m.Say("请先前往设置中设置 ChatGPT API".Translate(), GraphCore.Helper.SayType.Serious);
|
||||
m.Say("请先前往设置中设置 ChatGPT API".Translate());
|
||||
return;
|
||||
}
|
||||
Dispatcher.Invoke(() => this.IsEnabled = false);
|
||||
@ -60,7 +60,7 @@ namespace VPet_Simulator.Windows
|
||||
{
|
||||
str = "请检查API token设置".Translate();
|
||||
}
|
||||
m.Say("API调用失败".Translate() + $",{str}\n{e}", GraphCore.Helper.SayType.Serious);
|
||||
m.Say("API调用失败".Translate() + $",{str}\n{e}");//, GraphCore.Helper.SayType.Serious);
|
||||
}
|
||||
Dispatcher.Invoke(() => this.IsEnabled = true);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ using System.Windows.Shapes;
|
||||
using VPet_Simulator.Core;
|
||||
using VPet_Simulator.Windows.Interface;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
using static VPet_Simulator.Core.IGraph;
|
||||
|
||||
namespace VPet_Simulator.Windows
|
||||
@ -177,17 +178,10 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
if (!_puswitch.IsChecked.Value)
|
||||
TryClose();
|
||||
var ig = mw.Core.Graph.FindGraph(item.Type == Food.FoodType.Drink ? GraphType.Drink : GraphType.Eat, mw.Core.Save.Mode);
|
||||
if (ig is IRunImage iri)
|
||||
{
|
||||
var b = mw.Main.FindDisplayBorder(iri);
|
||||
iri.Run(b, item.ImageSource, mw.Main.DisplayToNomal);
|
||||
}
|
||||
else
|
||||
{
|
||||
mw.Main.Display(ig, mw.Main.DisplayToNomal);
|
||||
}
|
||||
|
||||
var name = mw.Core.Graph.FindName(item.Type == Food.FoodType.Drink ? GraphType.Drink : GraphType.Eat);
|
||||
var ig = mw.Core.Graph.FindGraph(name, AnimatType.Single, mw.Core.Save.Mode);
|
||||
var b = mw.Main.FindDisplayBorder(ig);
|
||||
ig.Run(b, item.ImageSource, mw.Main.DisplayToNomal);
|
||||
}
|
||||
|
||||
private void BtnSearch_Click(object sender, RoutedEventArgs e)
|
||||
|
@ -1,4 +1,5 @@
|
||||
using LinePutScript.Localization.WPF;
|
||||
using LinePutScript;
|
||||
using LinePutScript.Localization.WPF;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -9,6 +10,7 @@ using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using VPet_Simulator.Core;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
using static VPet_Simulator.Core.GraphInfo;
|
||||
|
||||
namespace VPet_Simulator.Windows
|
||||
{
|
||||
@ -22,15 +24,20 @@ namespace VPet_Simulator.Windows
|
||||
{
|
||||
InitializeComponent();
|
||||
this.mw = mw;
|
||||
foreach (string v in Enum.GetNames(typeof(GraphType)))
|
||||
foreach (var v in mw.Core.Graph.GraphsList)
|
||||
{
|
||||
GraphListBox.Items.Add(v);
|
||||
GraphListPlayerBox.Items.Add(v);
|
||||
}
|
||||
foreach (string v in Enum.GetNames(typeof(GraphCore.Helper.SayType)))
|
||||
{
|
||||
CombSay.Items.Add(v);
|
||||
foreach (AnimatType k in v.Value.Keys)
|
||||
{
|
||||
var str = v.Key.ToString() + "++" + k.ToString();
|
||||
GraphListBox.Items.Add(v.Key);
|
||||
GraphListPlayerBox.Items.Add(v);
|
||||
}
|
||||
}
|
||||
if (mw.Core.Graph.GraphsName.TryGetValue(GraphType.Say, out var gl))
|
||||
foreach (string v in gl)
|
||||
{
|
||||
CombSay.Items.Add(v);
|
||||
}
|
||||
DestanceTimer.Elapsed += DestanceTimer_Elapsed;
|
||||
}
|
||||
|
||||
@ -44,7 +51,6 @@ namespace VPet_Simulator.Windows
|
||||
RDown.Text = mw.Core.Controller.GetWindowsDistanceDown().ToString("f2");
|
||||
});
|
||||
}
|
||||
|
||||
public void DisplayLoop(IGraph graph)
|
||||
{
|
||||
mw.Main.Display(graph, () => DisplayLoop(graph));
|
||||
@ -53,8 +59,8 @@ namespace VPet_Simulator.Windows
|
||||
{
|
||||
if (GraphListBox.SelectedItem == null)
|
||||
return;
|
||||
var graph = mw.Main.Core.Graph.FindGraph((GraphType)Enum.Parse(typeof(GraphType), (string)GraphListBox.SelectedItem),
|
||||
(GameSave.ModeType)Enum.Parse(typeof(GameSave.ModeType), (string)(((ComboBoxItem)ComboxMode.SelectedItem).Content)));
|
||||
var kv = Sub.Split((string)GraphListBox.SelectedItem, "++");
|
||||
var graph = mw.Main.Core.Graph.FindGraph(kv[0], (AnimatType)Enum.Parse(typeof(AnimatType), kv[1]), (GameSave.ModeType)ComboxMode.SelectedIndex);
|
||||
if (graph == null)
|
||||
{
|
||||
LabelNowPlay.Content = "未找到对应类型图像资源".Translate();
|
||||
@ -69,18 +75,12 @@ namespace VPet_Simulator.Windows
|
||||
if (DisplayListBox.SelectedItem == null)
|
||||
return;
|
||||
LabelSuccess.Content = "当前正在运行".Translate() + ": " + (string)((ListBoxItem)DisplayListBox.SelectedItem).Content;
|
||||
mw.RunAction((string)((ListBoxItem)DisplayListBox.SelectedItem).Content);
|
||||
// mw.RunAction((string)((ListBoxItem)DisplayListBox.SelectedItem).Content);
|
||||
}
|
||||
|
||||
private void Say_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (Enum.TryParse<Helper.SayType>(CombSay.Text, out var sayType))
|
||||
{
|
||||
mw.Main.Say(SayTextBox.Text, sayType);
|
||||
}
|
||||
else
|
||||
mw.Main.Say("暂无该说话方法".Translate() + CombSay.Text, Helper.SayType.Serious);
|
||||
|
||||
mw.Main.Say(SayTextBox.Text, CombSay.Text, true);
|
||||
}
|
||||
Timer DestanceTimer = new Timer()
|
||||
{
|
||||
@ -98,19 +98,19 @@ namespace VPet_Simulator.Windows
|
||||
{
|
||||
DestanceTimer.Stop();
|
||||
}
|
||||
List<Tuple<GraphType, GameSave.ModeType>> playlist = new List<Tuple<GraphType, GameSave.ModeType>>();
|
||||
List<Tuple<string, GameSave.ModeType>> playlist = new List<Tuple<string, GameSave.ModeType>>();
|
||||
private void GraphListPlayerBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
playlist.Add(new Tuple<GraphType, GameSave.ModeType>((GraphType)Enum.Parse(typeof(GraphType), (string)GraphListPlayerBox.SelectedItem),
|
||||
playlist.Add(new Tuple<string, GameSave.ModeType>((string)GraphListPlayerBox.SelectedItem,
|
||||
(GameSave.ModeType)Enum.Parse(typeof(GameSave.ModeType), (string)(((ComboBoxItem)ComboxPlayMode.SelectedItem).Content))));
|
||||
GraphListWillPlayBox.Items.Add((string)GraphListPlayerBox.SelectedItem + "_" + (string)((ComboBoxItem)ComboxPlayMode.SelectedItem).Content);
|
||||
}
|
||||
|
||||
private void Play_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DisplayList(new Queue<Tuple<GraphType, GameSave.ModeType>>(playlist));
|
||||
DisplayList(new Queue<Tuple<string, GameSave.ModeType>>(playlist));
|
||||
}
|
||||
public void DisplayList(Queue<Tuple<GraphType, GameSave.ModeType>> list)
|
||||
public void DisplayList(Queue<Tuple<string, GameSave.ModeType>> list)
|
||||
{
|
||||
if (list.Count == 0)
|
||||
{
|
||||
@ -118,7 +118,8 @@ namespace VPet_Simulator.Windows
|
||||
return;
|
||||
}
|
||||
var v = list.Dequeue();
|
||||
var graph = mw.Main.Core.Graph.FindGraph(v.Item1, v.Item2);
|
||||
var kv = Sub.Split(v.Item1, "++");
|
||||
var graph = mw.Main.Core.Graph.FindGraph(kv[0], (AnimatType)Enum.Parse(typeof(AnimatType), kv[1]), v.Item2);
|
||||
if (graph != null)
|
||||
{
|
||||
mw.Main.Display(graph, () => DisplayList(list));
|
||||
|
@ -295,13 +295,11 @@ DLL引用名单#DLL Reference List:|
|
||||
提供联系方式以获得反馈,可不填\reg:QQ430081239#Provide contact information for feedback, or not\reg:service@exlb.net:|
|
||||
提交#Submit:|
|
||||
玩家取消上传存档#Player cancels uploading saved:|
|
||||
停止学习#Stop Learning:|
|
||||
当前已学习#Currently Learned:|
|
||||
秒#Sec:|
|
||||
停止#Stop:|
|
||||
当前已#Currently:|
|
||||
您的桌宠等级不足{0}/10\n无法进行工作{1}#Your desktop pet don't have enough level{0}/10\nUnable to work{1}:|
|
||||
工作取消#Work Cancel:|
|
||||
您的桌宠等级不足{0}/{2}\n无法进行{1}#Your pet don't have enough level {0}/{2}\nUnable to {1}:|
|
||||
{0}取消#{0} Cancel:|
|
||||
搜索商品#Search for products:|
|
||||
购买后不自动关闭窗口#don't close after buy:|
|
||||
凉茶#Cold Tea:|
|
||||
|
@ -1,10 +1,7 @@
|
||||
体力-{0:f0} 心情+{1:f0}#Stamina-{0:f0} Mood+{1:f0}:|
|
||||
您的桌宠 {0} 生病啦,没法进行学习#Your desktop pet {0} fall ill, It can't learn:|
|
||||
您的桌宠 {0} 生病啦,没法进行工作{1}#Your desktop pet {0} fall ill, It can't work{1}:|
|
||||
学习完成啦, 累计学会了 {0:f2} 经验值\n共计花费了{1}分钟#Learning is finish, accumulated {0:f2} EXP\nIt took a total of {1} minute:|
|
||||
您的桌宠 {0} 生病啦,没法进行{1}#Your desktop pet {0} fall ill, It can't {1}:|
|
||||
{2}完成啦, 累计赚了 {0:f2} 金钱\n共计花费了{1}分钟#{2}is finish, accumulated realized {0:f2} Money:|
|
||||
小时#Hour:|
|
||||
剩余学习时间#Remaining learning time:|
|
||||
获得经验值#Gain EXP:|
|
||||
剩余{0}时间#Remaining {0} time:|
|
||||
累计金钱收益#Accumulate money gains:|
|
||||
|
@ -295,13 +295,11 @@ DLL引用名单#DLL引用名单:|
|
||||
提供联系方式以获得反馈,可不填\reg:QQ430081239#提供联系方式以获得反馈,可不填\reg:QQ430081239:|
|
||||
提交#提交:|
|
||||
玩家取消上传存档#玩家取消上传存档:|
|
||||
停止学习#停止学习:|
|
||||
当前已学习#当前已学习:|
|
||||
秒#秒:|
|
||||
停止#停止:|
|
||||
当前已#当前已:|
|
||||
您的桌宠等级不足{0}/10\n无法进行工作{1}#您的桌宠等级不足{0}/10\n无法进行工作{1}:|
|
||||
工作取消#工作取消:|
|
||||
您的桌宠等级不足{0}/{2}\n无法进行{1}#您的桌宠等级不足{0}/{2}\n无法进行{1}:|
|
||||
{0}取消#{0}取消:|
|
||||
搜索商品#搜索商品:|
|
||||
购买后不自动关闭窗口#购买后不自动关闭窗口:|
|
||||
凉茶#凉茶:|
|
||||
|
@ -1,10 +1,7 @@
|
||||
体力-{0:f0} 心情+{1:f0}#体力-{0:f0} 心情+{1:f0}:|
|
||||
您的桌宠 {0} 生病啦,没法进行学习#您的桌宠 {0} 生病啦,没法进行学习:|
|
||||
您的桌宠 {0} 生病啦,没法进行工作{1}#您的桌宠 {0} 生病啦,没法进行工作{1}:|
|
||||
学习完成啦, 累计学会了 {0:f2} 经验值\n共计花费了{1}分钟#学习完成啦, 累计学会了 {0:f2} 经验值\n共计花费了{1}分钟:|
|
||||
您的桌宠 {0} 生病啦,没法进行{1}#您的桌宠 {0} 生病啦,没法进行{1}:|
|
||||
{2}完成啦, 累计赚了 {0:f2} 金钱\n共计花费了{1}分钟#{2}完成啦, 累计赚了 {0:f2} 金钱\n共计花费了{1}分钟:|
|
||||
小时#小时:|
|
||||
剩余学习时间#剩余学习时间:|
|
||||
获得经验值#获得经验值:|
|
||||
剩余{0}时间#剩余{0}时间:|
|
||||
累计金钱收益#累计金钱收益:|
|
||||
|
@ -295,13 +295,11 @@ DLL引用名单#DLL引用名單:|
|
||||
提供联系方式以获得反馈,可不填\reg:QQ430081239#提供聯繫方式以獲得迴響,可不填\reg:QQ430081239:|
|
||||
提交#提交:|
|
||||
玩家取消上传存档#玩家取消上傳存檔:|
|
||||
停止学习#停止學習:|
|
||||
当前已学习#當前已學習:|
|
||||
秒#秒:|
|
||||
停止#停止:|
|
||||
当前已#當前已:|
|
||||
您的桌宠等级不足{0}/10\n无法进行工作{1}#您的桌寵等級不足{0}/10\n無法進行工作{1}:|
|
||||
工作取消#工作取消:|
|
||||
您的桌宠等级不足{0}/{2}\n无法进行{1}#您的桌寵等級不足{0}/{2}\n無法進行{1}:|
|
||||
{0}取消#{0}取消:|
|
||||
搜索商品#搜索商品:|
|
||||
购买后不自动关闭窗口#購買後不自動關閉視窗:|
|
||||
凉茶#凉茶:|
|
||||
|
@ -1,10 +1,7 @@
|
||||
体力-{0:f0} 心情+{1:f0}#體力-{0:f0}心情+{1:f0}:|
|
||||
您的桌宠 {0} 生病啦,没法进行学习#您的桌寵{0}生病啦,沒法進行學習:|
|
||||
您的桌宠 {0} 生病啦,没法进行工作{1}#您的桌寵{0}生病啦,沒法進行工作{1}:|
|
||||
学习完成啦, 累计学会了 {0:f2} 经验值\n共计花费了{1}分钟#學習完成啦,累計學會了{0:f2}經驗值\n共計花費了{1}分鐘:|
|
||||
您的桌宠 {0} 生病啦,没法进行{1}#您的桌寵{0}生病啦,沒法進行{1}:|
|
||||
{2}完成啦, 累计赚了 {0:f2} 金钱\n共计花费了{1}分钟#{2}完成啦,累計賺了{0:f2}金錢\n共計花費了{1}分鐘:|
|
||||
小时#小時:|
|
||||
剩余学习时间#剩餘學習時間:|
|
||||
获得经验值#獲得經驗值:|
|
||||
剩余{0}时间#剩餘{0}時間:|
|
||||
累计金钱收益#累計金錢收益:|
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ChatGPT.API.Framework" version="1.0.4" targetFramework="net48" />
|
||||
<package id="Facepunch.Steamworks" version="2.3.3" targetFramework="net48" />
|
||||
<package id="Facepunch.Steamworks.win32" version="2.3.3" targetFramework="net48" />
|
||||
<package id="LinePutScript" version="1.8.3" targetFramework="net48" />
|
||||
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Panuon.WPF" version="1.0.1" targetFramework="net48" />
|
||||
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net48" />
|
||||
<package id="ChatGPT.API.Framework" version="1.0.4" targetFramework="net462" />
|
||||
<package id="Facepunch.Steamworks" version="2.3.3" targetFramework="net462" />
|
||||
<package id="Facepunch.Steamworks.win32" version="2.3.3" targetFramework="net462" />
|
||||
<package id="LinePutScript" version="1.8.3" targetFramework="net462" />
|
||||
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
|
||||
<package id="Panuon.WPF.UI" version="1.1.15" targetFramework="net462" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user