package sample.game.model.title;

import library.core.listener.OnCoreTouchUpListener;
import library.core.mainAI.RiverCrossingAI;
import library.core.model.CoreModel;
import library.core.system.CoreImageData;
import sample.game.controller.TitleController;

/**
 * 遊び方ボタン
 * @author 貴裕
 *
 */
public class HowToPlayButton extends CoreModel implements OnCoreTouchUpListener{

	private TitleController controller;
	private boolean canUse;

	public HowToPlayButton(TitleController controller,CoreImageData imageData, float centerX,
			float centerY, float width, float height) {
		super(imageData, centerX, centerY, width, height);

		this.controller=controller;

		canUse=true;
	}

	@Override
	public void onTouchUp() {
		if(!canUse) return;

		RiverCrossingAI.getSePlayer().play(1);
		controller.selectHowToPlay();

	}

	public void setCanUse(boolean canUse) {
		this.canUse = canUse;
	}




}
