import { createEntity, createRectangeRenderer } from 'assets/utils/utils';
import { RectRenderer, Transform } from 'scilla-components/src';
import { Entity, ScillaComponent } from 'scilla-core/src';

export default class MainController extends ScillaComponent {

    progressBarFrontBg: Entity;
    progress: Entity;
    mask: Entity;

    onCreate() {
        super.onCreate();
        // DataManager.ins.customCfgData = window['CFG'];
        // NetManager.ins.doJoin(() => { });
    }

    onAwake() {
        super.onAwake();
        console.log(this.progressBarFrontBg);
        // this.progressBarFrontBg.getComponent(Transform).alpha = 0;

        

        // createRectangeRenderer(100, 100, e);

        // const maximum = 200;//设置进度条的最大值
        // const minimum = 100;//设置进度条的最小值
        // const progressbar = new ProgressBar(maximum, minimum);
        // progressbar._fg = this.progressBarFrontBg;
        // progressbar.value = 200;
        // this.progress.addComponent(progressbar);
    }

    onWithdrawBtnTap() {
        alert('onWithdrawBtnTap')
    }

    onRecordBtnTap() {
        alert('onRecordBtnTap')
    }

    onRuleBtnTap() {
        alert('onRuleBtnTap')
    }

    onTasksBtnTap() {
        alert('onTasksBtnTap')
    }

    onEggsBtnTap() {
        alert('onEggsBtnTap')
    }
}