商业化-前端部分

This commit is contained in:
2025-08-15 13:55:26 +08:00
parent f928e7fabe
commit 41f9555e53
15 changed files with 22958 additions and 22810 deletions
@@ -0,0 +1,28 @@
import { _decorator, Component, Label, Node } from "cc";
import { PurchasePanel } from "../ui/panels/PurchasePanel";
import { PurchaseConfig } from "../../schema/schema";
const { ccclass, property } = _decorator;
@ccclass("PurchasePanelItem")
export class PurchasePanelItem extends Component {
@property(Label)
count: Label;
@property(Label)
price: Label;
baseView: PurchasePanel;
data: PurchaseConfig;
public init(base: PurchasePanel, data: PurchaseConfig) {
this.baseView = base;
this.data = data;
}
public show() {
this.count.string = this.data.desc.toString();
this.price.string = this.data.count.toString();
}
onClickThis() {
this.baseView.setDiamondTag(this.data.id);
}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "0c5a1f4a-a909-49dd-802c-06e27182eb79",
"files": [],
"subMetas": {},
"userData": {}
}