fix conflict of constraints

This commit is contained in:
Mikhail 2023-06-04 18:58:26 +08:00
parent 416504db45
commit a4c2b65eb9

View File

@ -104,6 +104,9 @@ namespace DCFApixels.DragonECS
public TOtherSubject Combine<TOtherSubject>() where TOtherSubject : EcsSubject
{
var result = _world.GetSubject<TOtherSubject>();
_inc.ExceptWith(result.mask._exc);//удаляю конфликтующие ограничения
_exc.ExceptWith(result.mask._inc);//удаляю конфликтующие ограничения
_inc.UnionWith(result.mask._inc);
_exc.UnionWith(result.mask._exc);
return result;