31 lines
644 B
TypeScript
Raw Normal View History

2023-11-15 18:38:00 +08:00
import { _decorator, Component, Node } from 'cc';
import PlayerTacticalData from '../../../data/PlayerTacticalData';
import { app } from '../../../App';
import { GUI } from '../../UIConfig';
const { ccclass, property } = _decorator;
@ccclass('PlayerTacticalItem')
export class PlayerTacticalItem extends Component {
//阵法的Index;
index:number;
//初始化阵法
onInit(index:number){
this.index = index;
}
//更新信息
onUpdateView(){
PlayerTacticalData.getIns().getItem(this.index);
}
//点击
onClick(){
app.layer.Open(GUI.IntoBattleView);
}
}