Provide HasStance extension method for Stance enum, to avoid overhead of HasFlag method.
This commit is contained in:
@@ -32,6 +32,14 @@ namespace OpenRA.Traits
|
||||
Ally = 4,
|
||||
}
|
||||
|
||||
public static class StanceExts
|
||||
{
|
||||
public static bool HasStance(this Stance s, Stance stance)
|
||||
{
|
||||
return (s & stance) == stance;
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum ImpactType
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user