QueryWith and QueryWithout implicitly Read #8
|
@ -1,7 +1,6 @@
|
|||
using Encompass.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Encompass
|
||||
{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using Encompass.Exceptions;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Encompass
|
||||
{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Encompass.Exceptions;
|
||||
|
||||
namespace Encompass
|
||||
{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Encompass.Exceptions;
|
||||
|
||||
namespace Encompass
|
||||
{
|
||||
|
|
|
@ -108,11 +108,21 @@ namespace Encompass
|
|||
QueryWithTypes = queryWithAttribute.QueryWithTypes;
|
||||
}
|
||||
|
||||
foreach (var queryType in QueryWithTypes)
|
||||
{
|
||||
ReadTypes.Add(queryType);
|
||||
}
|
||||
|
||||
var queryWithoutAttribute = GetType().GetCustomAttribute<QueryWithout>(false);
|
||||
if (queryWithoutAttribute != null)
|
||||
{
|
||||
QueryWithoutTypes = queryWithoutAttribute.QueryWithoutTypes;
|
||||
}
|
||||
|
||||
foreach (var queryType in QueryWithoutTypes)
|
||||
{
|
||||
ReadTypes.Add(queryType);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Encompass
|
||||
{
|
||||
|
|
|
@ -1411,7 +1411,6 @@ namespace Tests
|
|||
struct MockComponentC : IComponent { }
|
||||
struct MockComponentD : IComponent { }
|
||||
|
||||
[Reads(typeof(MockComponent), typeof(MockComponentB))]
|
||||
[Writes(typeof(MockComponentB))]
|
||||
[QueryWith(typeof(MockComponent), typeof(MockComponentB))]
|
||||
class EntityQueryWithComponentsEngine : Engine
|
||||
|
@ -1465,7 +1464,6 @@ namespace Tests
|
|||
queriedEntities.Should().BeEmpty();
|
||||
}
|
||||
|
||||
[Reads(typeof(MockComponent))]
|
||||
[Writes(typeof(MockComponent))]
|
||||
[QueryWithout(typeof(MockComponent))]
|
||||
class EntityQueryWithoutComponentsEngine : Engine
|
||||
|
@ -1519,7 +1517,6 @@ namespace Tests
|
|||
queriedEntities.Should().BeEmpty();
|
||||
}
|
||||
|
||||
[Reads(typeof(MockComponent), typeof(MockComponentB), typeof(MockComponentD))]
|
||||
[QueryWith(typeof(MockComponent), typeof(MockComponentB))]
|
||||
[QueryWithout(typeof(MockComponentD))]
|
||||
class EntityQueryWithandWithoutComponentsEngine : Engine
|
||||
|
@ -1745,7 +1742,6 @@ namespace Tests
|
|||
}
|
||||
|
||||
[ReadsImmediate(typeof(MockComponentB))]
|
||||
[Reads(typeof(MockComponent))]
|
||||
[QueryWith(typeof(MockComponent), typeof(MockComponentB))]
|
||||
class EntityQueryWithImmediateAndNonImmediateComponents : Engine
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue