encompass-cs/encompass-cs/Utility/EntityChecker.cs

15 lines
417 B
C#
Raw Normal View History

2019-06-19 21:14:44 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
namespace Encompass
{
internal static class EntityChecker
{
2019-07-17 18:24:21 +00:00
public static bool CheckEntity(ComponentManager componentManager, Entity entity, IEnumerable<Type> componentTypes)
2019-06-19 21:14:44 +00:00
{
2019-07-17 18:24:21 +00:00
return componentTypes.All((componentType) => componentManager.EntityHasComponentOfType(entity.ID, componentType));
2019-06-19 21:14:44 +00:00
}
}
}