nadako / Ash-Haxe

Port of Ash entity framework to Haxe
Other
131 stars 37 forks source link

EntityList.hx and List<T> #9

Closed ghost closed 9 years ago

ghost commented 11 years ago

...haxe. Modified the engine to use List and deleted EntityList.hx

The EntityList class provided the same functionality as the standard haxe generic list, unless there was some optimization I missed?

intersrc commented 10 years ago

Hi, cahman: It seems your removeAllEntities() missed something. I think it needs to be like this:

public function removeAllEntities():Void
    {
        while (!entityList.isEmpty())
        {
            removeEntity(entityList.first());
        }
    }
alamboley commented 9 years ago

@nadako any news on this?

nadako commented 9 years ago

I think EntityList is actually a lot better in performance than std.List<T> as it involves much less memory allocations.