fix enumerator usage
This commit is contained in:
parent
df2b49647c
commit
9bfdf46226
|
@ -97,13 +97,11 @@ namespace Blarg.GameFramework.Entities
|
||||||
if (componentEntities == null)
|
if (componentEntities == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (componentEntities.Count > 0)
|
var enumerator = componentEntities.Keys.GetEnumerator();
|
||||||
return componentEntities.Keys.GetEnumerator().Current;
|
enumerator.MoveNext();
|
||||||
else
|
return enumerator.Current;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void GetAllWith<T>(EntityList list, bool clearListFirst = true) where T : Component
|
public void GetAllWith<T>(EntityList list, bool clearListFirst = true) where T : Component
|
||||||
{
|
{
|
||||||
if (list == null)
|
if (list == null)
|
||||||
|
|
Reference in a new issue