27 lines
742 B
C#
27 lines
742 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
|
|||
|
|
namespace Content.Shared.GameObjects.Components.Mobs
|
|||
|
|
{
|
|||
|
|
public static class DamageStateHelpers
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Enumerates over <see cref="DamageState"/>, returning them in order
|
|||
|
|
/// of alive to dead.
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns>An enumerable of <see cref="DamageState"/>.</returns>
|
|||
|
|
public static IEnumerable<DamageState> AliveToDead()
|
|||
|
|
{
|
|||
|
|
foreach (DamageState state in Enum.GetValues(typeof(DamageState)))
|
|||
|
|
{
|
|||
|
|
if (state == DamageState.Invalid)
|
|||
|
|
{
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
yield return state;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|