12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- cc.Class({
- extends: cc.Component,
- properties: {
- timeLabel: cc.Label,
- countRichText: cc.RichText,
- itemSprite: cc.Sprite,
- isSignedNode: cc.Node,
- awardNode: cc.Node,
- isSigned: {
- get: function() {
- if (!this._isSigned) {
- this._isSigned = false;
- }
- return this._isSigned;
- },
- set: function(value) {
- this._isSigned = value;
- if (this._isSigned) {
- this.isSignedNode.active = true;
- this.awardNode.active = false;
- } else {
- this.isSignedNode.active = false;
- this.awardNode.active = true;
- }
- }
- },
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- },
- configData(signInfo) {
- this.signInfo = signInfo;
- this.timeLabel.string = `${signInfo.signId}`;
- this.isSigned = signInfo.status == 0 ? false : true;
- this.countRichText.string = `<b><color=#934C31>${signInfo.diamond}</color></b>`;
- },
- // update (dt) {},
- });
|