mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交上阵
This commit is contained in:
9
JisolGameCocos/assets/script/ui/Consts/Tactical.meta
Normal file
9
JisolGameCocos/assets/script/ui/Consts/Tactical.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "231e3614-8fc2-4590-bc9f-57ff63343f85",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "78c30f1a-d1d0-4210-9fc4-f7067364f26a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { PlayerTacticalItem } from './PlayerTacticalItem';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
* 玩家阵法
|
||||
*/
|
||||
@ccclass('PlayerTacticalView')
|
||||
export class PlayerTacticalView extends Component {
|
||||
|
||||
|
||||
//阵法子节点列表
|
||||
items:PlayerTacticalItem[] = [];
|
||||
|
||||
// onLoad(){
|
||||
|
||||
// //阵法
|
||||
// this.items = this.node.getComponentsInChildren(PlayerTacticalItem);
|
||||
// this.items.forEach((item,index) => item.onInit(index));
|
||||
|
||||
// this.onUpdateView();
|
||||
|
||||
// }
|
||||
|
||||
// //更新阵法显示
|
||||
// onUpdateView(){
|
||||
// this.items.forEach(item => {
|
||||
// item.onUpdateView();
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "a9372de8-9c71-492e-af72-cee66fd5e045",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user