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