diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index 454263a..44c86f2 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -43,6 +43,8 @@ export default class JiaZai extends cc.Component { private dailyQuestsNode: cc.Node | null = null; private static cachedWinStreakPrefab: cc.Prefab | null = null; private winStreakNode: cc.Node | null = null; + private static cachedSharePrefab: cc.Prefab | null = null; + private ShareNode: cc.Node | null = null; // 缓存 通行证 private static cachedPassCheckPrefab: cc.Prefab | null = null; @@ -116,9 +118,7 @@ export default class JiaZai extends cc.Component { // LIFE-CYCLE CALLBACKS: onLoad() { - if (cc.fx.GameConfig.GM_INFO.otherUid != "") { - this.getShareInfo(); - } + cc.fx.GameConfig.GM_INFO.sceneValue = "HomeScene"; initProvinceLocator(); // this.RankNode = null; @@ -129,6 +129,9 @@ export default class JiaZai extends cc.Component { this.node.getChildByName("zhuanchang").zIndex = 1000; this.careerRank = null; this.closeLoad(); + if (cc.fx.GameConfig.GM_INFO.otherUid != "") { + this.getShareInfo(); + } this.checkShare(); this.closeAvatar(); this.setShareInfo(); @@ -213,6 +216,15 @@ export default class JiaZai extends cc.Component { JiaZai.cachedWinStreakPrefab = prefab; console.log("连胜活动预制体已经准备好"); }); + bundle.load('prefab/Share', cc.Prefab, (err: Error, prefab: cc.Prefab) => { + if (err) { + cc.error(err.message || err); + return; + } + JiaZai.cachedSharePrefab = prefab; + console.log("分享预制体已经准备好"); + }); + }); } @@ -285,8 +297,8 @@ export default class JiaZai extends cc.Component { } else { // this.closeLoad(); - this.isShow = false; - cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, true); + // this.isShow = false; + // cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, true); } } else { @@ -1114,7 +1126,7 @@ export default class JiaZai extends cc.Component { } else { // 非第一次使用,直接激活节点 this.monthlyCardNode.active = true; - this.monthlyCardNode.zIndex = 1000; + this.monthlyCardNode.zIndex = 799; this.monthlyCardNode.getComponent("monthlyCard").init(); this.monthlyCardNode.getComponent("monthlyCard").juwai = true; } @@ -1605,6 +1617,80 @@ export default class JiaZai extends cc.Component { } } + openShare() { + this.openLoad(); + let otherNickName = null; + let otherAvatarUrl = null; + let otherKuang = "0"; + let otherLevel = cc.fx.GameConfig.GM_INFO.otherLevel; + Utils.getUserInfoByID((data) => { + if (data.code == 1) { + console.log("获取好友信息:", data.data.name); + if (data.data.name) { + otherNickName = data.data.name; + } + if (data.data.useravatar) { + otherAvatarUrl = data.data.useravatar; + } + if (data.data.useravatarIcon) { + otherKuang = data.data.useravatarIcon; + } + let shuju = { + otherNickName: otherNickName, + otherAvatarUrl: otherAvatarUrl, + otherKuang: otherKuang, + otherLevel: otherLevel, + } + // 预加载 活动 预制体 + console.log("好友名字:", otherNickName); + if (!JiaZai.cachedActionPrefab) { + cc.assetManager.loadBundle('action_bundle', (err: Error, bundle: cc.AssetManager.Bundle) => { + if (err) { + cc.error(err.message || err); + return; + } + bundle.load('prefab/Share', cc.Prefab, (err: Error, prefab: cc.Prefab) => { + if (err) { + cc.error(err.message || err); + return; + } + JiaZai.cachedSharePrefab = prefab; + console.log("2222分享预制体已经准备好", shuju); + if (!this.ShareNode) { + this.ShareNode = cc.instantiate(JiaZai.cachedSharePrefab); + if (this.node && this.ShareNode) + this.node.addChild(this.ShareNode); + this.ShareNode.zIndex = 800; + this.ShareNode.getComponent("shareFriend").init(true, shuju); + } else { + this.ShareNode.active = true; + this.ShareNode.getComponent("shareFriend").init(false, shuju); + } + }); + + + }); + } + else { + if (!this.ShareNode) { + this.ShareNode = cc.instantiate(JiaZai.cachedSharePrefab); + if (this.node && this.ShareNode) + this.node.addChild(this.ShareNode); + this.ShareNode.zIndex = 800; + this.ShareNode.getComponent("Share").init(true, shuju); + } else { + this.ShareNode.active = true; + this.ShareNode.getComponent("Share").init(false, shuju); + } + } + } + else { + this.closeLoad(); + MiniGameSdk.API.showToast("网络异常,获取好友帮玩信息失败,请从帮玩链接重新进入游戏"); + } + }) + } + rewarded() { Utils.monthGetReward((data) => { if (data.data == null) { @@ -1806,7 +1892,7 @@ export default class JiaZai extends cc.Component { level: level //被帮助关卡等级 } cc.fx.GameTool.shushu_Track("stage_help", eventData); //帮助通关 - this.openLoad(); + this.openShare(); } else { cc.fx.GameConfig.GM_INFO.otherLevel = 0; @@ -1841,19 +1927,19 @@ export default class JiaZai extends cc.Component { //检测当日是否有分享行为,用不用主动获取分享关卡信息 checkShare() { const otherInfo = cc.fx.StorageMessage.getStorage("otherLevel"); - // console.log("分享信息:", otherInfo); + console.log("分享信息:", otherInfo); if (otherInfo != null && otherInfo != undefined && otherInfo != "") { const currentTime = Date.now(); const timeDifference = currentTime - otherInfo.timeStamp; const oneDayInMilliseconds = 24 * 60 * 60 * 1000; - // console.log("计入时间计算"); + console.log("计入时间计算"); if (timeDifference > oneDayInMilliseconds || cc.fx.GameConfig.GM_INFO.level >= otherInfo.otherLevel) { - // console.log("_______________检查分享信息过期或已获取过,清除存储信息"); + console.log("_______________检查分享信息过期或已获取过,清除存储信息"); cc.fx.StorageMessage.setStorage("otherLevel", null); } else { // if ((cc.fx.GameConfig.GM_INFO.level + 1) == otherInfo.otherLevel) { - // console.log("_______________有分享信息,并且符合条件"); + console.log("_______________有分享信息,并且符合条件"); Utils.getShareLevel((res) => { if (res.code == 1 && res.data) { if (res.data.length > 0) { diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index 01890e0..e905f58 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -475,6 +475,14 @@ export default class MapConroler extends cc.Component { } initMap() { + if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) { + this.node.parent.getChildByName("Top").getChildByName("shareBtn").active = false; + this.node.parent.parent.parent.getChildByName("Pause").getChildByName("share").active = false; + } + else { + this.node.parent.getChildByName("Top").getChildByName("shareBtn").active = true; + this.node.parent.parent.parent.getChildByName("Pause").getChildByName("share").active = true; + } if (cc.fx.GameConfig.GM_INFO.winStreak < 10 || cc.fx.GameConfig.GM_INFO.otherLevel > 0) { this.winStreakBtn.node.active = false; this.destroyBtn.node.getChildByName("mul10").opacity = 255; diff --git a/assets/Script/SceneManager.ts b/assets/Script/SceneManager.ts index b1b462c..dc6b302 100644 --- a/assets/Script/SceneManager.ts +++ b/assets/Script/SceneManager.ts @@ -582,32 +582,39 @@ export default class SceneManager extends cc.Component { } shareFriend() { - let shareTips = this.node.getChildByName("Game").getChildByName("Lose").getChildByName("share_tips"); - let closeBtn = shareTips.getChildByName("closeBtn"); - let shareBtn = shareTips.getChildByName("shareBtn"); - let checkbox = shareTips.getChildByName("checkbox"); - // let isCheckboxChecked = cc.sys.localStorage.getItem("share_checkbox_state"); - let isCheckboxChecked = cc.fx.StorageMessage.getStorage("share_checkbox_state"); + if (this.node.getChildByName("Game").getChildByName("Lose").active == true) { + let shareTips = this.node.getChildByName("Game").getChildByName("Lose").getChildByName("share_tips"); - if (isCheckboxChecked == 0 || isCheckboxChecked == "" || isCheckboxChecked == null || isCheckboxChecked == undefined) { - shareTips.active = true; - } else { + // let isCheckboxChecked = cc.sys.localStorage.getItem("share_checkbox_state"); + let isCheckboxChecked = cc.fx.StorageMessage.getStorage("share_checkbox_state"); + + if (isCheckboxChecked == 0 || isCheckboxChecked == "" || isCheckboxChecked == null || isCheckboxChecked == undefined) { + shareTips.active = true; + } else { + this.shareFriend2(); + } + } + else { this.shareFriend2(); } } shareFriend2() { - let shareTips = this.node.getChildByName("Game").getChildByName("Lose").getChildByName("share_tips"); - if (shareTips.active) { - shareTips.active = false; - let checkbox = shareTips.getChildByName("checkbox"); + if (this.node.getChildByName("Game").getChildByName("Lose").active == true) { + let shareTips = this.node.getChildByName("Game").getChildByName("Lose").getChildByName("share_tips"); + if (shareTips.active) { + shareTips.active = false; + let checkbox = shareTips.getChildByName("checkbox"); - let checkboxSelect = 0; - if (checkbox.getComponent(cc.Toggle).isChecked) { - checkboxSelect = 1; + let checkboxSelect = 0; + if (checkbox.getComponent(cc.Toggle).isChecked) { + checkboxSelect = 1; + } + cc.fx.StorageMessage.setStorage("share_checkbox_state", checkboxSelect); } - cc.fx.StorageMessage.setStorage("share_checkbox_state", checkboxSelect); + } + else { } if (this.share_time) { this.share_time = false; diff --git a/assets/Script/module/Pay/Utils.ts b/assets/Script/module/Pay/Utils.ts index 7a4bacf..1155d88 100644 --- a/assets/Script/module/Pay/Utils.ts +++ b/assets/Script/module/Pay/Utils.ts @@ -894,9 +894,9 @@ export default class Utils { //@ts-ignore if ((typeof wx !== 'undefined' && wx !== null) || (typeof tt !== 'undefined' && tt !== null)) { Utils.POST("getShareLv", data, res => { - //console.log("获得shareLvSuccess数据:", res); + console.log("获得shareLvSuccess数据:", res); if (res.code === 1) { - //console.log("服务器:分享帮助通过关卡数据成功", res); + console.log("服务器:分享帮助通过关卡数据成功", res); if (callBack) callBack(res); } else { if (callBack) callBack(res); @@ -1422,4 +1422,25 @@ export default class Utils { }); } } + + static getUserInfoByID(callBack) { + //@ts-ignore + if ((typeof wx !== 'undefined' && wx !== null) || (typeof tt !== 'undefined' && tt !== null)) { + let uid = cc.fx.GameConfig.GM_INFO.otherUid; + //旧的读取数据设置数据方法,以强联网为主 + let setData = { + uid: uid + } + Utils.POST("getUserInfoByID", setData, res => { + // //console.log("获得monthGetReward数据:", res); + if (res.code === 1) { + console.log("服务器:获得分享人头像昵称'✅ ", res); + if (callBack) callBack(res); + } else { + console.log("服务器:获得分享人头像昵称'❌ ", res); + if (callBack) callBack(res); + } + }); + } + } } diff --git a/assets/Script/prop/Lock.ts b/assets/Script/prop/Lock.ts index 6581bd2..4cfea93 100644 --- a/assets/Script/prop/Lock.ts +++ b/assets/Script/prop/Lock.ts @@ -134,8 +134,8 @@ export default class Lock extends cc.Component { reduce() { this.time -= 1; - NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); - cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time")); + NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("icon").getChildByName("time"), false); + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("icon").getChildByName("time")); if (this.time <= 0) { if (this.type == "block") { if (this.node.parent) this.node.parent.getComponent("Block").type = 0; diff --git a/assets/action_bundle/img/share.meta b/assets/action_bundle/img/share.meta new file mode 100644 index 0000000..4fae836 --- /dev/null +++ b/assets/action_bundle/img/share.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "eb6669f0-70c9-446f-a77e-2c13e6bd3102", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/action_bundle/img/share/shareBG.png b/assets/action_bundle/img/share/shareBG.png new file mode 100644 index 0000000..ee00ce6 Binary files /dev/null and b/assets/action_bundle/img/share/shareBG.png differ diff --git a/assets/action_bundle/img/share/shareBG.png.meta b/assets/action_bundle/img/share/shareBG.png.meta new file mode 100644 index 0000000..456daa4 --- /dev/null +++ b/assets/action_bundle/img/share/shareBG.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "b72ed14f-5c00-4d47-beb3-1b54116a78c3", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 880, + "height": 1402, + "platformSettings": {}, + "subMetas": { + "shareBG": { + "ver": "1.0.6", + "uuid": "027a1bc7-6d3a-46c6-a949-c2f76487035e", + "importer": "sprite-frame", + "rawTextureUuid": "b72ed14f-5c00-4d47-beb3-1b54116a78c3", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 880, + "height": 1402, + "rawWidth": 880, + "rawHeight": 1402, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/action_bundle/img/share/shareTitle.png b/assets/action_bundle/img/share/shareTitle.png new file mode 100644 index 0000000..6c8fbc5 Binary files /dev/null and b/assets/action_bundle/img/share/shareTitle.png differ diff --git a/assets/action_bundle/img/share/shareTitle.png.meta b/assets/action_bundle/img/share/shareTitle.png.meta new file mode 100644 index 0000000..85a7309 --- /dev/null +++ b/assets/action_bundle/img/share/shareTitle.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "766944d5-d47c-4cbd-ac18-105514e53972", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 260, + "height": 65, + "platformSettings": {}, + "subMetas": { + "shareTitle": { + "ver": "1.0.6", + "uuid": "5bf6daf8-5aed-47f4-b8a1-026e2ba8cde0", + "importer": "sprite-frame", + "rawTextureUuid": "766944d5-d47c-4cbd-ac18-105514e53972", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 260, + "height": 65, + "rawWidth": 260, + "rawHeight": 65, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/action_bundle/img/share/share_dian.png b/assets/action_bundle/img/share/share_dian.png new file mode 100644 index 0000000..295a960 Binary files /dev/null and b/assets/action_bundle/img/share/share_dian.png differ diff --git a/assets/action_bundle/img/share/share_dian.png.meta b/assets/action_bundle/img/share/share_dian.png.meta new file mode 100644 index 0000000..50bc15c --- /dev/null +++ b/assets/action_bundle/img/share/share_dian.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "be066ea2-fe0c-4bf7-a3c3-fc80bc746d22", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 28, + "height": 28, + "platformSettings": {}, + "subMetas": { + "share_dian": { + "ver": "1.0.6", + "uuid": "a7c8232f-778c-4ee4-825b-4c626cbe9933", + "importer": "sprite-frame", + "rawTextureUuid": "be066ea2-fe0c-4bf7-a3c3-fc80bc746d22", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 28, + "height": 28, + "rawWidth": 28, + "rawHeight": 28, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/action_bundle/img/share/share_getBtn.png b/assets/action_bundle/img/share/share_getBtn.png new file mode 100644 index 0000000..663680e Binary files /dev/null and b/assets/action_bundle/img/share/share_getBtn.png differ diff --git a/assets/action_bundle/img/share/share_getBtn.png.meta b/assets/action_bundle/img/share/share_getBtn.png.meta new file mode 100644 index 0000000..1a780a4 --- /dev/null +++ b/assets/action_bundle/img/share/share_getBtn.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "bba5414e-af50-4671-abdf-79038741b308", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 556, + "height": 157, + "platformSettings": {}, + "subMetas": { + "share_getBtn": { + "ver": "1.0.6", + "uuid": "4d0555ca-53af-482b-a155-31611cd9ec9c", + "importer": "sprite-frame", + "rawTextureUuid": "bba5414e-af50-4671-abdf-79038741b308", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 556, + "height": 157, + "rawWidth": 556, + "rawHeight": 157, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/action_bundle/img/share/share_wenzi.png b/assets/action_bundle/img/share/share_wenzi.png new file mode 100644 index 0000000..5b7bdaa Binary files /dev/null and b/assets/action_bundle/img/share/share_wenzi.png differ diff --git a/assets/action_bundle/img/share/share_wenzi.png.meta b/assets/action_bundle/img/share/share_wenzi.png.meta new file mode 100644 index 0000000..e631e37 --- /dev/null +++ b/assets/action_bundle/img/share/share_wenzi.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "0baebaae-1bd3-4e80-917a-c3e9bf51381f", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 447, + "height": 46, + "platformSettings": {}, + "subMetas": { + "share_wenzi": { + "ver": "1.0.6", + "uuid": "4179e049-07eb-4773-b07d-50804e3525dc", + "importer": "sprite-frame", + "rawTextureUuid": "0baebaae-1bd3-4e80-917a-c3e9bf51381f", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 447, + "height": 46, + "rawWidth": 447, + "rawHeight": 46, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/action_bundle/img/share/share_x.png b/assets/action_bundle/img/share/share_x.png new file mode 100644 index 0000000..6c6b313 Binary files /dev/null and b/assets/action_bundle/img/share/share_x.png differ diff --git a/assets/action_bundle/img/share/share_x.png.meta b/assets/action_bundle/img/share/share_x.png.meta new file mode 100644 index 0000000..61fe2e4 --- /dev/null +++ b/assets/action_bundle/img/share/share_x.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "e72d2d12-30fc-4953-98a7-08ef94b56d64", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 69, + "height": 68, + "platformSettings": {}, + "subMetas": { + "share_x": { + "ver": "1.0.6", + "uuid": "c4912a0d-9bac-4f41-8a63-b2e0f3327d68", + "importer": "sprite-frame", + "rawTextureUuid": "e72d2d12-30fc-4953-98a7-08ef94b56d64", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 69, + "height": 68, + "rawWidth": 69, + "rawHeight": 68, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/action_bundle/prefab/Share.prefab b/assets/action_bundle/prefab/Share.prefab new file mode 100644 index 0000000..1bc9439 --- /dev/null +++ b/assets/action_bundle/prefab/Share.prefab @@ -0,0 +1,2181 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "Share", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 7 + }, + { + "__id__": 10 + }, + { + "__id__": 17 + }, + { + "__id__": 20 + }, + { + "__id__": 23 + }, + { + "__id__": 26 + }, + { + "__id__": 29 + }, + { + "__id__": 35 + }, + { + "__id__": 38 + }, + { + "__id__": 41 + }, + { + "__id__": 44 + }, + { + "__id__": 47 + }, + { + "__id__": 50 + }, + { + "__id__": 53 + } + ], + "_active": true, + "_components": [ + { + "__id__": 58 + }, + { + "__id__": 59 + } + ], + "_prefab": { + "__id__": 60 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 1920 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 540, + 960, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite(Splash)", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 6 + }, + "_opacity": 150, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 1920 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "06u5gBe+ZNNb/XgLY5QmNY", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 9 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 880, + "height": 1402 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "027a1bc7-6d3a-46c6-a949-c2f76487035e" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "6f+QSK3xNLII8M56OBUwth", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "shareBtn", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 11 + } + ], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": { + "__id__": 16 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 348.263, + 628, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "share_x", + "_objFlags": 0, + "_parent": { + "__id__": 10 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 69, + "height": 68 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "c4912a0d-9bac-4f41-8a63-b2e0f3327d68" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "e2MUgJAFdM4bL+hl9Cxaoi", + "sync": false + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 15 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 10 + }, + "_id": "" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "62af9KEuDlCdo/V4yJ3Ehju", + "handler": "closeBtn", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9bn8ybLeJLgKWh/oHNuFim", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "shareTitle", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": { + "__id__": 19 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 260, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 650.163, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 17 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5bf6daf8-5aed-47f4-b8a1-026e2ba8cde0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "ce3xayZ+tL9IQesHNjz0qG", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "share_wenzi", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": { + "__id__": 22 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 447, + "height": 46 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -284.67, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4179e049-07eb-4773-b07d-50804e3525dc" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "70xJ0W58tI7qQ9GqRfZ/pE", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "level", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": { + "__id__": 25 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 75.6 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.37, + -291.776, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 60, + "_lineHeight": 60, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 0, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "dfL4Ow4lBO/LSzF/OCrnpZ", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "kuang", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 28 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 240 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 300, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 26 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "c2b141f2-de71-4481-b9ee-440c893c28b3" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "fd85df88-648f-4407-bab2-da4f15478fb9" + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c4VYdECfJEiJqEIKJPjwqM", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "iphone", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 30 + } + ], + "_active": true, + "_components": [ + { + "__id__": 33 + } + ], + "_prefab": { + "__id__": 34 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 240 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 304.857, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 29 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 31 + } + ], + "_prefab": { + "__id__": 32 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 230, + "height": 230 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -5.483, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 30 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a10b3eca-6801-4c7d-9102-b2a50ed87c44" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "fd85df88-648f-4407-bab2-da4f15478fb9" + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c3ajVa85VPxr8KbFOayTFk", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 29 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": { + "__uuid__": "c2b141f2-de71-4481-b9ee-440c893c28b3" + }, + "_type": 2, + "_segments": 64, + "_N$alphaThreshold": 0.1, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c9pcijvCpMuZ3ZnepL66wA", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "name", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 36 + } + ], + "_prefab": { + "__id__": 37 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 132.501, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 35 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "你的好友", + "_N$string": "你的好友", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 0, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "e5vDPGLf9LqbQXrej4mVR+", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 39 + } + ], + "_prefab": { + "__id__": 40 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6.974, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a7c8232f-778c-4ee4-825b-4c626cbe9933" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fagY/CPsxOk4QQYVdw2G/g", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 42 + } + ], + "_prefab": { + "__id__": 43 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -50, + 6.974, + 0, + 0, + 0, + 0, + 1, + 0.75, + 0.75, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 41 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a7c8232f-778c-4ee4-825b-4c626cbe9933" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c2XiCnasZPFbbjgyMdrd1y", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 45 + } + ], + "_prefab": { + "__id__": 46 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 50, + 6.974, + 0, + 0, + 0, + 0, + 1, + 0.75, + 0.75, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 44 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a7c8232f-778c-4ee4-825b-4c626cbe9933" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "e7fHYPZfdJeoEyibfnXziZ", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 48 + } + ], + "_prefab": { + "__id__": 49 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -100, + 6.974, + 0, + 0, + 0, + 0, + 1, + 0.75, + 0.75, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a7c8232f-778c-4ee4-825b-4c626cbe9933" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "6dnsmhoaxDJpjadbAZkTvu", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 51 + } + ], + "_prefab": { + "__id__": 52 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 100, + 6.974, + 0, + 0, + 0, + 0, + 1, + 0.75, + 0.75, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a7c8232f-778c-4ee4-825b-4c626cbe9933" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "5el6YsdOFP46ua0UCpWtqS", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "share_getBtn", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 54 + }, + { + "__id__": 55 + } + ], + "_prefab": { + "__id__": 57 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 556, + "height": 157 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -476.601, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 53 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4d0555ca-53af-482b-a155-31611cd9ec9c" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 53 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 56 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 53 + }, + "_id": "" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "62af9KEuDlCdo/V4yJ3Ehju", + "handler": "helpBtn", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "51wuHSM6FC+JqCLjm4iRju", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "62af9KEuDlCdo/V4yJ3Ehju", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "ui": { + "__uuid__": "fd85df88-648f-4407-bab2-da4f15478fb9" + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/assets/action_bundle/prefab/Share.prefab.meta b/assets/action_bundle/prefab/Share.prefab.meta new file mode 100644 index 0000000..c88b1a5 --- /dev/null +++ b/assets/action_bundle/prefab/Share.prefab.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.3.2", + "uuid": "b28790fb-50a0-4b31-8543-9c0a17693de0", + "importer": "prefab", + "optimizationPolicy": "AUTO", + "asyncLoadAssets": false, + "readonly": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/action_bundle/script/shareFriend.ts b/assets/action_bundle/script/shareFriend.ts new file mode 100644 index 0000000..2e43251 --- /dev/null +++ b/assets/action_bundle/script/shareFriend.ts @@ -0,0 +1,117 @@ +import MapConroler from "../../Script/Map"; + +const { ccclass, property } = cc._decorator; + +@ccclass +export default class shareFriend extends cc.Component { + + @property(cc.SpriteAtlas) + ui: cc.SpriteAtlas = null; + + onLoad() { + + } + + start() { + + } + + init(type, shuju) { + console.log("111111111", shuju); + this.node.getChildByName("level").getComponent(cc.Label).string = shuju.otherLevel + ""; + + let useravatarIcon = shuju.otherKuang; + useravatarIcon = "kuang_" + (parseInt(useravatarIcon) + 1); + console.log("3333333", useravatarIcon); + if (this.node.getChildByName("kuang")) + this.node.getChildByName("kuang").getComponent(cc.Sprite).spriteFrame = + this.ui.getSpriteFrame(useravatarIcon); + + + + if (shuju.otherAvatarUrl == "" || shuju.otherAvatarUrl == null || shuju.otherAvatarUrl == undefined + ) { + console.log("头像为空", shuju.otherAvatarUrl); + } + else if (shuju.otherAvatarUrl == "0" || shuju.otherAvatarUrl == "1" || shuju.otherAvatarUrl == "2" + || shuju.otherAvatarUrl == "3" || shuju.otherAvatarUrl == "4" || shuju.otherAvatarUrl == "5" + || shuju.otherAvatarUrl == "6" || shuju.otherAvatarUrl == "7" || shuju.otherAvatarUrl == "8" + || shuju.otherAvatarUrl == "9" || shuju.otherAvatarUrl == "10" || shuju.otherAvatarUrl == "11" + || shuju.otherAvatarUrl == "12" || shuju.otherAvatarUrl == "13" || shuju.otherAvatarUrl == "14" + || shuju.otherAvatarUrl == "15" || shuju.otherAvatarUrl == "16" || shuju.otherAvatarUrl == "17") { + let useravatar = shuju.otherAvatarUrl; + let useravatarTemp = "icon_" + useravatar; + console.log("用户头像:", useravatarTemp); + console.log("44444444"); + if (this.node.getChildByName("iphone")) + this.node.getChildByName("iphone").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.ui.getSpriteFrame(useravatarTemp); + } + + else this.setPic(shuju.otherAvatarUrl); + + + let name = shuju.otherNickName; + if (name == "user" || name == null) name = "你的好友"; + else { + if (shuju.otherNickName.length >= 7) + name = cc.fx.GameTool.subName(shuju.otherNickName, 7); + } + + console.log("7777777"); + + if (this.node.getChildByName("name")) { + console.log("8888888", name); + this.node.getChildByName("name").getComponent(cc.Label).string = name + ""; + } + + + } + + helpBtn() { + const canvasTemp = cc.find("Canvas"); // 假设 Canvas 节点 + if (canvasTemp) { + const JiaZai = canvasTemp.getComponent("JiaZai"); + if (JiaZai) { + JiaZai.startGame(); + + } + } + } + + closeBtn() { + this.node.active = false; + } + public setPic(url) { + // console.log("设置头像:", this.data.useravatar); + var self = this; + console.log("6666666", url); + self.node.getChildByName("iphone").getChildByName("icon").active = false; + + + cc.assetManager.loadRemote(url, { ext: '.png' }, (err, texture: cc.Texture2D) => { + if (texture) { + console.log("设置头像成功", self.node.getChildByName("iphone")); + + + if (self.node.getChildByName("iphone")) { + console.log("okokokokokok") + var sprite = self.node.getChildByName("iphone").getChildByName("icon").getComponent(cc.Sprite); + sprite.spriteFrame = new cc.SpriteFrame(texture); + console.log("最终设置成功") + self.node.getChildByName("iphone").getChildByName("icon").active = true; + } + } + else { + self.node.getChildByName("iphone").getChildByName("icon").active = true; + console.log("设置头像失败", url); + console.log(err, texture) + } + }) + } + + + + update() { + + } +} \ No newline at end of file diff --git a/assets/action_bundle/script/shareFriend.ts.meta b/assets/action_bundle/script/shareFriend.ts.meta new file mode 100644 index 0000000..25e2f59 --- /dev/null +++ b/assets/action_bundle/script/shareFriend.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "62af9284-b839-4276-8fd5-e322771218ee", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file