import Scene from "./Scene";
import submit from "../../new_tw/ctrls/submit";
import Panel from "./Panel";
import { DataManager } from "../../tw/manager/DataManager";
import PanelCtrl from "../ctrls/panelCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import showAlertPanel from "../ctrls/showAlertPanel";
export default class PlaySceneBase extends Scene {
    score = 0;

    playAnimation() {
        egret.Tween.get(this).set({ x: 750 }).to({ x: 0 }, 300);
    }

    sendSubmit() {
        submit(() => {
            let panel: Panel;
            if (DataManager.ins.gameGetSubmitResultData.lottery) {
                panel = PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL)
            } else {
                panel = showAlertPanel('手气不佳 \n 再试一次吧~');
            }

        }, this.score)
    }
    get skinKey() { return 'Play' }
}