| 12345678910111213141516171819202122232425262728293031323334353637 |
- /**收获界面数据类 */
- import { Data } from "../../../mk/data/Data";
- const { ccclass } = cc._decorator;
- @ccclass
- export default class HarvestData extends Data {
- configID = null;
- plantID = null;
- config = null;
- call = null;
- openPanel(configID, plantID, call) {
- this.configID = configID;
- this.plantID = plantID;
- this.call = call;
- this.config = gData.gameData.getProductMap(this.plantID);
- mk.ui.openPanel('game/prefab/uiPanel/HarvestPanel');
- }
- setAdData(data) {
- super.setAdData(data);
- //领取超级加倍红包
- this.setToEmpty();
- }
- /** 收取后变为空地 */
- setToEmpty() {
- if (this.call) {
- this.call();
- this.call = null;
- }
- mk.ui.closePanel('HarvestPanel');
- }
- }
|