123456789101112131415161718192021222324252627282930313233343536373839 |
- import { _decorator, Component, Node, Prefab, instantiate } from 'cc';
- import ItemDataConfig from '../config/ItemDataConfig';
- import { shop_huobi_page } from './shop_huobi_page';
- const { ccclass, property } = _decorator;
- @ccclass('shop_huobi')
- export class shop_huobi extends Component {
- @property(Prefab) shopPrefab: Prefab = null
- @property(Prefab) itemPrefab: Prefab = null
- @property(Node) content:Node = null;
- start() {
- var yuanbaolist = ItemDataConfig.Instance.getShopYuanBaoList()
- var qihunlist = ItemDataConfig.Instance.getShopQiHunList()
- var tongqianlist = ItemDataConfig.Instance.getShopTongQianList()
- var yuanbao = instantiate(this.shopPrefab)
- yuanbao.getComponent(shop_huobi_page).show(this.itemPrefab,yuanbaolist)
- this.content.addChild(yuanbao)
- var qihun = instantiate(this.shopPrefab)
- qihun.getComponent(shop_huobi_page).show(this.itemPrefab,qihunlist)
- this.content.addChild(qihun)
- var tongqian = instantiate(this.shopPrefab)
- tongqian.getComponent(shop_huobi_page).show(this.itemPrefab,tongqianlist)
- this.content.addChild(tongqian)
- }
- update(deltaTime: number) {
-
- }
- }
|