HeroAttrShowItem.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { _decorator, Label, Node, Sprite } from 'cc';
  2. import { ResKeeper } from '../../../framework/res/ResKeeper';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('HeroAttrShowItem')
  5. export class HeroAttrShowItem extends ResKeeper {
  6. @property({ type: Sprite, tooltip: "属性图标" })
  7. attrIco: Sprite = null;
  8. @property({ type: Label, tooltip: "属性名称" })
  9. attrNameTx: Label = null;
  10. @property({ type: Label, tooltip: "属性总加成" })
  11. attrNumTx: Label = null;
  12. @property({ type: Node, tooltip: "加成节点" })
  13. addNode: Node = null;
  14. @property({ type: Node, tooltip: "加成模板" })
  15. addModel: Node = null;
  16. protected onLoad() {
  17. }
  18. protected onDestroy() {
  19. //如果该组件有事件自行取消注释
  20. //Framework.event.removeEvent(this);
  21. super.onDestroy();
  22. }
  23. //如果使用了池中的节点,在该函数内归还,该函数会在onDestroy前调用
  24. onClose() {
  25. }
  26. //UI事件处理
  27. private onTouchButton(event: Event) {
  28. //Framework.audio.playEffect(AudioID.Click);
  29. let target: any = event.target;
  30. }
  31. refreshItem(data) {
  32. }
  33. }