VPet/VPet-Simulator.Core/Display/MainLogic.cs

67 lines
1.9 KiB
C#
Raw Normal View History

2022-12-13 07:10:18 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
2022-12-14 18:17:13 +00:00
using System.Windows;
2022-12-13 07:10:18 +00:00
namespace VPet_Simulator.Core
{
public partial class Main
{
/// <summary>
/// 是否在默认情况(playnoaml)
/// </summary>
public bool IsNomal = true;
2022-12-14 18:17:13 +00:00
2022-12-13 07:10:18 +00:00
public Timer EventTimer = new Timer(15000)
{
AutoReset = true,
Enabled = true
};
2022-12-14 18:17:13 +00:00
2022-12-13 07:10:18 +00:00
private void EventTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
2022-12-14 18:17:13 +00:00
//TODO:饮食等乱七八糟的消耗
2022-12-13 07:10:18 +00:00
if (IsNomal)
switch (1)//Function.Rnd.Next(10))
2022-12-14 18:17:13 +00:00
{
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 10:
DisplayClimb_Top_Right();
break;
default:
break;
}
2022-12-13 07:10:18 +00:00
}
2022-12-14 18:17:13 +00:00
/// <summary>
/// 定点移动位置向量
/// </summary>
private Point MoveTimerPoint = new Point(0, 0);
/// <summary>
/// 定点移动定时器
/// </summary>
private Timer MoveTimer = new Timer(125)
{
AutoReset = true,
};
2022-12-13 07:10:18 +00:00
}
}