12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import { _decorator, Label, Node, Sprite } from 'cc';
- import { ResKeeper } from '../../../framework/res/ResKeeper';
- const { ccclass, property } = _decorator;
- @ccclass('HeroAttrShowItem')
- export class HeroAttrShowItem extends ResKeeper {
- @property({ type: Sprite, tooltip: "属性图标" })
- attrIco: Sprite = null;
- @property({ type: Label, tooltip: "属性名称" })
- attrNameTx: Label = null;
- @property({ type: Label, tooltip: "属性总加成" })
- attrNumTx: Label = null;
- @property({ type: Node, tooltip: "加成节点" })
- addNode: Node = null;
- @property({ type: Node, tooltip: "加成模板" })
- addModel: Node = null;
- protected onLoad() {
-
- }
- protected onDestroy() {
- //如果该组件有事件自行取消注释
- //Framework.event.removeEvent(this);
- super.onDestroy();
- }
-
- //如果使用了池中的节点,在该函数内归还,该函数会在onDestroy前调用
- onClose() {
-
- }
- //UI事件处理
- private onTouchButton(event: Event) {
- //Framework.audio.playEffect(AudioID.Click);
- let target: any = event.target;
- }
- refreshItem(data) {
-
- }
- }
|