26 lines
783 B
Java
26 lines
783 B
Java
![]() |
package fr.monkhanny.dorfromantik.game;
|
||
|
|
||
|
import fr.monkhanny.dorfromantik.listeners.TilePanningActionListener;
|
||
|
|
||
|
|
||
|
public class TilePanningTransition {
|
||
|
private Board board;
|
||
|
private int targetOffsetX, targetOffsetY;
|
||
|
private int steps;
|
||
|
|
||
|
public TilePanningTransition(Board board, int targetOffsetX, int targetOffsetY, int steps) {
|
||
|
this.board = board;
|
||
|
this.targetOffsetX = targetOffsetX;
|
||
|
this.targetOffsetY = targetOffsetY;
|
||
|
this.steps = steps;
|
||
|
}
|
||
|
|
||
|
public void start() {
|
||
|
// Créer un listener d'animation
|
||
|
TilePanningActionListener listener = new TilePanningActionListener(board, targetOffsetX, targetOffsetY, steps);
|
||
|
|
||
|
// Démarrer l'animation si aucune n'est en cours
|
||
|
listener.startAnimation();
|
||
|
}
|
||
|
}
|