PlantData.ts 792 B

12345678910111213141516171819202122232425262728293031
  1. /** 可生产产品列表数据类 */
  2. import { ProductType } from "../../../game/data/GameData";
  3. const { ccclass } = cc._decorator;
  4. @ccclass
  5. export default class PlantData {
  6. tab = null;
  7. configID = -1;
  8. productArr = [];
  9. /** 刷新下一个要解锁数据 */
  10. init_itemIndex = -1;
  11. /** 刷新下一个开锁条件数据 */
  12. init_lock = -1;
  13. //文字动画
  14. init_ani = false;
  15. /**
  16. * 打开生产产品界面
  17. * @param tab 产品类型
  18. * @param configID 生产设备ID
  19. */
  20. openPanel(tab: ProductType, configID) {
  21. this.tab = tab;
  22. this.configID = configID;
  23. this.productArr = gData.gameData.getProductArrByType(tab);
  24. mk.ui.openPanel('game/prefab/uiPanel/PlantPanel');
  25. }
  26. }