Exemple #1
0
        public static void GetFlags(this TileFlag flag, System.Action <TileFlag> action)
        {
            if (action == null)
            {
                return;
            }

            foreach (TileFlag value in Enum.GetValues(typeof(TileFlag)))
            {
                if (flag.HasAny(value))
                {
                    action(value);
                }
            }
        }
Exemple #2
0
 public static bool HasItem(this TileFlag flag) =>
 flag.HasAny(TileFlag.Item);
Exemple #3
0
 public static bool HasFloor(this TileFlag flag) =>
 flag.HasAny(TileFlag.Floor);
Exemple #4
0
 public static bool HasWall(this TileFlag flag) =>
 flag.HasAny(TileFlag.Wall);
Exemple #5
0
 public static bool HasStepDown(this TileFlag flag) =>
 flag.HasAny(TileFlag.StepDown);