12345678910111213141516171819202122232425262728 |
- import { MouseConst } from "./MouseConst";
- import MouseIconDetail from "./MouseIconDetail";
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class MouseDetailsItem extends cc.Component {
- @property(sp.Skeleton)
- spine: sp.Skeleton = null;
- @property(cc.Label)
- label2: cc.Label = null;
- show(iconId: number, skeletonData: sp.SkeletonData) {
- this.node.active = true;
- this.spine.skeletonData = skeletonData;
- this.spine.setAnimation(0, "win_idle", true);
- this.label2.string = MouseConst.ICON_MUTIPLE[iconId - 1].toString();
- }
- onClick() {
- this.node.parent.getComponent(MouseIconDetail).resetView();
- }
- }
|