super-hero/assets/cc-game/scripts/debug-config/DebugBuildVer.ts

22 lines
594 B
TypeScript
Raw Normal View History

2024-05-12 20:54:17 -07:00
import { Label } from 'cc';
import { _decorator, Component, Node } from 'cc';
import { UmConfig, BUILD_MODE } from '../../../cc-common/cc-util/UmConfig';
import { GameDefine } from '../config/GameDefine';
const { ccclass, property } = _decorator;
@ccclass('DebugBuildVer')
export class DebugBuildVer extends Component {
@property(Label) txtBuildVer: Label = null!;
start() {
if (UmConfig.BUILD_MODE == BUILD_MODE.DEBUG)
this.txtBuildVer.string = GameDefine.BUILD_VER;
else {
this.txtBuildVer.node.setNodeActive(false);
}
}
}