How to use the globals.common 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 / buff_group.js View on Github external
onLoad() {
        this.curState = Gdt.commonInfo.gameState.start;
        Gdt.common.batchInitObjPool(this, this.buffG);
    },
    createHeroBuff(emInfo) {
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / buff_group.js View on Github external
getNewBuff(BuffInfo, emInfo) {
        const poolName = BuffInfo.name + 'Pool',
            newNode = Gdt.common.genNewNode(this[poolName], BuffInfo.prefab, this.node),
            emPos = emInfo.getPosition(),
            newPos = cc.v2(emPos.x, emPos.y);
        newNode.setPosition(newPos);
        newNode.getComponent('buff').poolName = poolName;
    },
    //重新开始
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / bullet_group.js View on Github external
onLoad() {
        this.curState = Gdt.commonInfo.gameState.none;
        this.isDeadBullet = false;
        //初始化无限子弹组
        Gdt.common.initObjPool(this, this.bulletInfinite);
        //初始化有限子弹组
        Gdt.common.batchInitObjPool(this, this.bulletFiniteG);
    },
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / bullet_group.js View on Github external
onLoad() {
        this.curState = Gdt.commonInfo.gameState.none;
        this.isDeadBullet = false;
        //初始化无限子弹组
        Gdt.common.initObjPool(this, this.bulletInfinite);
        //初始化有限子弹组
        Gdt.common.batchInitObjPool(this, this.bulletFiniteG);
    },
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / enemy_group.js View on Github external
onLoad() {
        //初始化敌机组
        this.curState = Gdt.commonInfo.gameState.none;
        Gdt.common.batchInitObjPool(this, this.enemyG);
    },
    startAction() {
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / common.js View on Github external
onLoad() {
        Gdt.commonInfo = common;
        Gdt.common = this;
        this.batchInitObjPool = utils.batchInitObjPool;
        this.initObjPool = utils.initObjPool;
        this.genNewNode = utils.genNewNode;
        this.backObjPool = utils.backObjPool;
    }
});
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / enemy_group.js View on Github external
enemyDied(nodeinfo, score) {
        const poolName = nodeinfo.getComponent('enemy').poolName;
        Gdt.common.backObjPool(this, poolName, nodeinfo);
        //增加分数
        if (parseInt(score) > 0) this.main.gainScore(score);
    },
    getScore() {
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / enemy_bullet_group.js View on Github external
bulletDied(nodeinfo) {
        const poolName = nodeinfo.getComponent('enemy_bullet').poolName;
        Gdt.common.backObjPool(this, poolName, nodeinfo);
    }
})
github yl1033669613 / game_with_cocosCreater / assets / script / aircraft_war_js / enemy_bullet_group.js View on Github external
onLoad() {
        this.curState = Gdt.commonInfo.gameState.start;
        //初始enemy bullet
        Gdt.common.initObjPool(this, this.enemybulletIfe);
    },
    enemyOpenFire(gteBEnemyInfo) {