| 1234567891011121314151617181920212223242526272829303132333435 |
- /** 可生产产品列表数据类 */
- import { ProductType } from "../../../game/data/GameData";
- const { ccclass } = cc._decorator;
- @ccclass
- export default class PlantData {
- tab = null;
- configID = -1;
- productArr = [];
- /** 刷新下一个要解锁数据 */
- init_itemIndex = -1;
- /** 刷新下一个开锁条件数据 */
- init_lock = -1;
- //文字动画
- init_ani = false;
- //当前索引
- productIndex = -1;
- /**
- * 打开生产产品界面
- * @param tab 产品类型
- * @param configID 生产设备ID
- */
- openPanel(tab: ProductType, configID, index = -1) {
- this.tab = tab;
- this.configID = configID;
- this.productIndex = index;
- this.productArr = gData.gameData.getProductArrByType(tab);
- mk.ui.openPanel('game/prefab/uiPanel/PlantPanel');
- }
- }
|