feat: Time
This commit is contained in:
parent
81f9ef10bf
commit
388e7f4788
|
@ -0,0 +1,9 @@
|
|||
using System;
|
||||
|
||||
namespace Syntriax.Engine.Core;
|
||||
|
||||
public record GameTime
|
||||
(
|
||||
TimeSpan Total,
|
||||
TimeSpan Elapsed
|
||||
);
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace Syntriax.Engine.Core;
|
||||
|
||||
public static class Time
|
||||
{
|
||||
private static GameTime _gameTime = new(TimeSpan.Zero, TimeSpan.Zero);
|
||||
|
||||
public static TimeSpan Total => _gameTime.Total;
|
||||
public static TimeSpan Elapsed => _gameTime.Elapsed;
|
||||
|
||||
public static void SetTime(GameTime gameTime) => _gameTime = gameTime;
|
||||
}
|
Loading…
Reference in New Issue