ShopAmethystItem.ts 577 B

123456789101112131415161718192021222324252627
  1. import { __BuyPowerData, __PayData } from "../../data/sdata/SManage";
  2. /**
  3. * 充值节点
  4. */
  5. const { ccclass, property } = cc._decorator;
  6. @ccclass
  7. export default class ShopAmethystItem extends cc.Component {
  8. public callback: (item: ShopAmethystItem) => void
  9. public _buyPowerData: __BuyPowerData
  10. public init(_buyPowerData: __BuyPowerData) {
  11. this._buyPowerData = _buyPowerData
  12. }
  13. public setCallback(callback: (item: ShopAmethystItem) => void) {
  14. this.callback = callback
  15. }
  16. public onclick() {
  17. this.callback(this)
  18. }
  19. }