import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import { SceneBase } from "../SceneBase";

export default class Result2Scene extends SceneBase {
    againBtn: eui.Button;
    msg: eui.Label;
    start(data) {
        super.start(data);
        this.againBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onAgain, this);
        this.msg.textFlow = (new egret.HtmlTextParser).parser('遗憾您只答对了<font color=0xff0000 size=35 >' + data + '</font>题!');
    }

    onAgain() {
        SceneCtrl.instance.change(ModuleTypes.START_SCENE);
    }

    get skinKey(): string { return 'Result2' }
    get skinResKey(): string { return 'result' }
}