Created
May 24, 2015 16:39
-
-
Save selfsame/13bb72dcaa83db0a11f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C("drawsort", | |
| {fn:function(a, b){ return a.position.y - b.position.y; }}, | |
| {update: | |
| function(c){ | |
| c.owner.transform.children.sort(c.fn); | |
| } | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment