mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
34 lines
921 B
TypeScript
34 lines
921 B
TypeScript
import { _decorator, Component, Node } from 'cc';
|
|
import GOnHookData from '../../../data/GOnHookData';
|
|
import { TD } from '../../../App';
|
|
import { Label } from 'cc';
|
|
import { TbGEntity } from '../../../config/data/schema';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('GameDifficultyTitle')
|
|
export class GameDifficultyTitle extends Component {
|
|
|
|
@property(Label)
|
|
title:Label;
|
|
|
|
protected update(dt: number): void {
|
|
|
|
let info = GOnHookData.getIns().info;
|
|
let sign = null;
|
|
let levelId = info.levelId;
|
|
if(info && levelId){
|
|
sign = TD.TbGOnHookMaps.get(info.onHookMap)?.sign;
|
|
if(!sign) return;
|
|
}else return;
|
|
|
|
let table:{data:TbGEntity.TOnHookLevel} = TD[sign].get(GOnHookData.getIns().info.levelId);
|
|
|
|
//显示难度
|
|
this.title.string = `难度 : ${table.data.level}-${table.data.childLevel}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|