31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
|
|
|||
|
using System;
|
|||
|
|
|||
|
namespace Thousandto.Code.Logic
|
|||
|
{
|
|||
|
//单个计时器数据
|
|||
|
public class TimerEventInfo
|
|||
|
{
|
|||
|
//计时器id
|
|||
|
public int ID { get; set; }
|
|||
|
//计时器类型
|
|||
|
public TimerEventType Type { get; set; }
|
|||
|
//是否循环
|
|||
|
public bool Loop { get; set; }
|
|||
|
//计时器的时间
|
|||
|
public float TimeValue { get; set; }
|
|||
|
//有效期,如果计时器超过规定时间才增加的,也可以回调
|
|||
|
public double ValidTimeValue { get; set; }
|
|||
|
//自定义参数
|
|||
|
public object Param { get; set; }
|
|||
|
//回调函数,参数1为计时器id,参数2为有效期剩余时间
|
|||
|
public Action<int, double, object> CallBack { get; set; }
|
|||
|
//添加计时器的时间
|
|||
|
public double AddedTime { get; set; }
|
|||
|
//下一次执行的时间,通过计算获得,可以用于排序
|
|||
|
public double NextExecuteTime { get; set; }
|
|||
|
//是否已经处理
|
|||
|
public bool IsExecute { get; set; }
|
|||
|
}
|
|||
|
}
|