123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- import { _decorator, Label, Node, tween, UIOpacity } from 'cc';
- import { BaseView } from '../../../framework/layer/BaseView';
- import { StringUtil } from '../../../framework/util/StringUtil';
- import { CommonItem } from '../common/CommonItem';
- const { ccclass, property } = _decorator;
- @ccclass('EquipUpdate')
- export class EquipUpdate extends BaseView {
- @property({ type: Label, tooltip: "关闭提示" })
- closeTips: Label = null;
- @property({ type: Label, tooltip: "标题" })
- titieTx: Label = null;
- // @property({ type: Label, tooltip: "装备名" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "装备节点" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "当前等级" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "目标等级" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "当前属性" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "目标属性" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "等级箭头" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "属性箭头" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "经验值标题" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "经验值进度" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "经验值文字" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "标题" })
- // titieTx: Label = null;
- // @property({ type: Label, tooltip: "标题" })
- // titieTx: Label = null;
- protected onLoad() {
- super.onLoad();
- this.closeTips.string = StringUtil.getLanguageData('点击空白关闭');
- this.titieTx.string = StringUtil.getLanguageData('装备升级');
- this.closeTips.node.getComponent(UIOpacity).opacity = 0;
- }
- protected onDestroy() {
-
- }
- //UI开打时会调用,如果有初始化代码应该放到此函数
- onOpen(data) {
- tween(this.closeTips.node.getComponent(UIOpacity))
- .to(1, { opacity: 255 })
- .to(1.2, { opacity: 10 })
- .union()
- .repeatForever()
- .start()
- }
- //UI关闭时会调用,该函数在onDestroy前调用
- onClose() {
- }
-
- //框架管理UI层级时会调用,可根据UI情况修改
- onShow() {
- super.onShow();
- }
-
- //框架管理UI层级时会调用,可根据UI情况修改
- onHide() {
- super.onHide();
- }
- //UI事件处理
- private onTouchButton(event: Event) {
- //Framework.audio.playEffect(AudioID.Click);
- let target: any = event.target;
- }
- onEventList(item, idx) {
- item.getComponent(CommonItem).refreshItem();
- }
- }
|