123456789101112131415161718192021222324252627282930 |
- import { _decorator, Component, Node, Label } from 'cc';
- import { GameMng } from '../GameMng';
- import { Tools } from '../Tools';
- import { settlementData } from '../UserData/settlementData';
- const { ccclass, property } = _decorator;
- @ccclass('tongqian_jiesuan')
- export class tongqian_jiesuan extends Component {
- @property(Node) lab_get_tongbi:Node = null;
- @property(Node)
- rival_tongqian_lab: Node = null; //对手铜钱数
- @property(Node)
- self_tongqian_lab: Node = null; //自己铜钱数
- start() {
-
- }
- show(settlement:settlementData){
- this.node.active = true;
- this.rival_tongqian_lab.parent.active = true;
- let fh = settlement.result===1?"+":"-"
- this.rival_tongqian_lab.getComponent(Label).string = Tools.getTongBiNumber(GameMng._userData.room.rival.tong_bi)
- this.self_tongqian_lab.getComponent(Label).string = Tools.getTongBiNumber(GameMng._userData.bag.tong_bi)
- this.lab_get_tongbi.getComponent(Label).string = fh+Math.abs(settlement.get_tong_bi)+""
- }
- update(deltaTime: number) {
-
- }
- }
|