v1.4.0: fixed pushing effects not causing the camera to follow the hero
This commit is contained in:
@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
|
import com.watabou.noosa.Camera;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.Visual;
|
import com.watabou.noosa.Visual;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
@@ -49,6 +50,10 @@ public class Pushing extends Actor {
|
|||||||
this.from = from;
|
this.from = from;
|
||||||
this.to = to;
|
this.to = to;
|
||||||
this.callback = null;
|
this.callback = null;
|
||||||
|
|
||||||
|
if (ch == Dungeon.hero){
|
||||||
|
Camera.main.panFollow(ch.sprite, 20f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Pushing( Char ch, int from, int to, Callback callback ) {
|
public Pushing( Char ch, int from, int to, Callback callback ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user