How to use the globals.loopBg function in globals

To help you get started, we’ve selected a few globals examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / start.js View on Github external
loadNoticePic() {
        const self = this;
        const bgSprite = self.loadingBg.getComponent(cc.Sprite);
        if (Gdt.loopBg) {
            cc.loader.load(Gdt.loopBg, (err, texture) => {
                if (!err) bgSprite.spriteFrame = new cc.SpriteFrame(texture);
                Utils.GD.showWxLoading(false);
            });
            return;
        };
        Utils.GD.getAircaftWarBg((res) => {
            Utils.GD.showWxLoading(false);
            if (res) {
                cc.loader.load(res.fileList[0].tempFileURL, (err, texture) => {
                    if (!err) {
                        Gdt.loopBg = texture;
                        bgSprite.spriteFrame = new cc.SpriteFrame(texture);
                    }
                })   
            }
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / start.js View on Github external
loadNoticePic() {
        const self = this;
        const bgSprite = self.loadingBg.getComponent(cc.Sprite);
        if (Gdt.loopBg) {
            cc.loader.load(Gdt.loopBg, (err, texture) => {
                if (!err) bgSprite.spriteFrame = new cc.SpriteFrame(texture);
                Utils.GD.showWxLoading(false);
            });
            return;
        };
        Utils.GD.getAircaftWarBg((res) => {
            Utils.GD.showWxLoading(false);
            if (res) {
                cc.loader.load(res.fileList[0].tempFileURL, (err, texture) => {
                    if (!err) {
                        Gdt.loopBg = texture;
                        bgSprite.spriteFrame = new cc.SpriteFrame(texture);
                    }
                })   
            }
        })
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / scroll_bg.js View on Github external
start() {
        this.loopBg1.y = 0;
        this.loopBg2.y = this.node.parent.height;
        if (Gdt.loopBg) {
            this.loopBg1.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(Gdt.loopBg);
            this.loopBg2.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(Gdt.loopBg)
        }
    },
    bgMove(dt) {
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / scroll_bg.js View on Github external
start() {
        this.loopBg1.y = 0;
        this.loopBg2.y = this.node.parent.height;
        if (Gdt.loopBg) {
            this.loopBg1.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(Gdt.loopBg);
            this.loopBg2.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(Gdt.loopBg)
        }
    },
    bgMove(dt) {