import { GuideVO } from "../../data/module/GuideData"; /** * @description 新手引导 * @author 邹勇 */ const { ccclass, property } = cc._decorator; @ccclass export default class Guide extends cc.Component { @property({ type: cc.Node, displayName: "显示区域" }) node_display: cc.Node = null; @property({ type: cc.Node, displayName: "点击区域" }) node_click: cc.Node = null; @property(cc.Node) node_block: cc.Node = null; private guides: GuideVO[]; private crtStep: number; private crtGuide: GuideVO; onLoad() { } start(){ if(gData.guideData.crtID == null){ this.node.destroy(); return; } this.guides = gData.guideData.getGuidesByID(gData.guideData.crtID); this.crtStep = -1; this.nextStep(); } private nextStep() { this.crtStep++; this.crtGuide = this.guides[this.crtStep]; this.updateGuide(); } private updateGuide(){ } }