Identify water tileset correctly; actually center test sprite in screen;

switch scrolling directions more rapidly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1299 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-04-27 04:57:37 +00:00
parent 3fa39d06ff
commit ba6e88b2a0
2 changed files with 7 additions and 5 deletions
@@ -1,5 +1,5 @@
//
// $Id: ScrollingScene.java,v 1.5 2002/04/23 01:19:04 mdb Exp $
// $Id: ScrollingScene.java,v 1.6 2002/04/27 04:57:37 mdb Exp $
package com.threerings.miso.scene;
@@ -16,6 +16,7 @@ import com.threerings.media.tile.TileSet;
import com.threerings.media.tile.TileSetRepository;
import com.threerings.miso.tile.BaseTile;
import com.threerings.miso.tile.BaseTileSet;
import com.threerings.miso.util.MisoContext;
/**
@@ -33,7 +34,8 @@ public class ScrollingScene implements DisplayMisoScene
while (iter.hasNext()) {
TileSet tset = (TileSet)iter.next();
// yay for built-in regex support!
if (tset.getName().matches(".*[Ww]ater.*")) {
if (tset.getName().matches(".*[Ww]ater.*") &&
tset instanceof BaseTileSet) {
wtset = tset;
break;
}
@@ -1,5 +1,5 @@
//
// $Id: ScrollingTestApp.java,v 1.11 2002/04/23 01:19:04 mdb Exp $
// $Id: ScrollingTestApp.java,v 1.12 2002/04/27 04:57:37 mdb Exp $
package com.threerings.miso.scene;
@@ -96,7 +96,7 @@ public class ScrollingTestApp
protected void viewFinishedScrolling () {
// keep scrolling for a spell
if (++_sidx < DX.length) {
setScrolling(DX[_sidx], DY[_sidx], 10000l);
setScrolling(DX[_sidx], DY[_sidx], 3000l);
}
}
protected int _sidx = -1;
@@ -119,7 +119,7 @@ public class ScrollingTestApp
if (s != null) {
s.setRestingAction("sailing");
s.setActionSequence("sailing");
s.setLocation(160 - s.getWidth()/2, 144 + s.getHeight()/2);
s.setLocation(160, 144);
_panel.addSprite(s);
}