You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import ash.core.Engine;
import ash.core.Entity;
public class AshTest extends Sprite {
public var engine:Engine = new Engine();
public function AshTest() {
var a:Entity = new Entity("a");
var b:Entity = new Entity("b");
var c:Entity = new Entity("c");
var d:Entity = new Entity("d");
engine.addEntity(a);
engine.addEntity(b);
engine.addEntity(c);
engine.addEntity(d);
print(); //a, b, c, d
engine.removeEntity(b);
engine.removeEntity(c);
print(); //a, d <-- ok
engine.removeEntity(b); //<- delete b again. problem here
print(); //a, c, d <-- error
}
private function print():void {
var result:Array = [];
var entites:Vector.<Entity> = engine.entities;
for (var i:int = 0; i < entites.length; i++) {
result[result.length] = entites[i].name;
}
trace(result.join(", "));
}
}
}`
It's self-evident that programmer should not remove entities that are already removed. But it would be better if engine will work correctly in this situation.
The text was updated successfully, but these errors were encountered:
Hi!
Here is code that illustrates issue.
`package {
import flash.display.Sprite;
}`
It's self-evident that programmer should not remove entities that are already removed. But it would be better if engine will work correctly in this situation.
The text was updated successfully, but these errors were encountered: