mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-03 04:34:26 -07:00
Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace Alloy {
|
||||
public class EnumFlagsAttribute : PropertyAttribute {
|
||||
}
|
||||
|
||||
public static class EnumExtension {
|
||||
public static bool HasFlag(this Enum keys, Enum flag) {
|
||||
int keysVal = Convert.ToInt32(keys);
|
||||
int flagVal = Convert.ToInt32(flag);
|
||||
|
||||
return (keysVal & flagVal) == flagVal;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user