30 lines
1.0 KiB
C#
Executable File
30 lines
1.0 KiB
C#
Executable File
using Cal;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Linq;
|
|
|
|
namespace ET
|
|
{
|
|
public class TimerSendMail_1MinuteEvent : AEvent<EventType.UpdatePer1MinuteOfDay>
|
|
{
|
|
public override async ETTask Run(EventType.UpdatePer1MinuteOfDay args)
|
|
{
|
|
Log.Warning(MapUnitComponent.Instance.GetAll().Count(t => t.UnitType == UnitType.Player)+string.Empty);
|
|
//Log.Warning(UnitComponent.Instance.GetAll().Where(t=>t.UnitType == UnitType.Player).ToCustomString());
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
public class TimerTest_FPSEvent : AEvent<EventType.UpdateMaxFrame>
|
|
{
|
|
private long lastTime;
|
|
public override async ETTask Run(EventType.UpdateMaxFrame args)
|
|
{
|
|
int frame = args.Frame;
|
|
Log.Warning($"FPS:{(float)frame * 1000 / (args.now - lastTime):f2} time:{(args.now - lastTime) / (float)frame:f2}");
|
|
lastTime = args.now;
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
}
|