//
//  LivingEntityExtensions.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.
using NosSmooth.Game.Data.Entities;
namespace NosSmooth.Game.Extensions;
/// 
/// An extension methods for .
/// 
public static class LivingEntityExtensions
{
    /// 
    /// Checks whether the entity is alive.
    /// 
    /// The entity to check.
    /// Whether the entity is alive.
    public static bool IsAlive(ILivingEntity entity)
    {
        return entity.Hp is null || entity.Hp.Amount != 0 || entity.Hp.Percentage != 0;
    }
}