
export class Global {
    static  stage: Laya.Stage;
    static  httpurl = "";
    static  resourcehtttp:string = "";

    static  cdnurl:string = "https://wxgame.51yoyoyo.com/";
    
    /**
     * 资源后缀版本号
     */
    static  versions:string = "";//"?v=1.0.7";

    static  initWidth:number = 720; 

    static  initHeight:number = 1280; 
    /**
     * 资源版本号
     */
    static  resconfigVersion:string = "";
    /**
     * 当前平台
     */
    static  nowplatfrom:string = "";

    /**
     * 当前游戏appid
     */
    static  appid:string = "wx46f4626932e5f48b"; 

    /**
     * 游戏版本号
     */
    static  gameVersion:string = "1.0.1";

    /**
     * 是否调试版本
     */
    static  isdebug:boolean = false;

    static  AppKeyID:number = 0;
    static  MemberID:number = 0;


    static  curHeight():number
    {
        return Laya.stage.height;
    }

    static  curWidth():number
    {
        return Laya.stage.width;
    }

    static  setVars():void
    {
        Global.stage = Laya.stage;
        Global.sethttpurl();
    }

    static  getUrl( url:string ):string
    {
        if(url.indexOf("wxlocal")==-1)
        { 
            return Global.resourcehtttp + url + Global.versions;
        }
        return url;
    }

    static  sethttpurl():void
    {
        if( Global.isdebug )
        {
            Global.httpurl = "https://wxgamedev.51yoyoyo.com/";
        }
        else
        {
            Global.httpurl = "https://minport.51yoyoyo.com/";
        }
    }
}