mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-03 04:34:26 -07:00
20 lines
402 B
C#
Vendored
20 lines
402 B
C#
Vendored
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;
|
|
}
|
|
}
|
|
|
|
} |