PlantData.ts 609 B

1234567891011121314151617181920212223
  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. * 打开生产产品界面
  11. * @param tab 产品类型
  12. * @param configID 生产设备ID
  13. */
  14. openPanel(tab: ProductType, configID) {
  15. this.tab = tab;
  16. this.configID = configID;
  17. this.productArr = gData.gameData.getProductArrByType(tab);
  18. mk.ui.openPanel('game/prefab/uiPanel/PlantPanel');
  19. }
  20. }