import {PanelBaseControl} from "../Control/PanelBaseControl";

export class LoadingPanel extends PanelBaseControl
{
    static key:string = "LoadingPanel";
    pro:fairygui.GProgressBar;
    constructor() 
    { 
        super("loading","loading"); 
    }

    protected onInit():void
    {
        super.onInit();
    }

    
    public showWord( value:number ):void
    {
        this.pro.value = value;
    }

    private onBoyClick(e:Laya.Event): void {
        //点击后小人会放大缩小
        var boy:Laya. Sprite = e.target;
        if (boy.scaleX === 1) {
            boy.scale(1.2, 1.2);
        } else {
            boy.scale(1, 1);
        }
    }

    private onTxtClick(e: Event): void {
        //点击后切换适配模式
        e.stopPropagation();
       
    }

   

    public destory():void
    {
        this.clearEvent();
        super.destory();
    }
}