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CPureView } from \"../../../../common/classbase/CCViewBase\";\nimport { DirectionType } from \"../../../Enums\";\nimport { RegView } from \"../../PresenterCCViewFactory\";\nimport { GuideView, GuideViewProps, GuideViewType } from \"../type/GuideView\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\n@RegView(GuideViewType, \"prefab/ui/GuideView\")\nexport default class GuideViewImpl extends CCPureView<GuideViewProps> implements GuideView {\n\n @property({ type: cc.Node, visible: true, displayName: \"maskNode\", tooltip: \"蒙板节点\" })\n maskNode: cc.Node = new cc.Node;\n @property({ type: cc.Node, visible: true, displayName: \"maskSprNode\", tooltip: \"蒙板图片节点\" })\n maskSprNode: cc.Node = new cc.Node;\n @property({ type: cc.Node, visible: true, displayName: \"frameSprNode\", tooltip: \"边框节点\" })\n frameSprNode: cc.Node = new cc.Node;\n @property({ type: cc.Node, visible: true, displayName: \"guideBtn\", tooltip: \"引导按钮\" })\n guideBtn: cc.Node = new cc.Node;\n @property({ type: cc.Node, visible: true, displayName: \"arrowNode\", tooltip: \"箭头节点\" })\n arrowNode: cc.Node = new cc.Node;\n\n onGuideClick() {\n this._props.clickCallFunc();\n }\n\n setGuideInfo(x: number, y: number, w: number, h: number, direction: DirectionType) {\n this.maskSprNode.getComponent(cc.Widget).updateAlignment();\n w += 46;\n h += 46;\n let pos: cc.Vec3 = cc.v3(x, y, 0);\n let srcSize: cc.Size = cc.size(w, h);\n let clickSize: cc.Size = cc.size(w + 20, h + 20);\n\n this.maskNode.position = pos;\n this.frameSprNode.position = pos;\n this.guideBtn.position = pos;\n\n this.maskNode.setContentSize(srcSize);\n this.frameSprNode.setContentSize(clickSize);\n this.guideBtn.setContentSize(clickSize);\n\n let r = 0;\n\n let g = this.arrowNode.height / 2;\n let py = y;\n let px = x;\n switch (direction) {\n case DirectionType.UP:\n {\n r = 180;\n py += (h / 2 + g) * (-1);\n px = x;\n }\n break;\n case DirectionType.DOWM:\n {\n r = 0;\n py += h / 2 + g;\n px = x;\n }\n break;\n case DirectionType.LEFT:\n {\n r = 90;\n py = y;\n px += (w / 2 + g) * (-1);\n\n }\n break;\n case DirectionType.RIGHT:\n {\n r = -90;\n py = y;\n px += w / 2 + g;\n }\n break;\n }\n this.arrowNode.angle = r;\n this.arrowNode.x = px;\n this.arrowNode.y = py;\n this.maskSprNode.getComponent(cc.Widget).updateAlignment();\n }\n}\n"]}