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AQ,CAAC;2CACa;IAGnC;QADC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC;0CACY;IAGlC;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;mDACmB;IAGvC;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;iDACe;IAGjC;QADC,QAAQ,CAAC,oBAAU,CAAC;gDACuC;IAG5D;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;+CACa;IAG/B;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;8CACrB;IApBb,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAsN5B;IAAD,eAAC;KAAA;kBAtNoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["import { DummyLabel, DummyNode, DummyRichText, DummySpriteFrame, DummyWidget } from \"../../common/CCDummyObjects\";\nimport Typewriter from \"../../common/components/Typewriter\";\nimport { AudioManager } from \"simba-cc-audio-manager\";\nimport { CompositeDisposable } from \"simba-eventkit\";\nimport { GameModelManager } from \"../model/GameModelManager\";\nimport { DeepReadonlyObject } from \"simba-utils\";\nimport { IItemTbl } from \"../../config/ItemTbl\";\nimport { UIManager } from \"../../common/gameplay/managers/UIManager\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class VerbView extends cc.Component {\n @property(cc.RichText)\n title: cc.RichText = DummyRichText;\n\n @property(cc.RichText)\n desc: cc.RichText = DummyRichText;\n\n @property(cc.Widget)\n loadingWidget: cc.Widget = DummyWidget;\n\n @property(cc.Node)\n loadingNode: cc.Node = DummyNode;\n\n @property(Typewriter)\n typewriter: Typewriter = undefined as unknown as Typewriter;\n\n @property(cc.Node)\n guideNode: cc.Node = DummyNode;\n\n @property({ type: cc.Node, displayName: \"物品掉落节点\" })\n shopNode: cc.Node = DummyNode;\n\n\n private _title: string;\n private _desc: string;\n private _callback: Function | undefined;\n\n private _intervalPixel = 0;\n\n /**是否正在执行渐显动画 */\n private _isShowAction: boolean = false;\n\n private _loadingNodeX: number;\n private _loadingNodeY: number;\n\n private _disposable: CompositeDisposable = new CompositeDisposable();\n /**标志数据是否已经准备就绪 */\n private _forceClickDataReady: boolean = false;\n\n private _itemSpriteFrame: cc.SpriteFrame = DummySpriteFrame;\n private _showItemCfg: DeepReadonlyObject<IItemTbl> | undefined = undefined;\n itemDropSprFrame: cc.SpriteFrame;\n cfg: DeepReadonlyObject<IItemTbl>;\n\n onLoad() {\n this.loadingNode.x = this.node.getContentSize().width / 2 + 10;\n this._loadingNodeX = this.node.getContentSize().width / 2 + 10;\n this.loadingNode.y = this.node.getContentSize().height / 2 - 36 - this.loadingNode.height / 2;\n this._loadingNodeY = this.node.getContentSize().height / 2 - 36 - this.loadingNode.height / 2;\n this.guideNode.active = false;\n if (CC_DEV) {\n globalThis['VerbView'] = this;\n }\n }\n\n onEnable() {\n this._disposable.add(GameModelManager.ForceClickDataReady.on(this.forceClickDataReady));\n }\n\n onDisable() {\n this.node.off(cc.Node.EventType.TOUCH_END, this.touchEndCallback, this);\n }\n\n testCallback() {\n this.toDating(() => { }, { title: '', desc: '来电了!!!' });\n }\n\n /**到聊天 */\n toChat(info: { title: string, desc: string }) {\n console.log('=====报幕到聊天====');\n AudioManager.stopMusic();\n this.restartNode();\n this._title = info.title;\n this._desc = info.desc;\n this.verbAction();\n }\n\n /**到约会 */\n toDating(callback: Function, info: { title: string, desc: string }) {\n console.log('=====报幕到约会====');\n AudioManager.stopMusic();\n this.restartNode();\n this._title = info.title;\n this._desc = info.desc;\n this._callback = callback;\n this.verbAction();\n }\n\n /**报幕执行动画 */\n verbAction() {\n this._isShowAction = true;\n let sequence = cc.sequence(\n cc.fadeIn(1),\n cc.callFunc(() => {\n if (this._title) {\n //打字机效果\n this.title.node.active = true;\n this.typewriter.showRichTextTyper(this.title, this._title, () => {\n if (this._desc) {\n this.desc.node.active = true;\n this.typewriter.showRichTextTyper(this.desc, this._desc);\n }\n });\n } else {\n this.title.node.active = false;\n if (this._desc) {\n this.desc.node.active = true;\n this.typewriter.showRichTextTyper(this.desc, this._desc);\n }\n }\n //加载提示进入\n this.loadingNode.runAction(cc.moveTo(0.3, cc.v2(this._loadingNodeX - this.loadingNode.getContentSize().width - this._intervalPixel, this._loadingNodeY)));\n }),\n cc.delayTime(1),\n cc.callFunc(() => {\n this.node.on(cc.Node.EventType.TOUCH_END, this.touchEndCallback, this);\n this._isShowAction = false;\n this.guideNode.active = true;\n if (this._callback) {\n this._callback();\n }\n })\n )\n this.node.runAction(sequence);\n }\n\n /**重置node */\n restartNode() {\n this.node.stopAllActions();\n this.node.active = true;\n let wid = this.node.getComponent(cc.Widget);\n wid.updateAlignment();\n this.node.opacity = 0;\n this._callback = undefined;\n this.guideNode.active = false;\n this.loadingNode.x = this.node.getContentSize().width / 2 + 10;\n this.loadingNode.y = this._loadingNodeY;\n this._forceClickDataReady = false;\n this._isShowAction = false;\n }\n\n /**\n * 点击回调\n */\n touchEndCallback = () => {\n //如果有物品掉落信息就清空\n if (this._itemSpriteFrame || this._showItemCfg) {\n this._itemSpriteFrame = DummySpriteFrame;\n this._showItemCfg = undefined;\n }\n /**没有显示动画并且数据没有准备完毕 */\n if (!this._isShowAction && this._forceClickDataReady) {\n let sequence = cc.sequence(\n cc.delayTime(0.5),\n cc.spawn(\n cc.fadeOut(1),\n cc.callFunc(() => {\n this.title.node.active = false;\n this.desc.node.active = false;\n this.guideNode.active = false;\n //加载提示退出\n this.loadingNode.runAction(cc.moveTo(0.3, cc.v2(this._loadingNodeX + this.loadingNode.getContentSize().width + this._intervalPixel, this._loadingNodeY)))\n })\n ),\n cc.callFunc(() => {\n this.node.active = false;\n // AudioManager.resumeMusic();\n })\n )\n this.node.runAction(sequence);\n }\n }\n\n forceClickDataReady = () => {\n this._forceClickDataReady = true;\n console.log('this._forceClickDataReady', this._forceClickDataReady);\n }\n\n setItemDropData(spriteFrame: cc.SpriteFrame, cfg: DeepReadonlyObject<IItemTbl>) {\n this.itemDropSprFrame = spriteFrame;\n this.cfg = cfg;\n this.showItemDrop(spriteFrame, cfg.scaletime, cfg.scale, cfg.delaytime, cfg.collecttime);\n }\n\n showItemDrop(itemSpr: cc.SpriteFrame, dropTime: number, startScale: number, delayTime: number, collectTime: number) {\n this.shopNode.active = true;\n let itemNode = this.shopNode.getChildByName(\"item\");\n let shopSprNode = this.shopNode.getChildByName(\"shopSpr\");\n let itemSprNode = this.shopNode.getChildByName(\"item\").getChildByName(\"itemSpr\");\n let itemBaiSpineNode = this.shopNode.getChildByName(\"item\").getChildByName(\"itemSpine\");\n itemNode.rotation = -90;\n itemSprNode.getComponent(cc.Sprite).spriteFrame = itemSpr;\n cc.tween(itemNode)\n .to(0, { scale: startScale })\n .to(dropTime, { scale: 1, angle: 0 })\n .call(() => {\n itemBaiSpineNode.active = true;\n cc.tween(itemNode)\n .to(delayTime, {})\n .call(() => {\n itemBaiSpineNode.active = false;\n shopSprNode.active = true;\n cc.tween(itemNode)\n .to(collectTime, { scale: 0, angle: -360, x: shopSprNode.x, y: shopSprNode.y })\n .call(() => {\n itemNode.x = 0;\n itemNode.y = 0;\n this.shopNode.active = false;\n shopSprNode.active = false;\n UIManager.showSceneToast(\"记得去卧室查看它的故事呦~~\");\n }).start();\n }).start();\n }).start();\n }\n}\n"]}