aduros/flambe — pull request #159 by SquareLi (2013-08-07 21:11:59+00:00)
Title: ZOrder

Hi Bruno,

I am working on the Cocos2d haxe(it's based on flambe), I found flambe does not support setting zOrder for Entity. So I changed some code in Entity.hx to implement the zOrder. I did not change the data structure to save children. I just added a zOrder attribute, and sort the children when the addChild() is called. There is a tricky thing, if users want to set the zOrder, they have to use the setZOrder(z : Int) function instead of entity.zOrder = newZ. And the new Entity does not break anything before.

I just finished it today, and my manager, Nate Altschul, told me that maybe I can make a pull request to you. So please let me know if I need to fix anything.

Thanks,

Ang