import { BaseView } from "../../../lightMVC/core/base/BaseView"; const { ccclass, property } = cc._decorator; @ccclass export default class TipPanel extends BaseView { public drawView(data?: any): void { this.node.setSiblingIndex(100); let label = this.ui.getNode("label"); label.getComponent(cc.Label).string = (data) ? data : ''; this.node.stopAllActions(); this.node.position = new cc.Vec3(0, -100, 0); this.PlayAction(); console.log('tipPanel:**(*******', this.node.getSiblingIndex()); } /** * 播放tip动作 */ public PlayAction(): void { let cb = cc.callFunc(() => { this.closeView(); }) var actions = cc.sequence(cc.moveTo(1, cc.v2(0, 100)), cc.fadeOut(1), cb); this.node.runAction(actions); } public static path(): string { return "/prefabs/TipPanel"; } }