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 OnemorePlayButton extends CoreModel implements OnCoreTouchUpListener{ public GameController controller; private boolean isTouch; public OnemorePlayButton(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.reStartGameProduction(); } public boolean isTouch() { return isTouch; } public void setTouch(boolean isTouch) { this.isTouch = isTouch; } }