| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-04-18 15:09:04
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-19 16:25:14
- * @Description: 金砖道具
- */
- import { _decorator, Component, Label, Node, Sprite, SpriteFrame } from 'cc';
- import VMParent from 'db://oops-framework/libs/model-view/VMParent';
- import { smc } from '../common/SingletonModuleComp';
- const { ccclass, property } = _decorator;
- @ccclass('LoadBricsItem')
- export class LoadBricsItem extends VMParent {
- @property(Node)
- private brickNode: Node = null!;
- //完成Node
- @property(Node)
- private completeNode: Node = null!;
- @property(Label)
- private levelLabel: Label = null!;
- @property(Node)
- private circleNode: Node = null!;
- @property(Node)
- private showOver: Node = null!;
- data: any = {
- level: 0,
- eventType: "",
- withdraw: false,
- position: 0, //位置
- isFirstNotWithdraw: false, //是否第一个没提现
- }
- start() {
- }
- //更新数据
- updateData(data: any) {
- this.data = data;
- this.levelLabel.string = `${this.data.level}`;
- this.brickNode.active = !this.data.withdraw;
- this.completeNode.active = this.data.withdraw;
- //显示光圈
- if (this.data.level === smc.account.AccountModel.curLevel) {
- this.circleNode.active = true;
- } else {
- this.circleNode.active = false;
- }
- this.showOver.active = this.data.isFirstNotWithdraw;
- }
- }
|