32 lines
522 B
C#
Raw Normal View History

2024-10-29 18:52:47 +03:00
using Sandbox;
using System;
namespace Editor;
public static class MotivationManager
{
static RealTimeUntil Cooldown;
static MotivationManager()
{
Game.SetRandomSeed( DateTime.Now.Second );
Cooldown = 5;
}
[EditorEvent.FrameAttribute]
public static void Frame()
{
if ( !Cooldown )
{
return;
}
var notice = new MotivationNotice();
2024-10-29 19:54:53 +03:00
NoticeManager.Remove( notice, 6 );
2024-10-29 18:52:47 +03:00
2024-10-29 19:54:53 +03:00
const int MIN_MINUTES = 2;
const int MAX_MINUTES = 5;
2024-10-29 18:52:47 +03:00
Cooldown = 60 * Game.Random.Next( MIN_MINUTES, MAX_MINUTES );
}
}