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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user