Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public function next_pic(arch):Sprite
  2. {
  3. var count = 0;
  4. var list:Array = get_list(arch);
  5.  
  6. for each (var o in list) {
  7. if(o.used == true) {
  8. count ++;
  9. continue;
  10. }
  11. o.used = true;
  12. // "sprite" is actually a dispaly frame at the moment
  13. o.sprite.id = arch + ":" + count;
  14. return o.sprite;
  15. }
  16. throw new Error("No free pics for archetype '" + arch + "'");
  17. return null;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement