33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
|
import { _decorator, Component, Node } from 'cc';
|
||
|
import { RedPointCoust } from '../RedPointCoust';
|
||
|
import RedPointBase from '../RedPointBase';
|
||
|
import { formatString } from '../../../core_tgx/base/utils/commonFunction';
|
||
|
const { ccclass, property } = _decorator;
|
||
|
|
||
|
@ccclass('RedPointMonopoly')
|
||
|
export class RedPointMonopoly extends RedPointBase {
|
||
|
|
||
|
initMonopoly() {
|
||
|
this.init(RedPointCoust.Monopoly);
|
||
|
}
|
||
|
|
||
|
updateMonopolyPoint() {
|
||
|
if (this.redTree == null) {
|
||
|
this.initMonopoly();
|
||
|
}
|
||
|
|
||
|
let key = formatString(RedPointCoust.Monopoly, 1);
|
||
|
let m_signInPoint = this.redTree.findChild(key);
|
||
|
if (m_signInPoint == null) {
|
||
|
m_signInPoint = this.insertPoint(key, 0);
|
||
|
}
|
||
|
// const isShow: boolean = xmlConfig.getActivityOpenByType(68) != 0
|
||
|
// const is_need_red: boolean = UIFunctuins.getInstance().isNeedMonopolyLayerRed() || UIFunctuins.getInstance().isNeedLotteryLayerRed()
|
||
|
// if (isShow && is_need_red) {
|
||
|
// RedMgrInst.updateRedPoint(key, true)
|
||
|
// } else {
|
||
|
// RedMgrInst.updateRedPoint(key, false)
|
||
|
// }
|
||
|
}
|
||
|
|
||
|
}
|