Make tiles work like tilesets - if you ask to be notified and it's already loaded, notify immediately.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@968 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Mike Thomas
2010-08-10 20:27:06 +00:00
parent b7da2fa190
commit ba76a845e0
+4
View File
@@ -97,8 +97,12 @@ public class Tile
public function notifyOnLoad (func :Function) :void public function notifyOnLoad (func :Function) :void
{ {
if (_image != null) {
func(this);
} else {
_notifyOnLoad.push(func); _notifyOnLoad.push(func);
} }
}
/** /**
* Returns the x offset into the tile image of the origin (which will be aligned with the * Returns the x offset into the tile image of the origin (which will be aligned with the