ShopItem.ts 356 B

1234567891011121314
  1. import { _decorator, Component, Node } from "cc";
  2. import BaseUI from "../base/BaseUI";
  3. const { ccclass, property } = _decorator;
  4. @ccclass("ShopItem")
  5. export class ShopItem extends BaseUI {
  6. init(i: number) {
  7. this.setText("lbl_name", "Item " + i);
  8. this.setText("lbl_price", "$" + (i + 1) * 100);
  9. }
  10. start() {}
  11. update(deltaTime: number) {}
  12. }