diff --git a/assets/FrameWork/User/User.ts b/assets/FrameWork/User/User.ts index 7692b339..498f2392 100644 --- a/assets/FrameWork/User/User.ts +++ b/assets/FrameWork/User/User.ts @@ -25,7 +25,7 @@ export class UserGameData { public dayUnlock: any = {}; public headImg: string = "headImg1"; public headImgUnlock: Array = ["headImg1"]; - public money: number = 20000; + public money: number = 500; public userIQ: number = 0; public yuanBao: number = 0; public day: number = 1; diff --git a/assets/MainHall/prefab/MainHall.prefab b/assets/MainHall/prefab/MainHall.prefab index b02163ad..c9ee920b 100644 --- a/assets/MainHall/prefab/MainHall.prefab +++ b/assets/MainHall/prefab/MainHall.prefab @@ -73,25 +73,28 @@ }, { "__id__": 595 + }, + { + "__id__": 609 } ], "_active": true, "_components": [ { - "__id__": 609 + "__id__": 612 }, { - "__id__": 610 + "__id__": 613 }, { - "__id__": 611 + "__id__": 614 }, { - "__id__": 612 + "__id__": 615 } ], "_prefab": { - "__id__": 613 + "__id__": 616 }, "_opacity": 255, "_color": { @@ -22302,6 +22305,108 @@ "fileId": "04Ey8Ujg9NA7l15liulpUz", "sync": false }, + { + "__type__": "cc.Node", + "_name": "prefabMoneyNode", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 610 + } + ], + "_prefab": { + "__id__": 611 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_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.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 609 + }, + "_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": 815, + "_originalHeight": 1450, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "56/xvaqAZDHb22cBQk8Ote", + "sync": false + }, { "__type__": "cc.Widget", "_name": "", diff --git a/assets/Scripts/DH/DH_1.ts b/assets/Scripts/DH/DH_1.ts index 3dffd8a3..74e2e7d4 100644 --- a/assets/Scripts/DH/DH_1.ts +++ b/assets/Scripts/DH/DH_1.ts @@ -14,8 +14,8 @@ const { ccclass, property, disallowMultiple, menu } = cc._decorator; @menu('对话剧情/DH_1') export default class DH_1 extends DHBase { chatConfig = [ - { effectUrl: 'DH/DH_1/sound/这是夏芸家吗?', delayTime: 1.37, str: '这是夏芸家吗?', posi: 'qipao2' }, - { effectUrl: 'DH/DH_1/sound/是的,我是夏芸前夫,你是?', delayTime: 3.42, str: '是的,我是夏芸前夫,你是?', posi: '-1' }, + { effectUrl: 'DH/DH_1/sound/这是夏芸家吗?', delayTime: 1.5, str: '这是夏芸家吗?', posi: 'qipao2' }, + { effectUrl: 'DH/DH_1/sound/是的,我是夏芸前夫,你是?', delayTime: 3, str: '是的,我是夏芸前夫,你是?', posi: '-1' }, { effectUrl: 'DH/DH_1/sound/管你什么前夫后夫,夏芸用这房子抵押借了500万高利贷。', delayTime: 5.29, str: '管你什么前夫后夫,夏芸用这房子抵押借了500万高利贷。', posi: 'qipao2' }, { effectUrl: 'DH/DH_1/sound/现在找不到她人,我们是过来收房子的。', delayTime: 3.43, str: '现在找不到她人,我们是过来收房子的。', posi: 'qipao2' }, { effectUrl: 'DH/DH_1/sound/什么?500万?我跟她已经离婚了,房子跟她没一毛钱关系。', delayTime: 6.34, str: '什么?500万?我跟她已经离婚了,房子跟她没一毛钱关系。', posi: '-1' }, @@ -40,7 +40,7 @@ export default class DH_1 extends DHBase { start() { // Common5.playRemoteAudioMusic("remotesound/effect/小美满-8秒", true) - // Common5.preLoadRemoteAudioByChatConfig(this.chatConfig); + Common5.preLoadRemoteAudioByChatConfig(this.chatConfig); super.start(); // this.node.getChildByName("guide").active = false this.continueStory(); diff --git a/assets/Scripts/GameRoomRes/Room1/Room1.ts b/assets/Scripts/GameRoomRes/Room1/Room1.ts index 6da7a84f..6ef8ecc5 100644 --- a/assets/Scripts/GameRoomRes/Room1/Room1.ts +++ b/assets/Scripts/GameRoomRes/Room1/Room1.ts @@ -129,6 +129,7 @@ export default class Room1 extends cc.Component { updateMainTask() { this.node.getChildByName('手机').active = false this.node.getChildByName('回家').active = true + this.guideView([this.node.getChildByName('回家')]) } clickGoHome() { @@ -168,7 +169,7 @@ export default class Room1 extends cc.Component { guideView(nodeArray) { if (this.maskGuideNode == null) { - PrefabManage.loadPrefabByType(GameType.GuideMskNode, null, (prefab) => { + PrefabManage.loadPrefabByType(GameType.GuideMskNode, this.node, (prefab) => { let guideNodeArray = nodeArray this.maskGuideNode = prefab let firstNode = guideNodeArray.shift() diff --git a/assets/Scripts/GameRoomRes/Room2/Room2.ts b/assets/Scripts/GameRoomRes/Room2/Room2.ts index c468d705..cd78fb79 100644 --- a/assets/Scripts/GameRoomRes/Room2/Room2.ts +++ b/assets/Scripts/GameRoomRes/Room2/Room2.ts @@ -23,25 +23,25 @@ let ChadianConfig = { { str: "孩子我要带走,还有这房子我还出了20万首付,这钱你得还我。", qiPaoPos: 0, - delay: 2, + delay: 5.8, effectUrl: "GameRoomRes/sound/Room2/孩子我要带走,还有这房子我还出了20万首付,这钱你得还我。" }, { str: "好,20万是吧?我明天就拿给你,但是孩子你想都别想。", qiPaoPos: -1, - delay: 3, + delay: 7, effectUrl: "GameRoomRes/sound/Room2/好,20万是吧?我明天就拿给你,但是孩子你想都别想。" }, { str: "你一个臭卖包子的,你能拿出20万?别在这吹牛了。", qiPaoPos: 1, - delay: 2.7, + delay: 6, effectUrl: "GameRoomRes/sound/Room2/你一个臭卖包子的,你能拿出20万?别在这吹牛了。" }, { str: "你要真有赚20万的本事,我给你磕头认错都行!", qiPaoPos: 0, - delay: 2, + delay: 4, effectUrl: "GameRoomRes/sound/Room2/你要真有赚20万的本事,我给你磕头认错都行!" }, ], @@ -49,12 +49,12 @@ let ChadianConfig = { { str: "爸爸,我不要跟妈妈走。", qiPaoPos: 2, - delay: 6.8, + delay: 3, effectUrl: "GameRoomRes/sound/Room2/爸爸,我不要跟妈妈走。" }, { str: "乖,爸爸不会抛弃你的,爸爸这就去赚钱。", qiPaoPos: -1, - delay: 2.9, + delay: 3.5, effectUrl: "GameRoomRes/sound/Room2/乖,爸爸不会抛弃你的,爸爸这就去赚钱。" } ], @@ -67,12 +67,12 @@ let ChadianConfig = { }, { str: "磨磨唧唧,我还以为你给不起20万跑路了呢。", qiPaoPos: 1, - delay: 2, + delay: 6, effectUrl: "GameRoomRes/sound/Room2/磨磨唧唧,我还以为你给不起20万跑路了呢。" }, { str: "夏芸,现在这家跟你没关系了,拿着你的东西滚出去。", qiPaoPos: -1, - delay: 2.9, + delay:4, effectUrl: "GameRoomRes/sound/Room2/夏芸,现在这家跟你没关系了,拿着你的东西滚出去。" } ], @@ -80,7 +80,7 @@ let ChadianConfig = { { str: "哼,我跟你的事还没完,走着瞧。", qiPaoPos: 1, - delay: 2, + delay: 4, effectUrl: "GameRoomRes/sound/Room2/哼,我跟你的事还没完,走着瞧。" } ], diff --git a/assets/Scripts/GameStoryRes/KaiChangGuanQia1Gai.ts b/assets/Scripts/GameStoryRes/KaiChangGuanQia1Gai.ts index 1e4391b5..ec3342ed 100644 --- a/assets/Scripts/GameStoryRes/KaiChangGuanQia1Gai.ts +++ b/assets/Scripts/GameStoryRes/KaiChangGuanQia1Gai.ts @@ -27,7 +27,7 @@ let ChadianConfig = { { str: "陈老板,你答应的50万...", qiPaoPos: 1, - delay: 2.5, + delay: 2, effectUrl: "GameStoryRes/sound/KaiChangGuanQia1Gai/陈老板,你答应的50万..." }, @@ -52,7 +52,7 @@ let ChadianConfig = { { str: "你个臭卖包子的,也敢推老子?", qiPaoPos: 5, - delay: 3.5, + delay: 2.5, effectUrl: "GameStoryRes/sound/KaiChangGuanQia1Gai/你个臭卖包子的,也敢推老子?" }, { diff --git a/assets/Scripts/JuQingChat/TaskManager.ts b/assets/Scripts/JuQingChat/TaskManager.ts index 5a1e5dae..abf305b8 100644 --- a/assets/Scripts/JuQingChat/TaskManager.ts +++ b/assets/Scripts/JuQingChat/TaskManager.ts @@ -216,7 +216,7 @@ let TaskListConfig = [ /**第3章 **/ { TaskId: MainTaskIdEnum.MainTask_301, includeSubTaskId: [], needFinishSubTaskId: SubTaskIdEnum.SubTask_None, - TaskTittle: '我的早餐摊', TaskDesc: '出门赚够20万偿还金', TaskNeedMoney: 0, finishUnLockJuQingIndex: 'WX_3', + TaskTittle: '我的早餐摊', TaskDesc: '赚够【20万】偿还金', TaskNeedMoney: 0, finishUnLockJuQingIndex: 'WX_3', subtitle: 4, taskNum: 200000, isAutoTanChu: false }, @@ -228,7 +228,7 @@ let TaskListConfig = [ { TaskId: MainTaskIdEnum.MainTask_303, includeSubTaskId: [], needFinishSubTaskId: SubTaskIdEnum.SubTask_None, - TaskTittle: '我的早餐摊', TaskDesc: '骑电驴回家偿还前妻20万', finishUnLockJuQingIndex: '', wanFaRuKouTip: ['rk_chuZuChe'], + TaskTittle: '我的早餐摊', TaskDesc: '回家偿还前妻20万', finishUnLockJuQingIndex: '', wanFaRuKouTip: ['rk_chuZuChe'], subtitle: 6, isAutoTanChu: true }, @@ -256,7 +256,7 @@ let TaskListConfig = [ { TaskId: MainTaskIdEnum.MainTask_502, includeSubTaskId: [], needFinishSubTaskId: SubTaskIdEnum.SubTask_None, - TaskTittle: '骤至的债务', TaskDesc: '筹齐500万偿还高利贷', TaskNeedMoney: 0, taskNum: 5000000, finishUnLockJuQingIndex: '', + TaskTittle: '骤至的债务', TaskDesc: '筹齐【500万】偿还高利贷', TaskNeedMoney: 0, taskNum: 5000000, finishUnLockJuQingIndex: '', subtitle: 10, isAutoTanChu: true }, @@ -284,7 +284,7 @@ let TaskListConfig = [ }, { TaskId: MainTaskIdEnum.MainTask_604, includeSubTaskId: [], needFinishSubTaskId: SubTaskIdEnum.SubTask_None, - TaskTittle: '女儿被绑架', TaskDesc: '筹齐女儿的赎金2000万', TaskNeedMoney: 0, finishUnLockJuQingIndex: '',taskNum: 20000000, + TaskTittle: '女儿被绑架', TaskDesc: '筹齐女儿的【赎金2000万】', TaskNeedMoney: 0, finishUnLockJuQingIndex: '',taskNum: 20000000, subtitle: 15, isAutoTanChu: true }, { @@ -313,7 +313,7 @@ let TaskListConfig = [ { TaskId: MainTaskIdEnum.MainTask_703, includeSubTaskId: [], needFinishSubTaskId: SubTaskIdEnum.SubTask_None, - TaskTittle: '命运的捉弄', TaskDesc: '筹齐女儿的医疗费用100亿', TaskNeedMoney: 0, taskNum: 10000000000, finishUnLockJuQingIndex: '', + TaskTittle: '命运的捉弄', TaskDesc: '筹齐女儿的医疗费用【100亿】', TaskNeedMoney: 0, taskNum: 10000000000, finishUnLockJuQingIndex: '', subtitle: 20, isAutoTanChu: true }, diff --git a/assets/Scripts/MainHall/MainHall.ts b/assets/Scripts/MainHall/MainHall.ts index 32c17f83..002741ad 100644 --- a/assets/Scripts/MainHall/MainHall.ts +++ b/assets/Scripts/MainHall/MainHall.ts @@ -81,10 +81,10 @@ export default class MainHall extends UiBase { guideArr = [] chatConfig = [ - // { effectUrl: 'DH/MainHall/sound/老板你终于来了,顾客都在排队等着买早餐呢!', delayTime: 2.21, str: '老板你终于来了,顾客都在排队等着买早餐呢!', posi: '员工对话' }, - // { effectUrl: 'DH/MainHall/sound/客人都等着急', delayTime: 2.83, str: '客人都等着急', posi: '员工对话' }, - // { effectUrl: 'DH/MainHall/sound/油条出锅了,快点击油条递给客人吧!', delayTime: 2.68, str: '油条出锅了,快点击油条递给客人吧!', posi: '员工对话' }, - // { effectUrl: 'DH/MainHall/sound/接下来我们来升级摊位,能提升早餐售卖单价哦!', delayTime: 4.35, str: '接下来我们来升级摊位,能提升早餐售卖单价哦!', posi: '员工对话' }, + // { effectUrl: 'DH/MainHall/sound/老板你终于来了,顾客都在排队等着买早餐呢!', delayTime: 2.21, str: '老板你终于来了,顾客都在排队等着买早餐呢!', posi: '员工对话' }, + // { effectUrl: 'DH/MainHall/sound/客人都等着急', delayTime: 2.83, str: '客人都等着急', posi: '员工对话' }, + // { effectUrl: 'DH/MainHall/sound/油条出锅了,快点击油条递给客人吧!', delayTime: 2.68, str: '油条出锅了,快点击油条递给客人吧!', posi: '员工对话' }, + // { effectUrl: 'DH/MainHall/sound/接下来我们来升级摊位,能提升早餐售卖单价哦!', delayTime: 4.35, str: '接下来我们来升级摊位,能提升早餐售卖单价哦!', posi: '员工对话' }, // { effectUrl: 'DH/MainHall/sound/升级可以获得永久点击收益提升哦', delayTime: 3, str: '升级可以获得永久点击收益提升哦', posi: 'qipao3' }, // { effectUrl: 'DH/MainHall/sound/(我记得前世柳家对付别的竞争对手喜欢从原材料下手。)', delayTime: 3.98, str: '(我记得前世柳家对付别的竞争对手喜欢从原材料下手。)', posi: '-1' }, // { effectUrl: 'DH/MainHall/sound/(得先去收购一个农贸市场,不然到时候就被柳家父子打脸了)', delayTime: 4.74, str: '(得先去收购一个农贸市场,不然到时候就被柳家父子打脸了)', posi: '-1' }, @@ -520,12 +520,12 @@ export default class MainHall extends UiBase { let index = User.getFirstStepIndex() if (index == 1) { - let array = [GameType.PeopleLevelUp, GameType.MishuGame, GameType.MultipleIncome] + let array = [GameType.MishuGame, GameType.MultipleIncome] PrefabManage.preloadPrefabArray(array) } else { - let array = [GameType.PeopleLevelUp, GameType.MishuGame, GameType.ChallengeChoose, GameType.MultipleIncome, GameType.TanWei, GameType.Shipu, GameType.FangChanGame, GameType.ZiChan, GameType.ChatList, GameType.CityPrefab] + let array = [GameType.MishuGame, GameType.MultipleIncome, GameType.ChatList] if (curSignDay == -1) { - array = [GameType.PeopleLevelUp, GameType.MishuGame, GameType.ChallengeChoose, GameType.MultipleIncome, GameType.TanWei, GameType.Shipu, GameType.FangChanGame, GameType.ZiChan, GameType.ChatList, GameType.CityPrefab] + array = [GameType.MishuGame, GameType.MultipleIncome, GameType.ChatList] } PrefabManage.preloadPrefabArray(array) @@ -658,8 +658,8 @@ export default class MainHall extends UiBase { if (opacity != -1) { prefab.getComponent(NewGuideScript_NoSwallow).setOpacityMaskNode(opacity) } - }) - }else{ + }) + } else { PrefabManage.loadPrefabByType(GameType.GuideMskNode, this.node.getChildByName("蒙版父节点"), (prefab) => { // prefab.zIndex = 199 let guideNodeArray = nodeArray @@ -670,7 +670,7 @@ export default class MainHall extends UiBase { } }) } - + } diff --git a/assets/Scripts/Manager/UserManager.ts b/assets/Scripts/Manager/UserManager.ts index f226e149..72d5b93d 100644 --- a/assets/Scripts/Manager/UserManager.ts +++ b/assets/Scripts/Manager/UserManager.ts @@ -23,7 +23,7 @@ export default class UserManager{ EventMgr.emitEvent_custom(ryw_Event.updateMoney,money, true); } - public static addMoney(money,startNode?,endNode?){ + public static addMoney(money,startNode?,endNode?,parentNode?){ if(money>0){ // Common5.playRemoteAudioEffect('sound/common/钱币入账') } @@ -31,7 +31,7 @@ export default class UserManager{ User.setMoney(User.getMoney() + money); EventMgr.emitEvent_custom(ryw_Event.updateMoney,money,true); if(startNode){ - PrefabManage.showMoneyFlyEffect(startNode,endNode) + PrefabManage.showMoneyFlyEffect(startNode,endNode,parentNode) } } diff --git a/assets/Scripts/Manager/ZaoCanManager.ts b/assets/Scripts/Manager/ZaoCanManager.ts index 9ca81b0f..6c0b12ee 100644 --- a/assets/Scripts/Manager/ZaoCanManager.ts +++ b/assets/Scripts/Manager/ZaoCanManager.ts @@ -29,23 +29,23 @@ let zaocanConfig = [ { id: 3, type: 3, zaocan: '油条', needLevel: 1, jiacheng: 1 }, { id: 4, type: 4, zaocan: '豆浆', needLevel: 1, jiacheng: 1 }, - { id: 5, type: 0, zaocan: '肉包', needLevel: 100, jiacheng: 0.3 }, - { id: 6, type: 1, zaocan: '茶叶蛋', needLevel: 150, jiacheng: 0.5 }, - { id: 7, type: 2, zaocan: '韭菜盒子', needLevel: 200, jiacheng: 0.7 }, - { id: 8, type: 3, zaocan: '麻球', needLevel: 250, jiacheng: 1 }, - { id: 9, type: 4, zaocan: '小米粥', needLevel: 300, jiacheng: 1.5 }, - - { id: 10, type: 0, zaocan: '烧卖', needLevel: 350, jiacheng: 2 }, - { id: 11, type: 1, zaocan: '玉米', needLevel: 400, jiacheng: 3 }, - { id: 12, type: 2, zaocan: '葱油饼', needLevel: 450, jiacheng: 4 }, - { id: 13, type: 3, zaocan: '油饼', needLevel: 500, jiacheng: 5 }, - { id: 14, type: 4, zaocan: '燕麦粥', needLevel: 550, jiacheng: 7 }, - - { id: 15, type: 0, zaocan: '红薯', needLevel: 600, jiacheng: 8 }, - { id: 16, type: 1, zaocan: '西兰花', needLevel: 650, jiacheng: 9 }, - { id: 17, type: 2, zaocan: '牛排', needLevel: 700, jiacheng: 10 }, - { id: 18, type: 3, zaocan: '鸡腿', needLevel: 750, jiacheng: 12 }, - { id: 19, type: 4, zaocan: '咖啡', needLevel: 800, jiacheng: 15 }, + { id: 5, type: 0, zaocan: '肉包', needLevel: 250, jiacheng: 0.3 }, + { id: 6, type: 1, zaocan: '茶叶蛋', needLevel: 300, jiacheng: 0.5 }, + { id: 7, type: 2, zaocan: '韭菜盒子', needLevel: 350, jiacheng: 0.7 }, + { id: 8, type: 3, zaocan: '麻球', needLevel: 400, jiacheng: 1 }, + { id: 9, type: 4, zaocan: '小米粥', needLevel: 450, jiacheng: 1.5 }, + + { id: 10, type: 0, zaocan: '烧卖', needLevel: 500, jiacheng: 2 }, + { id: 11, type: 1, zaocan: '玉米', needLevel: 550, jiacheng: 3 }, + { id: 12, type: 2, zaocan: '葱油饼', needLevel: 600, jiacheng: 4 }, + { id: 13, type: 3, zaocan: '油饼', needLevel: 650, jiacheng: 5 }, + { id: 14, type: 4, zaocan: '燕麦粥', needLevel: 700, jiacheng: 7 }, + + { id: 15, type: 0, zaocan: '红薯', needLevel: 750, jiacheng: 8 }, + { id: 16, type: 1, zaocan: '西兰花', needLevel: 800, jiacheng: 9 }, + { id: 17, type: 2, zaocan: '牛排', needLevel: 900, jiacheng: 10 }, + { id: 18, type: 3, zaocan: '鸡腿', needLevel: 1000, jiacheng: 12 }, + { id: 19, type: 4, zaocan: '咖啡', needLevel: 1200, jiacheng: 15 }, ] let levelUpUnLockTanWei = [ @@ -194,7 +194,8 @@ export default class ZaoCanManager { let effectUrls = ['sound/蒸笼/放饺子', 'sound/煮锅/煮东西', 'sound/煎锅/煎东西', 'sound/油锅/油炸', 'sound/豆浆桶/盛东西'] for (let i = 0; i < getzaoCanArray.length; i++) { if (zaocanConfig[i].type == type) { - + name = effectUrls[i] + break } } return name diff --git a/assets/Scripts/PrefabManager/PrefabManage.ts b/assets/Scripts/PrefabManager/PrefabManage.ts index f6860e9a..ac658329 100644 --- a/assets/Scripts/PrefabManager/PrefabManage.ts +++ b/assets/Scripts/PrefabManager/PrefabManage.ts @@ -879,7 +879,7 @@ export default class PrefabManage { } //金币飞动效果 - public static showMoneyFlyEffect(startNode, endNode?) { + public static showMoneyFlyEffect(startNode, endNode?,parentNode?) { let canvas = cc.find('Canvas') let moneyFlyLayer = canvas.getChildByName("moneyFlyLayer") @@ -888,7 +888,7 @@ export default class PrefabManage { } let script_: MoneyFlyEffect = moneyFlyLayer.getComponent('MoneyFlyEffect') - script_.playAnim(startNode) + script_.playAnim(startNode,parentNode) } //金币飞动效果1个 diff --git a/assets/Scripts/SCommon/MoneyFlyEffect.ts b/assets/Scripts/SCommon/MoneyFlyEffect.ts index c9cf3470..1e317f64 100644 --- a/assets/Scripts/SCommon/MoneyFlyEffect.ts +++ b/assets/Scripts/SCommon/MoneyFlyEffect.ts @@ -41,23 +41,23 @@ export default class MoneyFlyEffect extends cc.Component { } - playAnim(startNode) { + playAnim(startNode,parentNode?) { // let randomCount = Math.random() * 15 + 20; let randomCount = Math.random() * 15 + 10; //console.log(randomCount, 'randomCount++++++++++==') - let stPos = this.getNodeToTargetPos(this.node, startNode) + let stPos = this.getNodeToTargetPos(parentNode ?? this.node, startNode) let edPos = null let canvas = cc.find('Canvas') let prefabLayer = canvas.getChildByName("prefabLayer") if(prefabLayer && prefabLayer.childrenCount>1){ - edPos = this.getNodeToTargetPos(this.node, this.endPoint2) + edPos = this.getNodeToTargetPos(parentNode ?? this.node, this.endPoint2) }else{ - edPos = this.getNodeToTargetPos(this.node, this.endPoint) + edPos = this.getNodeToTargetPos(parentNode ?? this.node, this.endPoint) } // let randomR = Math.random() * 60 + 60; let randomR = Math.random() * 60 + 30; - this.playCoinFlyAnim(randomCount, stPos, edPos, randomR); + this.playCoinFlyAnim(randomCount, stPos, edPos, randomR,parentNode); } playAnimOne(startNode) { @@ -122,7 +122,7 @@ export default class MoneyFlyEffect extends cc.Component { }); } - playCoinFlyAnim(count: number, stPos: cc.Vec2, edPos: cc.Vec2, r: number = 130) { + playCoinFlyAnim(count: number, stPos: cc.Vec2, edPos: cc.Vec2, r: number = 130,parentNode?) { // 确保当前节点池有足够的金币 const poolSize = this.coinPool.size(); const reCreateCoinCount = poolSize > count ? 0 : count - poolSize; @@ -134,7 +134,8 @@ export default class MoneyFlyEffect extends cc.Component { let coinNodeList = points.map(pos => { let coin = this.coinPool.get(); coin.setPosition(stPos); - this.node.addChild(coin); + let parent = parentNode ?? this.node + parent.addChild(coin); return { node: coin, stPos: stPos, diff --git a/assets/Scripts/ZaoCanDian/ZaoCanDian.ts b/assets/Scripts/ZaoCanDian/ZaoCanDian.ts index 4836a472..81ecfe65 100644 --- a/assets/Scripts/ZaoCanDian/ZaoCanDian.ts +++ b/assets/Scripts/ZaoCanDian/ZaoCanDian.ts @@ -381,7 +381,7 @@ export default class ZaoCanDian extends cc.Component { cc.tween().bezierTo(time, c1, c2, _position), // cc.tween().to(time, { position: _position }), cc.tween().call(() => { - UserManager.addMoney(ZaoCanManager.getDanJia(), child) + UserManager.addMoney(ZaoCanManager.getDanJia(), child, null, this.node.parent.parent.getChildByName("prefabMoneyNode")) let com = _npc.getComponent(ZaoCanDianNpc) com.setNeedNumLabel() if (com.getNeedNum() == 0) { @@ -430,7 +430,7 @@ export default class ZaoCanDian extends cc.Component { cc.tween().bezierTo(time, c1, c2, _position), // cc.tween().to(time, { position: _position }), cc.tween().call(() => { - UserManager.addMoney(ZaoCanManager.getDanJia(), child) + UserManager.addMoney(ZaoCanManager.getDanJia(), child, null, this.node.parent.parent.getChildByName("prefabMoneyNode")) let com = _npc.getComponent(ZaoCanDianNpc) com.setNeedNumLabel() if (com.getNeedNum() == 0) { diff --git a/assets/Scripts/addDesk/addDeskScript.ts b/assets/Scripts/addDesk/addDeskScript.ts index d5109619..29e28d66 100644 --- a/assets/Scripts/addDesk/addDeskScript.ts +++ b/assets/Scripts/addDesk/addDeskScript.ts @@ -43,11 +43,11 @@ export default class addDeskScript extends UiBase { User.setDeskReward(true) let earnMoney = LevelUpManager.levelUpSpned() - if(earnMoney*3>=100000){ - UserManager.addMoney(earnMoney*3) - }else{ + // if(earnMoney*3>=100000){ + // UserManager.addMoney(earnMoney*3) + // }else{ UserManager.addMoney(100000) - } + // } LevelUpManager.peopleLevelUp(10) PrefabManage.showTextTips('添加桌面奖励到账',2) diff --git a/assets/ZaoCanDian/prefab/ZaoCanDian.prefab b/assets/ZaoCanDian/prefab/ZaoCanDian.prefab index e96304fd..acc6eeb3 100644 --- a/assets/ZaoCanDian/prefab/ZaoCanDian.prefab +++ b/assets/ZaoCanDian/prefab/ZaoCanDian.prefab @@ -6333,15 +6333,15 @@ "ctor": "Float64Array", "array": [ 0, - 104.299, + -193.824, 0, 0, 0, 0, 1, - 1, - 1, - 1 + 1.5, + 1.5, + 0 ] }, "_eulerAngles": { diff --git a/assets/addDesk/prefab/addDesk.prefab b/assets/addDesk/prefab/addDesk.prefab index b3ecd8c4..62424bfe 100644 --- a/assets/addDesk/prefab/addDesk.prefab +++ b/assets/addDesk/prefab/addDesk.prefab @@ -24,38 +24,38 @@ "__id__": 6 }, { - "__id__": 9 + "__id__": 17 }, { - "__id__": 14 + "__id__": 22 }, { - "__id__": 17 + "__id__": 25 }, { - "__id__": 20 + "__id__": 28 }, { - "__id__": 25 + "__id__": 33 } ], "_active": true, "_components": [ { - "__id__": 30 + "__id__": 38 }, { - "__id__": 31 + "__id__": 39 }, { - "__id__": 32 + "__id__": 40 }, { - "__id__": 33 + "__id__": 41 } ], "_prefab": { - "__id__": 34 + "__id__": 42 }, "_opacity": 255, "_color": { @@ -231,15 +231,22 @@ "_parent": { "__id__": 1 }, - "_children": [], + "_children": [ + { + "__id__": 7 + }, + { + "__id__": 11 + } + ], "_active": true, "_components": [ { - "__id__": 7 + "__id__": 15 } ], "_prefab": { - "__id__": 8 + "__id__": 16 }, "_opacity": 255, "_color": { @@ -288,6 +295,264 @@ "groupIndex": 0, "_id": "" }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 6 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 46.25, + "height": 29.2 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -75.085, + 21.32, + 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__": 7 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "10万", + "_N$string": "10万", + "_fontSize": 20, + "_lineHeight": 20, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 2, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "93pvKy1xZKWplQ5HaHvvx3", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 6 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 14 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117.93, + "height": 29.2 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 52.945, + 21.32, + 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__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "主角等级+10", + "_N$string": "主角等级+10", + "_fontSize": 20, + "_lineHeight": 20, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 2, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0bDiEs0JlFLIhmltCwLAk2", + "sync": false + }, { "__type__": "cc.Sprite", "_name": "", @@ -342,14 +607,14 @@ "_active": true, "_components": [ { - "__id__": 10 + "__id__": 18 }, { - "__id__": 11 + "__id__": 19 } ], "_prefab": { - "__id__": 13 + "__id__": 21 }, "_opacity": 255, "_color": { @@ -403,7 +668,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 9 + "__id__": 17 }, "_enabled": true, "_materials": [ @@ -435,7 +700,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 9 + "__id__": 17 }, "_enabled": true, "_normalMaterial": null, @@ -444,7 +709,7 @@ "zoomScale": 1.2, "clickEvents": [ { - "__id__": 12 + "__id__": 20 } ], "_N$interactable": true, @@ -534,11 +799,11 @@ "_active": true, "_components": [ { - "__id__": 15 + "__id__": 23 } ], "_prefab": { - "__id__": 16 + "__id__": 24 }, "_opacity": 255, "_color": { @@ -592,7 +857,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 14 + "__id__": 22 }, "_enabled": true, "_materials": [ @@ -639,11 +904,11 @@ "_active": true, "_components": [ { - "__id__": 18 + "__id__": 26 } ], "_prefab": { - "__id__": 19 + "__id__": 27 }, "_opacity": 255, "_color": { @@ -697,7 +962,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 17 + "__id__": 25 }, "_enabled": true, "_materials": [ @@ -744,14 +1009,14 @@ "_active": true, "_components": [ { - "__id__": 21 + "__id__": 29 }, { - "__id__": 22 + "__id__": 30 } ], "_prefab": { - "__id__": 24 + "__id__": 32 }, "_opacity": 255, "_color": { @@ -805,7 +1070,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 20 + "__id__": 28 }, "_enabled": true, "_materials": [ @@ -837,7 +1102,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 20 + "__id__": 28 }, "_enabled": true, "_normalMaterial": null, @@ -846,7 +1111,7 @@ "zoomScale": 1.2, "clickEvents": [ { - "__id__": 23 + "__id__": 31 } ], "_N$interactable": true, @@ -917,7 +1182,7 @@ { "__type__": "cc.PrefabInfo", "root": { - "__id__": 20 + "__id__": 28 }, "asset": { "__uuid__": "e79c5fde-c1d9-48f9-8d0d-09effd60e8de" @@ -936,14 +1201,14 @@ "_active": false, "_components": [ { - "__id__": 26 + "__id__": 34 }, { - "__id__": 27 + "__id__": 35 } ], "_prefab": { - "__id__": 29 + "__id__": 37 }, "_opacity": 255, "_color": { @@ -997,7 +1262,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 25 + "__id__": 33 }, "_enabled": true, "_materials": [ @@ -1029,7 +1294,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 25 + "__id__": 33 }, "_enabled": true, "_normalMaterial": null, @@ -1038,7 +1303,7 @@ "zoomScale": 1.2, "clickEvents": [ { - "__id__": 28 + "__id__": 36 } ], "_N$interactable": true, @@ -1109,7 +1374,7 @@ { "__type__": "cc.PrefabInfo", "root": { - "__id__": 25 + "__id__": 33 }, "asset": { "__uuid__": "e79c5fde-c1d9-48f9-8d0d-09effd60e8de" diff --git a/assets/addDesk/texture/添加桌面.png b/assets/addDesk/texture/添加桌面.png index 1bea4030..5caf35f8 100644 Binary files a/assets/addDesk/texture/添加桌面.png and b/assets/addDesk/texture/添加桌面.png differ