const ThemeManager = require("../utils/ThemeManger"); cc.Class({ extends: cc.Component, properties: { }, // LIFE-CYCLE CALLBACKS: init(cityId) { this.cityId = cityId; let buildSprite = this.node.getComponent(cc.Sprite) ThemeManager.setBottomBuildSpriteFrame(cityId, buildSprite); }, onLoad () { }, start () { }, // update (dt) {}, });