invite_page/assets/scripts/puzzleImage.js
2019-02-22 19:33:06 +08:00

24 lines
483 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cc.Class({
extends: cc.Component,
properties: {
imgIndex: 0,
//显示黑色或者亮色, 0: 黑色1: 亮色
type: 0
},
// LIFE-CYCLE CALLBACKS:
onLoad () {
let self = this;
cc.loader.loadRes('textures/part2/images/' + self.imgIndex, cc.SpriteFrame, function (err, spriteFrame) {
self.getComponent(cc.Sprite).spriteFrame = spriteFrame;
});
},
start () {
},
// update (dt) {},
});