From 0bda6904fa6e964c83011bb5c7c1cff645fc34e2 Mon Sep 17 00:00:00 2001 From: richarjiang Date: Wed, 11 Mar 2026 10:35:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1SDK?= =?UTF-8?q?=E5=92=8C=E5=85=B3=E5=8D=A1=E9=A1=B5=E9=9D=A2=EF=BC=8C=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E9=A2=84=E5=88=B6=E4=BD=93=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 WxSDK 微信SDK工具类 - 新增 PageLevel 关卡选择页面组件 - 将 prefabs 目录从 resources 移至根目录 - 更新 ViewManager 支持预制体属性引用 - 添加 BaseView 页面基类 Co-Authored-By: Claude Opus 4.6 --- assets/main.scene | 8 + assets/main.ts | 37 +- assets/{resources => }/prefabs.meta | 0 .../{resources => }/prefabs/PageHome.prefab | 0 .../prefabs/PageHome.prefab.meta | 0 assets/{resources => }/prefabs/PageHome.ts | 17 +- .../{resources => }/prefabs/PageHome.ts.meta | 0 .../{resources => }/prefabs/PageLevel.prefab | 2242 +++++------------ .../prefabs/PageLevel.prefab.meta | 0 assets/prefabs/PageLevel.ts | 221 ++ .../{resources => }/prefabs/PageLevel.ts.meta | 0 assets/resources/prefabs/PageLevel.ts | 39 - assets/scripts/core/BaseView.ts | 4 +- assets/scripts/core/ViewManager.ts | 49 +- assets/scripts/utils/WxSDK.ts | 148 ++ assets/scripts/utils/WxSDK.ts.meta | 9 + package-lock.json | 18 + package.json | 3 + 18 files changed, 1149 insertions(+), 1646 deletions(-) rename assets/{resources => }/prefabs.meta (100%) rename assets/{resources => }/prefabs/PageHome.prefab (100%) rename assets/{resources => }/prefabs/PageHome.prefab.meta (100%) rename assets/{resources => }/prefabs/PageHome.ts (77%) rename assets/{resources => }/prefabs/PageHome.ts.meta (100%) rename assets/{resources => }/prefabs/PageLevel.prefab (69%) rename assets/{resources => }/prefabs/PageLevel.prefab.meta (100%) create mode 100644 assets/prefabs/PageLevel.ts rename assets/{resources => }/prefabs/PageLevel.ts.meta (100%) delete mode 100644 assets/resources/prefabs/PageLevel.ts create mode 100644 assets/scripts/utils/WxSDK.ts create mode 100644 assets/scripts/utils/WxSDK.ts.meta create mode 100644 package-lock.json diff --git a/assets/main.scene b/assets/main.scene index 015452c..b8bbb88 100644 --- a/assets/main.scene +++ b/assets/main.scene @@ -399,6 +399,14 @@ }, "_enabled": true, "__prefab": null, + "pageHomePrefab": { + "__uuid__": "ae6e1ab4-19be-4cb3-90e4-9a1f3204a0fd", + "__expectedType__": "cc.Prefab" + }, + "pageLevelPrefab": { + "__uuid__": "8611dbdc-4749-49f1-97ca-aedae3d16320", + "__expectedType__": "cc.Prefab" + }, "_id": "c2b3nbzv9JuZmP2jxQyN72" }, { diff --git a/assets/main.ts b/assets/main.ts index bcca8ff..51f5e8d 100644 --- a/assets/main.ts +++ b/assets/main.ts @@ -1,6 +1,6 @@ -import { _decorator, Component } from 'cc'; +import { _decorator, Component, Prefab } from 'cc'; import { ViewManager } from './scripts/core/ViewManager'; -const { ccclass } = _decorator; +const { ccclass, property } = _decorator; /** * 主入口脚本 @@ -8,6 +8,12 @@ const { ccclass } = _decorator; */ @ccclass('main') export class main extends Component { + @property({ type: Prefab, tooltip: '首页预制体' }) + pageHomePrefab: Prefab | null = null; + + @property({ type: Prefab, tooltip: '关卡页面预制体' }) + pageLevelPrefab: Prefab | null = null; + /** * onLoad 比 start 更早执行 * 确保 ViewManager 在 PageLoading.start() 之前初始化 @@ -23,18 +29,21 @@ export class main extends Component { // 初始化 ViewManager,绑定 Canvas 作为页面容器 ViewManager.instance.init(this.node); - // 注册页面配置 - ViewManager.instance.register('PageHome', { - prefabPath: 'prefabs/PageHome', - cache: true, - zIndex: 0 - }); + // 注册页面配置(通过编辑器属性引用预制体) + if (this.pageHomePrefab) { + ViewManager.instance.register('PageHome', { + prefab: this.pageHomePrefab, + cache: true, + zIndex: 0 + }); + } - // 注册关卡页面 - ViewManager.instance.register('PageLevel', { - prefabPath: 'prefabs/PageLevel', - cache: true, - zIndex: 1 - }); + if (this.pageLevelPrefab) { + ViewManager.instance.register('PageLevel', { + prefab: this.pageLevelPrefab, + cache: true, + zIndex: 1 + }); + } } } diff --git a/assets/resources/prefabs.meta b/assets/prefabs.meta similarity index 100% rename from assets/resources/prefabs.meta rename to assets/prefabs.meta diff --git a/assets/resources/prefabs/PageHome.prefab b/assets/prefabs/PageHome.prefab similarity index 100% rename from assets/resources/prefabs/PageHome.prefab rename to assets/prefabs/PageHome.prefab diff --git a/assets/resources/prefabs/PageHome.prefab.meta b/assets/prefabs/PageHome.prefab.meta similarity index 100% rename from assets/resources/prefabs/PageHome.prefab.meta rename to assets/prefabs/PageHome.prefab.meta diff --git a/assets/resources/prefabs/PageHome.ts b/assets/prefabs/PageHome.ts similarity index 77% rename from assets/resources/prefabs/PageHome.ts rename to assets/prefabs/PageHome.ts index 0e0db3b..4ae6976 100644 --- a/assets/resources/prefabs/PageHome.ts +++ b/assets/prefabs/PageHome.ts @@ -1,6 +1,7 @@ import { _decorator, Node, Button } from 'cc'; -import { BaseView } from '../../scripts/core/BaseView'; -import { ViewManager } from '../../scripts/core/ViewManager'; +import { BaseView } from 'db://assets/scripts/core/BaseView'; +import { ViewManager } from 'db://assets/scripts/core/ViewManager'; +import { WxSDK } from 'db://assets/scripts/utils/WxSDK'; const { ccclass, property } = _decorator; /** @@ -18,6 +19,18 @@ export class PageHome extends BaseView { onViewLoad(): void { console.log('[PageHome] onViewLoad'); this._initButtons(); + this._initWxShare(); + } + + /** + * 初始化微信分享功能 + */ + private _initWxShare(): void { + WxSDK.initShare({ + title: '写英语', + imageUrl: '', + query: '' + }); } /** diff --git a/assets/resources/prefabs/PageHome.ts.meta b/assets/prefabs/PageHome.ts.meta similarity index 100% rename from assets/resources/prefabs/PageHome.ts.meta rename to assets/prefabs/PageHome.ts.meta diff --git a/assets/resources/prefabs/PageLevel.prefab b/assets/prefabs/PageLevel.prefab similarity index 69% rename from assets/resources/prefabs/PageLevel.prefab rename to assets/prefabs/PageLevel.prefab index 5046212..138c1f6 100644 --- a/assets/resources/prefabs/PageLevel.prefab +++ b/assets/prefabs/PageLevel.prefab @@ -28,23 +28,26 @@ "__id__": 18 }, { - "__id__": 118 + "__id__": 60 + }, + { + "__id__": 76 } ], "_active": true, "_components": [ { - "__id__": 132 + "__id__": 96 }, { - "__id__": 134 + "__id__": 98 }, { - "__id__": 136 + "__id__": 100 } ], "_prefab": { - "__id__": 138 + "__id__": 102 }, "_lpos": { "__type__": "cc.Vec3", @@ -426,14 +429,14 @@ "_active": true, "_components": [ { - "__id__": 113 + "__id__": 55 }, { - "__id__": 115 + "__id__": 57 } ], "_prefab": { - "__id__": 117 + "__id__": 59 }, "_lpos": { "__type__": "cc.Vec3", @@ -616,20 +619,20 @@ "__id__": 32 }, { - "__id__": 98 + "__id__": 38 } ], "_active": true, "_components": [ { - "__id__": 108 + "__id__": 50 }, { - "__id__": 110 + "__id__": 52 } ], "_prefab": { - "__id__": 112 + "__id__": 54 }, "_lpos": { "__type__": "cc.Vec3", @@ -827,582 +830,22 @@ "_parent": { "__id__": 25 }, - "_children": [ + "_children": [], + "_active": true, + "_components": [ { "__id__": 33 }, - { - "__id__": 53 - }, - { - "__id__": 73 - } - ], - "_active": true, - "_components": [ - { - "__id__": 93 - }, - { - "__id__": 95 - } - ], - "_prefab": { - "__id__": 97 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 47.531, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.Node", - "_name": "Input1", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 32 - }, - "_children": [ - { - "__id__": 34 - }, - { - "__id__": 40 - } - ], - "_active": true, - "_components": [ - { - "__id__": 46 - }, - { - "__id__": 48 - }, - { - "__id__": 50 - } - ], - "_prefab": { - "__id__": 52 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -60, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.Node", - "_name": "TEXT_LABEL", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 33 - }, - "_children": [], - "_active": false, - "_components": [ { "__id__": 35 - }, - { - "__id__": 37 } ], "_prefab": { - "__id__": 39 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -48, - "y": 50, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 34 - }, - "_enabled": true, - "__prefab": { - "__id__": 36 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 98, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "eeaYFpgkxERoSIe3de28dr" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 34 - }, - "_enabled": true, - "__prefab": { - "__id__": 38 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_string": "", - "_horizontalAlign": 0, - "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 1, - "_enableWrapText": false, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "e7XibgTnNCf5UOhz5xM8vP" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "11XPpIPmVJ25+/thbDYLUc", - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "PLACEHOLDER_LABEL", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 33 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 41 - }, - { - "__id__": 43 - } - ], - "_prefab": { - "__id__": 45 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -48, - "y": 50, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 40 - }, - "_enabled": true, - "__prefab": { - "__id__": 42 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 98, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "4c/wKO2pRB269pKlCEU185" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 40 - }, - "_enabled": true, - "__prefab": { - "__id__": 44 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 187, - "g": 187, - "b": 187, - "a": 255 - }, - "_string": "填写答案", - "_horizontalAlign": 0, - "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 1, - "_enableWrapText": false, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "c4dTAqLbRLsIeauyg0OV8p" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "43UTUNAwdO7rFB4vGsaZ5a", - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 33 - }, - "_enabled": true, - "__prefab": { - "__id__": 47 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "1eHld/ifFGaY6fliU8LFfi" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 33 - }, - "_enabled": true, - "__prefab": { - "__id__": 49 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 1, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "feEHEaYGNJK75ldcFa8HYg" - }, - { - "__type__": "cc.EditBox", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 33 - }, - "_enabled": true, - "__prefab": { - "__id__": 51 - }, - "editingDidBegan": [], - "textChanged": [], - "editingDidEnded": [], - "editingReturn": [], - "_textLabel": { "__id__": 37 }, - "_placeholderLabel": { - "__id__": 43 - }, - "_returnType": 0, - "_string": "", - "_tabIndex": 0, - "_backgroundImage": null, - "_inputFlag": 5, - "_inputMode": 6, - "_maxLength": 8, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "02xu7B+GtJCoWV6l3iQuzJ" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "03pU7//sxEcI//olaHgI0r", - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "Input2", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 32 - }, - "_children": [ - { - "__id__": 54 - }, - { - "__id__": 60 - } - ], - "_active": true, - "_components": [ - { - "__id__": 66 - }, - { - "__id__": 68 - }, - { - "__id__": 70 - } - ], - "_prefab": { - "__id__": 72 - }, "_lpos": { "__type__": "cc.Vec3", - "x": 60, + "x": -110, "y": 0, "z": 0 }, @@ -1429,936 +872,6 @@ }, "_id": "" }, - { - "__type__": "cc.Node", - "_name": "TEXT_LABEL", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 53 - }, - "_children": [], - "_active": false, - "_components": [ - { - "__id__": 55 - }, - { - "__id__": 57 - } - ], - "_prefab": { - "__id__": 59 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -48, - "y": 50, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 54 - }, - "_enabled": true, - "__prefab": { - "__id__": 56 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 98, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "8ep3HVkdRGxowmhF7imA3+" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 54 - }, - "_enabled": true, - "__prefab": { - "__id__": 58 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_string": "", - "_horizontalAlign": 0, - "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 1, - "_enableWrapText": false, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "73MAjHjkNBJKJw2EoP8iBd" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "0bNl8aXhlNlorMlDBrCNNC", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "PLACEHOLDER_LABEL", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 53 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 61 - }, - { - "__id__": 63 - } - ], - "_prefab": { - "__id__": 65 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -48, - "y": 50, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 60 - }, - "_enabled": true, - "__prefab": { - "__id__": 62 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 98, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "fdwNN+6AlL07Rr4wZt/TSk" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 60 - }, - "_enabled": true, - "__prefab": { - "__id__": 64 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 187, - "g": 187, - "b": 187, - "a": 255 - }, - "_string": "填写答案", - "_horizontalAlign": 0, - "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 1, - "_enableWrapText": false, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "7ag14s9FNN77mV/3gC0ZKM" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "d5EEQOf05AdJZAgE65UlOM", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 53 - }, - "_enabled": true, - "__prefab": { - "__id__": 67 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "a2Qz6NHJ1GzoC9o9btFfFm" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 53 - }, - "_enabled": true, - "__prefab": { - "__id__": 69 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 1, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "51NPvBm3RGpJIXGEU9SfJZ" - }, - { - "__type__": "cc.EditBox", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 53 - }, - "_enabled": true, - "__prefab": { - "__id__": 71 - }, - "editingDidBegan": [], - "textChanged": [], - "editingDidEnded": [], - "editingReturn": [], - "_textLabel": { - "__id__": 57 - }, - "_placeholderLabel": { - "__id__": 63 - }, - "_returnType": 0, - "_string": "", - "_tabIndex": 0, - "_backgroundImage": null, - "_inputFlag": 5, - "_inputMode": 6, - "_maxLength": 8, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "a9h+0GPnpL9rV7auDLBlob" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "12fVl35AdIarSOZmPUYuSP", - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "Input3", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 32 - }, - "_children": [ - { - "__id__": 74 - }, - { - "__id__": 80 - } - ], - "_active": false, - "_components": [ - { - "__id__": 86 - }, - { - "__id__": 88 - }, - { - "__id__": 90 - } - ], - "_prefab": { - "__id__": 92 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 120, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.Node", - "_name": "TEXT_LABEL", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 73 - }, - "_children": [], - "_active": false, - "_components": [ - { - "__id__": 75 - }, - { - "__id__": 77 - } - ], - "_prefab": { - "__id__": 79 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -48, - "y": 50, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 74 - }, - "_enabled": true, - "__prefab": { - "__id__": 76 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 98, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "9fJvmjwYNJZYGWCPp0VaB2" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 74 - }, - "_enabled": true, - "__prefab": { - "__id__": 78 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_string": "", - "_horizontalAlign": 0, - "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 1, - "_enableWrapText": false, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "18BjX9dWlJxKRWba5StKvL" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "e1VUvBLRdORIDEAxRQdv+Z", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "PLACEHOLDER_LABEL", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 73 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 81 - }, - { - "__id__": 83 - } - ], - "_prefab": { - "__id__": 85 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -48, - "y": 50, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 80 - }, - "_enabled": true, - "__prefab": { - "__id__": 82 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 98, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "57BUFpCXhIgpUqdvaS0Wzh" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 80 - }, - "_enabled": true, - "__prefab": { - "__id__": 84 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 187, - "g": 187, - "b": 187, - "a": 255 - }, - "_string": "填写答案", - "_horizontalAlign": 0, - "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 1, - "_enableWrapText": false, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "f44aRzWTJJKIRhaUNXEaDd" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "6fFJ5LbRJES5d8ZziyK+PS", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 73 - }, - "_enabled": true, - "__prefab": { - "__id__": 87 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "23nWAABipNkoYc5yt1Xs7w" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 73 - }, - "_enabled": true, - "__prefab": { - "__id__": 89 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 1, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "096dzxlopI1LxXxkQ/CY8J" - }, - { - "__type__": "cc.EditBox", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 73 - }, - "_enabled": true, - "__prefab": { - "__id__": 91 - }, - "editingDidBegan": [], - "textChanged": [], - "editingDidEnded": [], - "editingReturn": [], - "_textLabel": { - "__id__": 77 - }, - "_placeholderLabel": { - "__id__": 83 - }, - "_returnType": 0, - "_string": "", - "_tabIndex": 0, - "_backgroundImage": null, - "_inputFlag": 5, - "_inputMode": 6, - "_maxLength": 8, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "7ch0RcYPtN4ruXmvpZqwpi" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "52Mx5EqHZMbaQb541EtPhy", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, { "__type__": "cc.UITransform", "_name": "", @@ -2369,11 +882,11 @@ }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 34 }, "_contentSize": { "__type__": "cc.Size", - "width": 220, + "width": -20, "height": 100 }, "_anchorPoint": { @@ -2397,7 +910,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 96 + "__id__": 36 }, "_resizeMode": 1, "_layoutType": 1, @@ -2434,6 +947,8 @@ "__id__": 0 }, "fileId": "71gWlovDJER4gFvaCwzo/Q", + "instance": null, + "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { @@ -2446,17 +961,20 @@ }, "_children": [ { - "__id__": 99 + "__id__": 39 } ], - "_active": true, + "_active": false, "_components": [ { - "__id__": 105 + "__id__": 45 + }, + { + "__id__": 47 } ], "_prefab": { - "__id__": 107 + "__id__": 49 }, "_lpos": { "__type__": "cc.Vec3", @@ -2493,20 +1011,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 98 + "__id__": 38 }, "_children": [], "_active": true, "_components": [ { - "__id__": 100 + "__id__": 40 }, { - "__id__": 102 + "__id__": 42 } ], "_prefab": { - "__id__": 104 + "__id__": 44 }, "_lpos": { "__type__": "cc.Vec3", @@ -2543,11 +1061,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 39 }, "_enabled": true, "__prefab": { - "__id__": 101 + "__id__": 41 }, "_contentSize": { "__type__": "cc.Size", @@ -2571,11 +1089,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 39 }, "_enabled": true, "__prefab": { - "__id__": 103 + "__id__": 43 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2652,11 +1170,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 38 }, "_enabled": true, "__prefab": { - "__id__": 106 + "__id__": 46 }, "_contentSize": { "__type__": "cc.Size", @@ -2674,6 +1192,62 @@ "__type__": "cc.CompPrefabInfo", "fileId": "9eoyMarC5Ox6M4yCVeS+Ds" }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 38 + }, + "_enabled": true, + "__prefab": { + "__id__": 48 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": null, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e7TzHhWSlCHJw9Et5o0NKK" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -2697,7 +1271,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 109 + "__id__": 51 }, "_contentSize": { "__type__": "cc.Size", @@ -2725,7 +1299,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 111 + "__id__": 53 }, "_resizeMode": 0, "_layoutType": 1, @@ -2762,6 +1336,8 @@ "__id__": 0 }, "fileId": "4deoRli6lG4Le/Y/sMCn6i", + "instance": null, + "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { @@ -2774,7 +1350,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 114 + "__id__": 56 }, "_contentSize": { "__type__": "cc.Size", @@ -2802,7 +1378,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 116 + "__id__": 58 }, "_alignFlags": 1, "_target": null, @@ -2851,23 +1427,26 @@ }, "_children": [ { - "__id__": 119 + "__id__": 61 } ], "_active": true, "_components": [ { - "__id__": 125 + "__id__": 67 }, { - "__id__": 127 + "__id__": 69 }, { - "__id__": 129 + "__id__": 71 + }, + { + "__id__": 73 } ], "_prefab": { - "__id__": 131 + "__id__": 75 }, "_lpos": { "__type__": "cc.Vec3", @@ -2904,20 +1483,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 118 + "__id__": 60 }, "_children": [], "_active": true, "_components": [ { - "__id__": 120 + "__id__": 62 }, { - "__id__": 122 + "__id__": 64 } ], "_prefab": { - "__id__": 124 + "__id__": 66 }, "_lpos": { "__type__": "cc.Vec3", @@ -2954,11 +1533,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 119 + "__id__": 61 }, "_enabled": true, "__prefab": { - "__id__": 121 + "__id__": 63 }, "_contentSize": { "__type__": "cc.Size", @@ -2982,11 +1561,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 119 + "__id__": 61 }, "_enabled": true, "__prefab": { - "__id__": 123 + "__id__": 65 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3063,11 +1642,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 118 + "__id__": 60 }, "_enabled": true, "__prefab": { - "__id__": 126 + "__id__": 68 }, "_contentSize": { "__type__": "cc.Size", @@ -3091,11 +1670,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 118 + "__id__": 60 }, "_enabled": true, "__prefab": { - "__id__": 128 + "__id__": 70 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3136,11 +1715,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 118 + "__id__": 60 }, "_enabled": true, "__prefab": { - "__id__": 130 + "__id__": 72 }, "_alignFlags": 4, "_target": null, @@ -3166,6 +1745,62 @@ "__type__": "cc.CompPrefabInfo", "fileId": "5ctGaR1hJA1r7ROWouQNte" }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 60 + }, + "_enabled": true, + "__prefab": { + "__id__": 74 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": null, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "57JHirrjFI9p3TG7+tBsfL" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -3179,6 +1814,502 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "Input", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 77 + }, + { + "__id__": 83 + } + ], + "_active": true, + "_components": [ + { + "__id__": 89 + }, + { + "__id__": 91 + }, + { + "__id__": 93 + } + ], + "_prefab": { + "__id__": 95 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 766.526, + "y": -223.316, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "TEXT_LABEL", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 78 + }, + { + "__id__": 80 + } + ], + "_prefab": { + "__id__": 82 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -48, + "y": 50, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 77 + }, + "_enabled": true, + "__prefab": { + "__id__": 79 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c8Pj91CnhHvrLJH41vt5ov" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 77 + }, + "_enabled": true, + "__prefab": { + "__id__": 81 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 40, + "_fontSize": 100, + "_fontFamily": "Arial", + "_lineHeight": 100, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "42zsXTANRKcKGmPQE0N9NT" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f3Wc8HXp1K7KPDiFb0UnSc", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "PLACEHOLDER_LABEL", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 84 + }, + { + "__id__": 86 + } + ], + "_prefab": { + "__id__": 88 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -48, + "y": 50, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 83 + }, + "_enabled": true, + "__prefab": { + "__id__": 85 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "22Bm3FtkdAS6HckEfX+3s8" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 83 + }, + "_enabled": true, + "__prefab": { + "__id__": 87 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 187, + "g": 187, + "b": 187, + "a": 255 + }, + "_string": "填写答案", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 20, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7cxlZcUrhHFoUguXMaedBv" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "91IZsZt4REgr5k+OUNkEA4", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 76 + }, + "_enabled": true, + "__prefab": { + "__id__": 90 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5cjnrYt3BGFLvT+iuGVBuy" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 76 + }, + "_enabled": true, + "__prefab": { + "__id__": 92 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "81/YJtFFpDiqbn4oxixboO" + }, + { + "__type__": "cc.EditBox", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 76 + }, + "_enabled": true, + "__prefab": { + "__id__": 94 + }, + "editingDidBegan": [], + "textChanged": [], + "editingDidEnded": [], + "editingReturn": [], + "_textLabel": { + "__id__": 80 + }, + "_placeholderLabel": { + "__id__": 86 + }, + "_returnType": 0, + "_string": "", + "_tabIndex": 0, + "_backgroundImage": null, + "_inputFlag": 5, + "_inputMode": 6, + "_maxLength": 1, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "55tQUmNi1FRZavesN/1y9N" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cdRkCNoyBEpqkkDWFDIEg0", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -3189,7 +2320,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 133 + "__id__": 97 }, "_contentSize": { "__type__": "cc.Size", @@ -3217,7 +2348,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 135 + "__id__": 99 }, "_alignFlags": 0, "_target": null, @@ -3253,8 +2384,21 @@ }, "_enabled": true, "__prefab": { - "__id__": 137 + "__id__": 101 }, + "inputLayout": { + "__id__": 32 + }, + "submitButton": { + "__id__": 38 + }, + "inputTemplate": { + "__id__": 76 + }, + "actionNode": { + "__id__": 25 + }, + "defaultInputCount": 2, "_id": "" }, { diff --git a/assets/resources/prefabs/PageLevel.prefab.meta b/assets/prefabs/PageLevel.prefab.meta similarity index 100% rename from assets/resources/prefabs/PageLevel.prefab.meta rename to assets/prefabs/PageLevel.prefab.meta diff --git a/assets/prefabs/PageLevel.ts b/assets/prefabs/PageLevel.ts new file mode 100644 index 0000000..7658bc1 --- /dev/null +++ b/assets/prefabs/PageLevel.ts @@ -0,0 +1,221 @@ +import { _decorator, Node, EditBox, instantiate, Vec3 } from 'cc'; +import { BaseView } from 'db://assets/scripts/core/BaseView'; +const { ccclass, property } = _decorator; + +/** + * 关卡配置接口 + */ +export interface LevelConfig { + /** 需要的输入框数量 */ + inputCount: number; + /** 题目文本 */ + questionText?: string; +} + +/** + * 关卡页面组件 + * 继承 BaseView,实现页面生命周期 + */ +@ccclass('PageLevel') +export class PageLevel extends BaseView { + // ========== 节点引用 ========== + @property(Node) + inputLayout: Node | null = null; + + @property(Node) + submitButton: Node | null = null; + + @property(Node) + inputTemplate: Node | null = null; + + @property(Node) + actionNode: Node | null = null; + + // ========== 配置属性 ========== + @property({ + tooltip: '默认输入框数量', + min: 1, + max: 10 + }) + defaultInputCount: number = 2; + + // ========== 内部状态 ========== + /** 当前输入框数量 */ + private _inputCount: number = 0; + + /** 当前创建的输入框节点数组 */ + private _inputNodes: Node[] = []; + + /** 当前关卡配置 */ + private _levelConfig: LevelConfig | null = null; + + /** + * 页面首次加载时调用 + */ + onViewLoad(): void { + console.log('[PageLevel] onViewLoad'); + this.initLevel(); + } + + /** + * 页面每次显示时调用 + */ + onViewShow(): void { + console.log('[PageLevel] onViewShow'); + } + + /** + * 页面隐藏时调用 + */ + onViewHide(): void { + console.log('[PageLevel] onViewHide'); + } + + /** + * 页面销毁时调用 + */ + onViewDestroy(): void { + console.log('[PageLevel] onViewDestroy'); + this.clearInputNodes(); + } + + /** + * 设置关卡配置 + */ + setLevelConfig(config: LevelConfig): void { + this._levelConfig = config; + this.initLevel(); + } + + /** + * 初始化关卡 + */ + private initLevel(): void { + // 使用配置或默认值 + const inputCount = this._levelConfig?.inputCount ?? this.defaultInputCount; + + // 隐藏提交按钮 + if (this.submitButton) { + this.submitButton.active = false; + } + + // 创建输入框 + this.createInputs(inputCount); + } + + /** + * 动态创建输入框 + */ + private createInputs(count: number): void { + if (!this.inputLayout || !this.inputTemplate) { + console.error('[PageLevel] inputLayout 或 inputTemplate 未设置'); + return; + } + + // 清理现有输入框 + this.clearInputNodes(); + + this._inputCount = count; + + // 隐藏模板节点 + this.inputTemplate.active = false; + + // 创建指定数量的输入框 + for (let i = 0; i < count; i++) { + const inputNode = instantiate(this.inputTemplate); + inputNode.active = true; + inputNode.name = `input${i}`; + + // 设置位置(Layout 会自动排列) + inputNode.setPosition(new Vec3(0, 0, 0)); + + // 获取 EditBox 组件并监听事件 + const editBox = inputNode.getComponent(EditBox); + if (editBox) { + // 清空输入内容 + editBox.string = ''; + // 监听文本变化事件 + editBox.node.on(EditBox.EventType.TEXT_CHANGED, this.onInputTextChanged, this); + // 监听编辑结束事件 + editBox.node.on(EditBox.EventType.EDITING_DID_ENDED, this.onInputEditingEnded, this); + } + + this.inputLayout.addChild(inputNode); + this._inputNodes.push(inputNode); + } + + console.log(`[PageLevel] 创建了 ${count} 个输入框`); + } + + /** + * 清理所有输入框节点 + */ + private clearInputNodes(): void { + for (const node of this._inputNodes) { + if (node.isValid) { + node.destroy(); + } + } + this._inputNodes = []; + this._inputCount = 0; + } + + /** + * 检查所有输入框是否都已填写 + */ + private checkAllInputsFilled(): void { + let allFilled = true; + + for (const node of this._inputNodes) { + const editBox = node.getComponent(EditBox); + if (!editBox || editBox.string.trim() === '') { + allFilled = false; + break; + } + } + + // 根据填写状态显示/隐藏提交按钮 + if (this.submitButton) { + this.submitButton.active = allFilled; + } + + console.log(`[PageLevel] 检查输入状态: ${allFilled ? '全部已填写' : '未全部填写'}`); + } + + /** + * 获取所有输入框的值 + */ + getInputValues(): string[] { + const values: string[] = []; + for (const node of this._inputNodes) { + const editBox = node.getComponent(EditBox); + values.push(editBox?.string ?? ''); + } + return values; + } + + /** + * 获取拼接后的答案字符串 + */ + getAnswer(): string { + return this.getInputValues().join(''); + } + + // ========== EditBox 事件回调 ========== + + /** + * 输入框文本变化回调 + */ + private onInputTextChanged(editBox: EditBox): void { + this.checkAllInputsFilled(); + } + + /** + * 输入框编辑结束回调 + */ + private onInputEditingEnded(editBox: EditBox): void { + this.checkAllInputsFilled(); + } +} + + diff --git a/assets/resources/prefabs/PageLevel.ts.meta b/assets/prefabs/PageLevel.ts.meta similarity index 100% rename from assets/resources/prefabs/PageLevel.ts.meta rename to assets/prefabs/PageLevel.ts.meta diff --git a/assets/resources/prefabs/PageLevel.ts b/assets/resources/prefabs/PageLevel.ts deleted file mode 100644 index 6030358..0000000 --- a/assets/resources/prefabs/PageLevel.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { _decorator } from 'cc'; -import { BaseView } from '../../scripts/core/BaseView'; -const { ccclass } = _decorator; - -/** - * 关卡页面组件 - * 继承 BaseView,实现页面生命周期 - */ -@ccclass('PageLevel') -export class PageLevel extends BaseView { - /** - * 页面首次加载时调用 - */ - onViewLoad(): void { - console.log('[PageLevel] onViewLoad'); - } - - /** - * 页面每次显示时调用 - */ - onViewShow(): void { - console.log('[PageLevel] onViewShow'); - } - - /** - * 页面隐藏时调用 - */ - onViewHide(): void { - console.log('[PageLevel] onViewHide'); - } - - /** - * 页面销毁时调用 - */ - onViewDestroy(): void { - console.log('[PageLevel] onViewDestroy'); - } -} - diff --git a/assets/scripts/core/BaseView.ts b/assets/scripts/core/BaseView.ts index 6da6bf9..2adc8e8 100644 --- a/assets/scripts/core/BaseView.ts +++ b/assets/scripts/core/BaseView.ts @@ -1,11 +1,11 @@ -import { _decorator, Component } from 'cc'; +import { _decorator, Component, Prefab } from 'cc'; const { ccclass } = _decorator; /** * 页面配置接口 */ export interface ViewConfig { - prefabPath: string; // 相对于 resources 的路径 + prefab: Prefab; // 预制体引用(主包资源) cache?: boolean; // 是否缓存页面,默认 true zIndex?: number; // 层级,默认 0 } diff --git a/assets/scripts/core/ViewManager.ts b/assets/scripts/core/ViewManager.ts index 6f67cb3..8bc2f99 100644 --- a/assets/scripts/core/ViewManager.ts +++ b/assets/scripts/core/ViewManager.ts @@ -1,4 +1,4 @@ -import { _decorator, Node, resources, Prefab, instantiate, error } from 'cc'; +import { _decorator, Node, Prefab, instantiate, error } from 'cc'; import { BaseView, ViewConfig, ViewOptions } from './BaseView'; const { ccclass } = _decorator; @@ -7,7 +7,6 @@ const { ccclass } = _decorator; */ interface RegisteredView { config: ViewConfig; - prefab: Prefab | null; // 缓存的预制体 } /** @@ -70,8 +69,7 @@ export class ViewManager { cache: true, // 默认缓存 zIndex: 0, // 默认层级 ...config - }, - prefab: null + } }); } @@ -111,24 +109,8 @@ export class ViewManager { return; } - // 检查是否有缓存的预制体 - if (registered.prefab) { - this._instantiateView(viewId, registered.prefab, options); - return; - } - - // 动态加载预制体 - resources.load(registered.config.prefabPath, Prefab, (err, prefab) => { - if (err) { - error(`ViewManager: 加载预制体失败 "${registered.config.prefabPath}"`, err); - options?.onError?.(err); - return; - } - - // 缓存预制体 - registered.prefab = prefab; - this._instantiateView(viewId, prefab!, options); - }); + // 直接使用预制体引用实例化 + this._instantiateView(viewId, registered.config.prefab, options); } /** @@ -144,7 +126,7 @@ export class ViewManager { const view = node.getComponent(BaseView); if (!view) { - error(`ViewManager: 预制体 "${registered.config.prefabPath}" 缺少 BaseView 组件`); + error(`ViewManager: 预制体 "${viewId}" 缺少 BaseView 组件`); node.destroy(); options?.onError?.(new Error('缺少 BaseView 组件')); return; @@ -290,7 +272,7 @@ export class ViewManager { } /** - * 预加载页面预制体 + * 预加载页面预制体(主包资源已随游戏加载,此方法仅为兼容性保留) * @param viewId 页面标识 * @param onProgress 进度回调 * @param onComplete 完成回调 @@ -303,22 +285,9 @@ export class ViewManager { return; } - // 已缓存 - if (registered.prefab) { - onProgress?.(1); - onComplete?.(); - return; - } - - resources.load(registered.config.prefabPath, Prefab, (err, prefab) => { - if (err) { - error(`ViewManager: 预加载失败 "${registered.config.prefabPath}"`, err); - } else { - registered.prefab = prefab; - onProgress?.(1); - } - onComplete?.(); - }); + // 主包资源已加载,直接回调 + onProgress?.(1); + onComplete?.(); } /** diff --git a/assets/scripts/utils/WxSDK.ts b/assets/scripts/utils/WxSDK.ts new file mode 100644 index 0000000..d5563b2 --- /dev/null +++ b/assets/scripts/utils/WxSDK.ts @@ -0,0 +1,148 @@ +import { sys } from 'cc'; + +/** + * 微信分享配置 + */ +export interface WxShareConfig { + /** 分享标题 */ + title: string; + /** 分享图片 URL 或本地路径 */ + imageUrl?: string; + /** 查询字符串,从这条转发消息进入后,可通过 wx.getLaunchOptionsSync 或 wx.onShow 获取 */ + query?: string; +} + +/** + * 微信朋友圈分享配置 + */ +export interface WxShareTimelineConfig { + /** 分享标题 */ + title: string; + /** 分享图片 URL 或本地路径 */ + imageUrl?: string; + /** 查询字符串 */ + query?: string; +} + +/** + * 微信小游戏 SDK 工具类 + * 封装微信平台相关 API,非微信环境下静默降级 + */ +export class WxSDK { + /** + * 是否处于微信小游戏环境 + */ + static isWechat(): boolean { + return sys.platform === sys.Platform.WECHAT_GAME; + } + + /** + * 获取 wx 全局对象(仅微信环境下可用) + */ + private static getWx(): any { + if (!WxSDK.isWechat()) return null; + return typeof wx !== 'undefined' ? wx : null; + } + + // ==================== 分享相关 ==================== + + /** + * 开启转发/分享菜单 + * 调用后用户可通过右上角菜单进行转发 + * @param withShareTicket 是否带 shareTicket,用于获取群信息 + */ + static showShareMenu(withShareTicket: boolean = true): void { + const wxApi = WxSDK.getWx(); + if (!wxApi) return; + + wxApi.showShareMenu({ + withShareTicket, + menus: ['shareAppMessage', 'shareTimeline'], + success: () => { + console.log('[WxSDK] showShareMenu 成功'); + }, + fail: (err: any) => { + console.warn('[WxSDK] showShareMenu 失败', err); + } + }); + } + + /** + * 设置被动分享(右上角菜单 "转发给朋友")的内容 + * 需要在页面加载后尽早调用,只需调用一次 + * @param config 分享配置 + */ + static onShareAppMessage(config: WxShareConfig): void { + const wxApi = WxSDK.getWx(); + if (!wxApi) return; + + wxApi.onShareAppMessage(() => ({ + title: config.title, + imageUrl: config.imageUrl ?? '', + query: config.query ?? '' + })); + + console.log('[WxSDK] onShareAppMessage 已设置'); + } + + /** + * 设置分享到朋友圈的内容 + * @param config 朋友圈分享配置 + */ + static onShareTimeline(config: WxShareTimelineConfig): void { + const wxApi = WxSDK.getWx(); + if (!wxApi) return; + + if (typeof wxApi.onShareTimeline !== 'function') { + console.warn('[WxSDK] 当前微信版本不支持 onShareTimeline'); + return; + } + + wxApi.onShareTimeline(() => ({ + title: config.title, + imageUrl: config.imageUrl ?? '', + query: config.query ?? '' + })); + + console.log('[WxSDK] onShareTimeline 已设置'); + } + + /** + * 主动触发转发(拉起分享面板) + * @param config 分享配置 + */ + static shareAppMessage(config: WxShareConfig): void { + const wxApi = WxSDK.getWx(); + if (!wxApi) return; + + wxApi.shareAppMessage({ + title: config.title, + imageUrl: config.imageUrl ?? '', + query: config.query ?? '' + }); + + console.log('[WxSDK] shareAppMessage 已触发'); + } + + /** + * 一键初始化分享功能 + * 开启分享菜单 + 设置被动分享内容 + 设置朋友圈分享内容 + * @param config 分享配置 + */ + static initShare(config: WxShareConfig): void { + if (!WxSDK.isWechat()) { + console.log('[WxSDK] 非微信环境,跳过分享初始化'); + return; + } + + WxSDK.showShareMenu(); + WxSDK.onShareAppMessage(config); + WxSDK.onShareTimeline({ + title: config.title, + imageUrl: config.imageUrl, + query: config.query + }); + + console.log('[WxSDK] 分享功能初始化完成'); + } +} diff --git a/assets/scripts/utils/WxSDK.ts.meta b/assets/scripts/utils/WxSDK.ts.meta new file mode 100644 index 0000000..3d0954f --- /dev/null +++ b/assets/scripts/utils/WxSDK.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "ba0af7e0-a456-4b08-b058-8f77f5a7481f", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..517ca7d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "mp-xieyingeng", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "mp-xieyingeng", + "dependencies": { + "minigame-api-typings": "^3.8.18" + } + }, + "node_modules/minigame-api-typings": { + "version": "3.8.18", + "resolved": "https://mirrors.tencent.com/npm/minigame-api-typings/-/minigame-api-typings-3.8.18.tgz", + "integrity": "sha512-EdHRr/3qDfzd5ofylR5gKTAsu+Hrqq4N2ylHG7TfC5BroeQOEPBT1jKNmTYypY7dX9vnbMvIE4iCge7r09NdzA==" + } + } +} diff --git a/package.json b/package.json index 7d0967b..187e53a 100755 --- a/package.json +++ b/package.json @@ -3,5 +3,8 @@ "uuid": "9ee27804-ead0-4e3b-bcbf-82df2cb9434a", "creator": { "version": "3.8.8" + }, + "dependencies": { + "minigame-api-typings": "^3.8.18" } }