package sample.game.model; import library.core.listener.OnCoreTouchUpListener; import library.core.mainAI.RiverCrossingAI; import library.core.model.CoreModel; import library.core.system.CoreImageData; import sample.game.controller.GameController; import sample.game.main.MainActivity.gameSeType; public class BackToTitleButton extends CoreModel implements OnCoreTouchUpListener{ private GameController controller; private boolean isTouch; public BackToTitleButton(GameController controller,CoreImageData imageData, float centerX, float centerY, float width, float height) { super(imageData, centerX, centerY, width, height); this.controller=controller; this.isTouch=true; } @Override public void onTouchUp() { if(!isTouch) return; RiverCrossingAI.getSePlayer().play(gameSeType.NEXT.ordinal()); isTouch=false; controller.endGameProduction(); } public boolean isTouch() { return isTouch; } public void setTouch(boolean isTouch) { this.isTouch = isTouch; } }