Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function next_pic(arch):Sprite
- {
- var count = 0;
- var list:Array = get_list(arch);
- for each (var o in list) {
- if(o.used == true) {
- count ++;
- continue;
- }
- o.used = true;
- // "sprite" is actually a dispaly frame at the moment
- o.sprite.id = arch + ":" + count;
- return o.sprite;
- }
- throw new Error("No free pics for archetype '" + arch + "'");
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement