v0.7.5: further adjustments to camera panning

This commit is contained in:
Evan Debenham 2019-09-18 22:56:52 -04:00
parent 395ce218d1
commit 36f32cfeb8
3 changed files with 14 additions and 4 deletions

View File

@ -413,7 +413,17 @@ public class GameScene extends PixelScene {
Dungeon.hero.next();
Camera.main.snapTo(hero.center());
switch (InterlevelScene.mode){
case FALL: case DESCEND: case CONTINUE:
Camera.main.snapTo(hero.center().x, hero.center().y - DungeonTilemap.SIZE * (defaultZoom/Camera.main.zoom));
break;
case ASCEND:
Camera.main.snapTo(hero.center().x, hero.center().y + DungeonTilemap.SIZE * (defaultZoom/Camera.main.zoom));
break;
default:
Camera.main.snapTo(hero.center().x, hero.center().y);
}
Camera.main.panTo(hero.center(), 2.5f);
if (InterlevelScene.mode != InterlevelScene.Mode.NONE) {
if (Dungeon.depth == Statistics.deepestFloor

View File

@ -96,7 +96,7 @@ public class HeroSprite extends CharSprite {
@Override
public void place( int p ) {
super.place( p );
Camera.main.panTo(center(), 10f);
Camera.main.panTo(center(), 5f);
}
@Override
@ -105,7 +105,7 @@ public class HeroSprite extends CharSprite {
if (ch.flying) {
play( fly );
}
Camera.main.panFollow(this, 10f);
Camera.main.panFollow(this, 15f);
}
@Override

View File

@ -105,7 +105,7 @@ public class DangerIndicator extends Tag {
TargetHealthIndicator.instance.target(target == TargetHealthIndicator.instance.target() ? null : target);
if (Dungeon.hero.curAction == null) {
Camera.main.panTo(target.sprite.center(), 10f);
Camera.main.panTo(target.sprite.center(), 5f);
}
}
}