Wire up so descendants can do something when sprites are clicked.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@960 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Mike Thomas
2010-08-18 20:23:00 +00:00
parent 7884435cd1
commit 32a348fa2c
@@ -501,6 +501,11 @@ public class CrowdStageScenePanel extends StageScenePanel
var viewPt :Point = _isoView.globalToLocal(new Point(event.stageX, event.stageY));
var iso :Point = _isoView.localToIso(new Point(viewPt.x, viewPt.y));
if (hobject is CharacterIsoSprite) {
handleSpriteClicked(CharacterIsoSprite(hobject));
return true;
}
// Move ourselves to the spot clicked.
handleLocationClicked(new StageLocation(MisoUtil.tileToFull(iso.x),
MisoUtil.tileToFull(iso.y), 0));
@@ -508,6 +513,11 @@ public class CrowdStageScenePanel extends StageScenePanel
return true;
}
protected function handleSpriteClicked (sprite :CharacterIsoSprite) :void
{
// Nothing by default.
}
protected function displayFeedback (msg :String) :void
{
throw new Error("abstract");