chore: EnumExtensions added
This commit is contained in:
parent
e8ef41af41
commit
90c1dd9348
9
Engine.Core/Extensions/EnumExtensions.cs
Normal file
9
Engine.Core/Extensions/EnumExtensions.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Syntriax.Engine.Core;
|
||||
|
||||
public static class EnumExtensions
|
||||
{
|
||||
public static bool CheckFlag(this Enum left, Enum right)
|
||||
=> ((int)(object)left & (int)(object)right) != 0;
|
||||
}
|
@ -2,8 +2,8 @@ namespace Syntriax.Engine.Systems.Time;
|
||||
|
||||
public enum TimerState
|
||||
{
|
||||
Idle,
|
||||
Ticking,
|
||||
Paused,
|
||||
Stopped
|
||||
Idle = 0b0001,
|
||||
Ticking = 0b0010,
|
||||
Paused = 0b0100,
|
||||
Stopped = 0b1000
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user