Make it possible for other kinds of sprites to know and report their tile

coordinates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2004 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-11-28 03:42:17 +00:00
parent 26cd1188ae
commit 130d126238
3 changed files with 30 additions and 13 deletions
@@ -1,5 +1,5 @@
//
// $Id: IsoSceneView.java,v 1.125 2002/11/20 22:16:54 mdb Exp $
// $Id: IsoSceneView.java,v 1.126 2002/11/28 03:42:17 mdb Exp $
package com.threerings.miso.scene;
@@ -385,10 +385,10 @@ public class IsoSceneView implements SceneView
// if this is a miso character sprite, we can use its cached
// tile coordinates
int tx, ty;
if (sprite instanceof MisoCharacterSprite) {
MisoCharacterSprite mcs = (MisoCharacterSprite)sprite;
tx = mcs.getTileX();
ty = mcs.getTileY();
if (sprite instanceof IsoSprite) {
IsoSprite iso = (IsoSprite)sprite;
tx = iso.getTileX();
ty = iso.getTileY();
} else {
// otherwise we have to compute them from the screen