123456789101112131415161718192021222324252627282930313233343536 |
- import { _decorator, Component, Node, Prefab, instantiate } from 'cc';
- import { Holder } from '../adapter/abstract/Holder';
- import { ContentType } from '../adapter/define/enum';
- import { itemData } from '../config/ItemDataConfig';
- import { qipan_shop_item } from './qipan_shop_item';
- import { qizi_shop_item } from './qizi_shop_item';
- const { ccclass, property } = _decorator;
- @ccclass('shop_qizi_page')
- export class shop_qizi_page extends Component {
- start() {
- }
- update(deltaTime: number) {
-
- }
- show(holder:Holder,prefab:Prefab,list:itemData[],ct:ContentType){
- this.node.removeAllChildren()
- for (let index = 0; index < list.length; index++) {
- const element = list[index];
- var item = instantiate(prefab);
- this.node.addChild(item)
- item.getComponent(qizi_shop_item).show(element,ct)
- }
- }
- hide(){
- }
- }
|