22 lines
594 B
TypeScript
22 lines
594 B
TypeScript
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);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|