yangqiwen 1 month ago
parent 55ee1a5a54
commit bb095f705f
  1. 27
      assets/CommonRes/spine/按钮/出门.atlas
  2. 6
      assets/CommonRes/spine/按钮/出门.atlas.meta
  3. 107
      assets/CommonRes/spine/按钮/出门.json
  4. 10
      assets/CommonRes/spine/按钮/出门.json.meta
  5. BIN
      assets/CommonRes/spine/按钮/出门.png
  6. 38
      assets/CommonRes/spine/按钮/出门.png.meta
  7. 434
      assets/GameRes/JuQingChat/prefab/chatList.prefab
  8. 16
      assets/GameRoomRes/Room1/prefab/Room1.prefab
  9. 12
      assets/MainHall/prefab/MainHall.prefab
  10. 1
      assets/Scripts/DH/DH_1.ts
  11. 2
      assets/Scripts/DH/DH_3.ts
  12. 8
      assets/Scripts/GameRoomRes/Room1/Room1.ts
  13. 7
      assets/Scripts/GameRoomRes/Room2/Room2.ts
  14. 7
      assets/Scripts/GameStoryRes/GameStory4.ts
  15. 27
      assets/Scripts/MainHall/MainHall.ts
  16. 13
      assets/Scripts/Manager/UserManager.ts
  17. 19
      assets/Scripts/Manager/ZaoCanManager.ts
  18. 19
      assets/Scripts/PrefabManager/PrefabManage.ts
  19. 62
      assets/Scripts/SCommon/MoneyFlyEffect.ts
  20. 100
      assets/Scripts/ZaoCanDian/ZaoCanDian.ts
  21. 10
      assets/ZaoCanDian/prefab/ZaoCanDian.prefab
  22. BIN
      remotesound/effect/敲门声.mp3

@ -0,0 +1,27 @@
出门.png
size: 141,80
format: RGBA8888
filter: Linear,Linear
repeat: none
出门
rotate: true
xy: 76, 35
size: 43, 57
orig: 45, 60
offset: 1, 1
index: -1
出门0
rotate: false
xy: 2, 2
size: 72, 76
orig: 74, 78
offset: 1, 1
index: -1
出门字
rotate: false
xy: 76, 3
size: 63, 30
orig: 65, 32
offset: 1, 1
index: -1

@ -0,0 +1,6 @@
{
"ver": "1.0.3",
"uuid": "b4fd24df-bcd4-49ee-8031-17cf03478909",
"importer": "asset",
"subMetas": {}
}

@ -0,0 +1,107 @@
{
"skeleton": { "hash": "YJ0mFFiFcINibCRXA3LLIITFeOs", "spine": "3.8.75", "images": "./images/", "audio": "C:/Users/LongKong/Documents/WXWork/1688855657527795/Cache/File/2025-02/咸鱼的反击 图标" },
"bones": [
{ "name": "root" },
{ "name": "骨骼2", "parent": "root" },
{ "name": "骨骼", "parent": "骨骼2" },
{ "name": "bone", "parent": "骨骼2", "x": -2.93, "y": -46.12 }
],
"slots": [
{ "name": "出门0", "bone": "骨骼" },
{ "name": "出门", "bone": "骨骼" },
{ "name": "出门字", "bone": "bone" }
],
"skins": [
{
"name": "default",
"attachments": {
"出门0": {
"出门0": { "x": -2, "y": -4, "width": 74, "height": 78 }
},
"出门字": {
"出门字": { "x": 0.43, "y": 4.12, "width": 65, "height": 32 }
},
"出门": {
"出门": { "x": -2.5, "y": -1, "width": 45, "height": 60 }
}
}
}
],
"animations": {
"出门": {
"slots": {
"出门": {
"attachment": [
{ "name": "出门" }
]
},
"出门0": {
"attachment": [
{ "name": "出门0" }
]
},
"出门字": {
"attachment": [
{ "name": "出门字" }
]
}
}
},
"出门呼吸": {
"slots": {
"出门": {
"attachment": [
{ "name": "出门" }
]
},
"出门0": {
"attachment": [
{ "name": "出门0" }
]
},
"出门字": {
"attachment": [
{ "name": "出门字" }
]
}
},
"bones": {
"骨骼2": {
"scale": [
{ "curve": 0.25, "c3": 0.75 },
{ "time": 1, "x": 1.15, "y": 1.15, "curve": 0.25, "c3": 0.75 },
{ "time": 2 }
]
}
}
},
"出门抖动": {
"slots": {
"出门": {
"attachment": [
{ "name": "出门" }
]
},
"出门0": {
"attachment": [
{ "name": "出门0" }
]
},
"出门字": {
"attachment": [
{ "name": "出门字" }
]
}
},
"bones": {
"骨骼": {
"rotate": [
{ "angle": 5.44, "curve": 0.25, "c3": 0.75 },
{ "time": 0.1, "angle": -16.53, "curve": 0.25, "c3": 0.75 },
{ "time": 0.2, "angle": 5.44 }
]
}
}
}
}
}

@ -0,0 +1,10 @@
{
"ver": "1.2.5",
"uuid": "acfa9eef-6ac2-40d9-94f9-750eee20975e",
"importer": "spine",
"textures": [
"0e048c18-469e-4535-90a9-5efd50729e21"
],
"scale": 1,
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -0,0 +1,38 @@
{
"ver": "2.3.7",
"uuid": "0e048c18-469e-4535-90a9-5efd50729e21",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 141,
"height": 80,
"platformSettings": {},
"subMetas": {
"出门": {
"ver": "1.0.6",
"uuid": "19b4ba37-ebc0-4588-a58e-48b6621e68ec",
"importer": "sprite-frame",
"rawTextureUuid": "0e048c18-469e-4535-90a9-5efd50729e21",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 2,
"trimY": 2,
"width": 137,
"height": 76,
"rawWidth": 141,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

@ -31,22 +31,25 @@
},
{
"__id__": 78
},
{
"__id__": 87
}
],
"_active": true,
"_components": [
{
"__id__": 87
"__id__": 99
},
{
"__id__": 88
"__id__": 100
},
{
"__id__": 89
"__id__": 101
}
],
"_prefab": {
"__id__": 90
"__id__": 102
},
"_opacity": 255,
"_color": {
@ -3029,6 +3032,429 @@
"fileId": "7cF8M3zRNM2KuSpoKVHJJU",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "exitRoom",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 88
}
],
"_active": true,
"_components": [
{
"__id__": 94
},
{
"__id__": 96
},
{
"__id__": 97
}
],
"_prefab": {
"__id__": 98
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 120,
"height": 120
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-589.014,
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": "返回",
"_objFlags": 0,
"_parent": {
"__id__": 87
},
"_children": [
{
"__id__": 89
}
],
"_active": true,
"_components": [
{
"__id__": 92
}
],
"_prefab": {
"__id__": 93
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 156,
"height": 66
},
"_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.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 88
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 90
}
],
"_prefab": {
"__id__": 91
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 31.5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
2.956,
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__": 89
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "放下手机",
"_N$string": "放下手机",
"_fontSize": 25,
"_lineHeight": 25,
"_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.PrefabInfo",
"root": {
"__id__": 87
},
"asset": {
"__uuid__": "ac036a02-5ea3-4d6c-abf4-a95fc1b501be"
},
"fileId": "afzf/V4ulEt7opd8Wda5Nj",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "0ee98f53-8de6-409c-b645-bd2236613969"
},
"_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__": 87
},
"asset": {
"__uuid__": "ac036a02-5ea3-4d6c-abf4-a95fc1b501be"
},
"fileId": "82hzNn92BPLIvmdELHsCQG",
"sync": false
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.1,
"clickEvents": [
{
"__id__": 95
}
],
"_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": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 87
},
"component": "",
"_componentId": "243cedt7AZGEYX+NJnX69Md",
"handler": "onBtnExitRoomClick",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 4,
"_left": 325.245,
"_right": 0,
"_top": 1189.223,
"_bottom": 17.98599999999999,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 120,
"_id": ""
},
{
"__type__": "243cedt7AZGEYX+NJnX69Md",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 87
},
"asset": {
"__uuid__": "ac036a02-5ea3-4d6c-abf4-a95fc1b501be"
},
"fileId": "b9jv0EOeFF9KaL6fHxfIxR",
"sync": false
},
{
"__type__": "9ca71RSiS5PiruNFQKOQzjW",
"_name": "",

@ -939,7 +939,7 @@
"ctor": "Float64Array",
"array": [
0,
-10,
6.972,
0,
0,
0,
@ -977,8 +977,8 @@
}
],
"paused": false,
"defaultSkin": "手机",
"defaultAnimation": "静止",
"defaultSkin": "default",
"defaultAnimation": "手机",
"_preCacheMode": 0,
"_cacheMode": 0,
"loop": true,
@ -989,13 +989,13 @@
"_frameCache": null,
"_curFrame": null,
"_skeletonCache": null,
"_animationName": "静止",
"_animationName": "手机",
"_animationQueue": [],
"_headAniInfo": null,
"_playTimes": 0,
"_isAniComplete": true,
"_N$skeletonData": {
"__uuid__": "428ffea6-6e1a-422d-b5b0-3aa536ad2589"
"__uuid__": "15668060-f9d9-44cf-9a28-947a74ec4a8e"
},
"_N$_defaultCacheMode": 0,
"_N$debugSlots": false,
@ -1942,7 +1942,7 @@
],
"paused": false,
"defaultSkin": "default",
"defaultAnimation": "手机1",
"defaultAnimation": "手机呼吸",
"_preCacheMode": 0,
"_cacheMode": 0,
"loop": true,
@ -1953,13 +1953,13 @@
"_frameCache": null,
"_curFrame": null,
"_skeletonCache": null,
"_animationName": "手机1",
"_animationName": "手机呼吸",
"_animationQueue": [],
"_headAniInfo": null,
"_playTimes": 0,
"_isAniComplete": true,
"_N$skeletonData": {
"__uuid__": "91f4b847-692f-4694-86f8-3e5a8eb9cf66"
"__uuid__": "15668060-f9d9-44cf-9a28-947a74ec4a8e"
},
"_N$_defaultCacheMode": 0,
"_N$debugSlots": false,

@ -3134,7 +3134,7 @@
"ctor": "Float64Array",
"array": [
-333,
386.587,
387,
0,
0,
0,
@ -3203,7 +3203,7 @@
"_alignFlags": 9,
"_left": 13.5,
"_right": 0,
"_top": 243.913,
"_top": 243.5,
"_bottom": 997.698,
"_verticalCenter": 0,
"_horizontalCenter": 0,
@ -3355,8 +3355,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-333.31499999999994,
302.729,
-264,
387,
0,
0,
0,
@ -3423,9 +3423,9 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 13.18500000000003,
"_left": 82.49999999999997,
"_right": 0,
"_top": 327.271,
"_top": 243,
"_bottom": 997.198,
"_verticalCenter": 0,
"_horizontalCenter": 0,

@ -106,6 +106,7 @@ export default class DH_1 extends DHBase {
(func) => {
this.nanzhu.node.active = false
this.daerguang.node.active = true
Common5.playEffectCustom('KaiChangGuanQia1Gai', 'sound/打耳光')
this.daerguang.setAnimation(0, "打耳光", false)
this.daerguang.setCompleteListener(() => {
this.daerguang.setCompleteListener(null)

@ -15,7 +15,7 @@ const { ccclass, property, disallowMultiple, menu } = cc._decorator;
@menu('对话剧情/DH_3')
export default class DH_3 extends DHBase {
chatConfig = [
{ effectUrl: 'DH/DH_3/sound/我要的钱带来了没', delayTime: 1.3, str: '我要的钱带来了没', posi: 'qipao2' },
{ effectUrl: 'DH/DH_3/sound/我要的钱带来了没', delayTime: 1.3, str: '我要的钱带来了没', posi: 'qipao2' },
{ effectUrl: 'DH/DH_3/sound/2000万一分不少,把人放了。', delayTime: 2.58, str: '2000万一分不少,把人放了。', posi: '-1' },
{ effectUrl: 'DH/DH_3/sound/人就在里面,你自己进去带走吧', delayTime: 2.36, str: '人就在里面,你自己进去带走吧', posi: 'qipao2' },
{ effectUrl: 'DH/DH_3/sound/到底是谁指使你的?', delayTime: 1.8, str: '到底是谁指使你的?', posi: '-1' },

@ -41,11 +41,11 @@ export default class Room1 extends cc.Component {
let indexStr = JuQingManager.getCurJuQingUnLockIndex()
if (ChatManager.isChatTypeIncludeEventIndex('WX', indexStr)) {
let spineNode = this.node.getChildByName('手机').getChildByName('spine')
spineNode.getComponent(sp.Skeleton).setAnimation(0, '闪烁', true)
spineNode.getComponent(sp.Skeleton).setAnimation(0, '手机抖动', true)
Common5.playEffect('sound/手机信息')
} else {
let spineNode = this.node.getChildByName('手机').getChildByName('spine')
spineNode.getComponent(sp.Skeleton).setAnimation(0, '静止', false)
spineNode.getComponent(sp.Skeleton).setAnimation(0, '手机', false)
}
let isHaveTask = false
@ -67,9 +67,9 @@ export default class Room1 extends cc.Component {
openBtnSpine.setPosition(cc.v2(0, 0))
openBtnSpine.active = true
shouJi.opacity = 0
openBtnSpine.getComponent(sp.Skeleton).setAnimation(0, '手机1', false)
openBtnSpine.getComponent(sp.Skeleton).setAnimation(0, '手机呼吸', false)
this.scheduleOnce(() => {
openBtnSpine.getComponent(sp.Skeleton).setAnimation(0, '手机2', false)
openBtnSpine.getComponent(sp.Skeleton).setAnimation(0, '手机', false)
cc.tween(openBtnSpine)
.to(0.5, { x: shouJi.x, y: shouJi.y })

@ -247,10 +247,11 @@ export default class Room2 extends cc.Component {
this.showQiPao(ChadianConfig.chadianLog402[1], () => {
this.node.getChildByName('mainNode').getChildByName('敲门').active = true
this.node.getChildByName('mainNode').getChildByName('敲门').getComponent(sp.Skeleton).setAnimation(0, '敲门', true)
Common5.playRemoteAudioEffect('effect/敲门声')
Common5.playRemoteAudioEffect('effect/敲门声', true)
this.scheduleOnce(() => {
this.showQiPao(ChadianConfig.chadianLog402[2], () => {
PrefabManage.showBlackGuoDu(() => {
cc.audioEngine.stopAllEffects();
this.node.getChildByName('mainNode').getChildByName('敲门').active = false
User.setStatistics("zhangJie", 4)
TaskManager.finishCurMainTask(MainTaskIdEnum.MainTask_402)
@ -540,7 +541,9 @@ export default class Room2 extends cc.Component {
if (mainId == MainTaskIdEnum.MainTask_301) {
User.setFirstStepIndex(3)
}
PrefabManage.loadPrefabByType(GameType.MainHall)
PrefabManage.showBlackGuoDu(() => {
PrefabManage.loadPrefabByType(GameType.MainHall)
})
if (cc.isValid(this.maskGuideNode)) {
this.maskGuideNode.removeFromParent()

@ -115,7 +115,12 @@ export default class GameStory4 extends cc.Component {
TaskManager.finishCurMainTask(MainTaskIdEnum.MainTask_602);
TaskManager.setCurTask(MainTaskIdEnum.MainTask_603);
EventMgr.emitEvent_custom(ryw_Event.RefreshJuQingDuiHua);
this.node.removeFromParent();
// this.node.removeFromParent();
PrefabManage.showBlackGuoDu(() => {
PrefabManage.loadPrefabByType(GameType.MainHall)
this.node.removeFromParent()
this.node.destroy()
})
// Common5.releaseBundleAssets('GameStory4')
}, 2);
}

@ -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' },
@ -551,6 +551,25 @@ export default class MainHall extends UiBase {
TaskManager.setCurTask(MainTaskIdEnum.MainTask_605)
}
let myMoney = UserManager.getCurMoney()
let levelUpSpned = LevelUpManager.levelUpSpned()
let node = this.node.getChildByName('UINode').getChildByName('bottom').getChildByName('升级')
if (myMoney - levelUpSpned >= 0) {
node.getChildByName("黄色按钮视频").active = false
// node.getChildByName("升级").getComponent(cc.Label).string = '升级'
} else {
node.getChildByName("黄色按钮视频").active = true
// let level = 5
// if (User.getMyLevel() < 600) {
// level = 5
// } else if (User.getMyLevel() >= 600 && User.getMyLevel() < 900) {
// level = 3
// } else {
// level = 2
// }
// node.getChildByName("升级").getComponent(cc.Label).string = `升级+${level}`
}
}
guideStep() {

@ -36,6 +36,19 @@ export default class UserManager{
}
public static addMoneyOne(money,startNode?,endNode?){
if(money>0){
// Common5.playRemoteAudioEffect('sound/common/钱币入账')
}
User.setMoney(User.getMoney() + money);
EventMgr.emitEvent_custom(ryw_Event.updateMoney,money,true);
if(startNode){
PrefabManage.showMoneyFlyEffectOne(startNode,endNode)
}
}
public static addMoney2(money){
User.setMoney(User.getMoney() + money);

@ -48,6 +48,14 @@ let zaocanConfig = [
{ id: 19, type: 4, zaocan: '咖啡', needLevel: 800, jiacheng: 15 },
]
let levelUpUnLockTanWei = [
{ level: 0, unlock: '油条' },
{ level: 50, unlock: '鸡蛋' },
{ level: 100, unlock: '饺子' },
{ level: 150, unlock: '豆浆' },
{ level: 200, unlock: '馒头' },
]
//食谱
export default class ZaoCanManager {
@ -192,6 +200,17 @@ export default class ZaoCanManager {
return name
}
public static getUnlockTanWei() {
let level = User.getMyLevel()
let unlocks = []
for (let i = 0; i < levelUpUnLockTanWei.length; i++) {
if (level >= levelUpUnLockTanWei[i].level) {
unlocks.push(levelUpUnLockTanWei[i].unlock)
}
}
return unlocks
}
// public static getCurPriceById(id) {
// let config = zaocanConfig[id]
// let level = User.getMyLevel()

@ -235,7 +235,7 @@ export enum GameType {
GameStory5,
GameStory14,
GameStory22,
RoomCommon,
RoomNone,//空房间
Room1,
@ -506,10 +506,10 @@ let AllPrefabConfig = [
{ desc: "佛山电翰", gameType: GameType.FoShanDianHan, bundleName: "foShanDianHan", prefabUrl: "FoShanDianHan", dadianTag: '佛山电翰-进入', wanJiaDaDianTag: "佛山电翰-玩家", isNeedLoading: true },
{ desc: "小游戏主页", gameType: GameType.smallgame, bundleName: "smallgame", prefabUrl: "prefab/smallgame", dadianTag: '小游戏主页进入', wanJiaDaDianTag: "小游戏主页玩家", isNeedLoading: true },
{ desc: "售货机", gameType: GameType.ShouHuoji, bundleName: "shouhuoji", prefabUrl: "prefab/ShouHuoJiGai", dadianTag: '售货机-进入', wanJiaDaDianTag: "售货机-玩家", isNeedLoading: true },
{ desc: "剧情任务结果", gameType: GameType.TaskResult, bundleName: "MainPrefab", prefabUrl: "prefab/taskResult", dadianTag: '剧情任务结果-进入', wanJiaDaDianTag: "剧情任务结果-玩家", isNeedLoading: false },
{ desc: "街道", gameType: GameType.JieDao, bundleName: "JieDao", prefabUrl: "prefab/JieDao", dadianTag: '街道-进入', wanJiaDaDianTag: "街道-玩家", isNeedLoading: true },
{ desc: "早餐店", gameType: GameType.ZaoCanDian, bundleName: "ZaoCanDian", prefabUrl: "prefab/ZaoCanDian", dadianTag: '早餐店-进入', wanJiaDaDianTag: "早餐店-玩家", isNeedLoading: true },
{ desc: "早餐业务", gameType: GameType.ZaoCanDianYeWu, bundleName: "ZaoCanDian", prefabUrl: "prefab/ZaoCanDianYeWu", dadianTag: '早餐业务-进入', wanJiaDaDianTag: "早餐业务-玩家", isNeedLoading: true },
@ -891,6 +891,19 @@ export default class PrefabManage {
script_.playAnim(startNode)
}
//金币飞动效果1个
public static showMoneyFlyEffectOne(startNode, endNode?) {
let canvas = cc.find('Canvas')
let moneyFlyLayer = canvas.getChildByName("moneyFlyLayer")
if (!moneyFlyLayer) {
return
}
let script_: MoneyFlyEffect = moneyFlyLayer.getComponent('MoneyFlyEffect')
script_.playAnimOne(startNode)
}
public static showGoldFlyEffect(startNode) {
// let canvas = cc.find('Canvas')
// let goldFlyLayer = canvas.getChildByName("goldFlyLayer")

@ -59,6 +59,68 @@ export default class MoneyFlyEffect extends cc.Component {
let randomR = Math.random() * 60 + 30;
this.playCoinFlyAnim(randomCount, stPos, edPos, randomR);
}
playAnimOne(startNode) {
// let randomCount = Math.random() * 15 + 20;
let randomCount = Math.random() * 15 + 10;
//console.log(randomCount, 'randomCount++++++++++==')
let stPos = this.getNodeToTargetPos(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)
}else{
edPos = this.getNodeToTargetPos(this.node, this.endPoint)
}
// let randomR = Math.random() * 60 + 60;
let randomR = Math.random() * 60 + 30;
this.playCoinFlyAnimOne(1, stPos, edPos, 0);
}
playCoinFlyAnimOne(count: number, stPos: cc.Vec2, edPos: cc.Vec2, r: number = 130) {
// 确保当前节点池有足够的金币
const poolSize = this.coinPool.size();
const reCreateCoinCount = poolSize > count ? 0 : count - poolSize;
this.initCoinPool(reCreateCoinCount);
// 生成圆,并且对圆上的点进行排序
let points = this.getCirclePoints(r, stPos, count);
let coinNodeList = points.map(pos => {
let coin = this.coinPool.get();
coin.setPosition(stPos);
this.node.addChild(coin);
return {
node: coin,
stPos: stPos,
mdPos: pos,
edPos: edPos,
dis: (pos as any).sub(edPos).mag()
};
});
coinNodeList = coinNodeList.sort((a, b) => {
if (a.dis - b.dis > 0) return 1;
if (a.dis - b.dis < 0) return -1;
return 0;
});
// 执行金币落袋的动画
coinNodeList.forEach((item, idx) => {
item.node.runAction(
cc.sequence(
// cc.moveTo(0.3, item.mdPos),
// cc.delayTime(idx * 0.01),
cc.moveTo(0.5, item.edPos),
cc.callFunc(() => {
this.coinPool.put(item.node);
})
)
);
});
}
playCoinFlyAnim(count: number, stPos: cc.Vec2, edPos: cc.Vec2, r: number = 130) {
// 确保当前节点池有足够的金币

@ -84,6 +84,9 @@ export default class ZaoCanDian extends cc.Component {
{ effectUrl: 'DH/MainHall/sound/好啦,老板你开始营业赚钱吧!', delayTime: 2.31, str: '好啦,老板你开始营业赚钱吧!', posi: '员工对话' },
]
isJoin: any;
clickTieHeNum: any = 0;
clickTimeOutEvent: number;
audioId;
// LIFE-CYCLE CALLBACKS:
@ -120,6 +123,24 @@ export default class ZaoCanDian extends cc.Component {
this.guideStep()
}, this)
EventMgr.onEvent_custom(ryw_Event.levelUpChange, () => {
//摊位节点名字
let names = ['馒头', '鸡蛋', '饺子', '油条', '豆浆']
//解锁了的摊位
let unlocks = ZaoCanManager.getUnlockTanWei()
for (let i = 0; i < 5; i++) {
let tanwei = this.node.getChildByName("桌子").getChildByName(names[i] + "摊位")
let name = ZaoCanManager.getCurNameByType(i)
if (unlocks.includes(names[i])) {
this.ZaoCanArr[i] = name
tanwei.active = true
} else {
this.ZaoCanArr[i] = ''
tanwei.active = false
}
}
}, this)
}
RefreshJieDao() {
@ -134,11 +155,18 @@ export default class ZaoCanDian extends cc.Component {
let animation_names1 = ['蒸', '煮', '', '', '']
//余几个的动画名
let animation_names2 = ['', '', '静止', '静止放', '']
//解锁了的摊位
let unlocks = ZaoCanManager.getUnlockTanWei()
for (let i = 0; i < 5; i++) {
let name = ZaoCanManager.getCurNameByType(i)
this.ZaoCanArr[i] = name
let tanwei = this.node.getChildByName("桌子").getChildByName(names[i] + "摊位")
let name = ZaoCanManager.getCurNameByType(i)
if (unlocks.includes(names[i])) {
this.ZaoCanArr[i] = name
tanwei.active = true
} else {
this.ZaoCanArr[i] = ''
tanwei.active = false
}
let shengyuNum = 0
for (const child of this.fly_zaocan_parent.getChildByName(names[i] + "摊位").children) {
if (child.active) {
@ -218,6 +246,13 @@ export default class ZaoCanDian extends cc.Component {
let curDirect = this.lastDirect == Npc_Direct.LEFT ? Npc_Direct.RIGHT : Npc_Direct.LEFT
let needNum = Common5.getRandomNumber(1, 3)
let index = Common5.getRandomNumber(0, this.ZaoCanArr.length - 1)
let haveIndexs = [] //在非空字符串里面去随机
for (let i = 0; i < this.ZaoCanArr.length; i++) {
if (this.ZaoCanArr[i] != '') {
haveIndexs.push(i)
}
}
index = haveIndexs[Common5.getRandomNumber(0, haveIndexs.length - 1)]
if (User.getFirstStepIndex() == 3) {
index = 3//油条
needNum = 1
@ -238,6 +273,7 @@ export default class ZaoCanDian extends cc.Component {
}
getNpcEndIndex() {
// console.log(this.npc_Position_States)
let index
for (let i = 0; i < this.npc_Position_States.length; i++) {
let state = this.npc_Position_States[i]
@ -349,15 +385,14 @@ export default class ZaoCanDian extends cc.Component {
let com = _npc.getComponent(ZaoCanDianNpc)
com.setNeedNumLabel()
if (com.getNeedNum() == 0) {
this.scheduleOnce(() => {
this.npc_Position_States[com.getStateIndex()].isHaveNpc = false
}, 2)
this.npc_Position_States[com.getStateIndex()].isHaveNpc = false
com.getZaoCanAfter()
for (let j = this.npcNodes.length - 1; j >= 0; j--) {
if (this.npcNodes[j] === com.node) {
this.npcNodes.splice(j, 1)
}
}
com.setNeedNum(-1) //避免重复点击导致进多次这个判断..多次会一直重置isHaveNpc
}
child.removeFromParent()
child.destroy()
@ -399,15 +434,14 @@ export default class ZaoCanDian extends cc.Component {
let com = _npc.getComponent(ZaoCanDianNpc)
com.setNeedNumLabel()
if (com.getNeedNum() == 0) {
this.scheduleOnce(() => {
this.npc_Position_States[com.getStateIndex()].isHaveNpc = false
}, 2)
this.npc_Position_States[com.getStateIndex()].isHaveNpc = false
com.getZaoCanAfter()
for (let j = this.npcNodes.length - 1; j >= 0; j--) {
if (this.npcNodes[j] === com.node) {
this.npcNodes.splice(j, 1)
}
}
com.setNeedNum(-1) //避免重复点击导致进多次这个判断..多次会一直重置isHaveNpc
}
child.removeFromParent()
child.destroy()
@ -455,9 +489,9 @@ export default class ZaoCanDian extends cc.Component {
tanweiSpine.setCompleteListener(null)
this.TanWeiSpineState[tanweiIndex] = false
if (showNum == 3) {
if (tanweiIndex == 0) {
Common5.playEffectCustom('ZaoCanDian', 'sound/蒸笼/出锅')
}
// if (tanweiIndex == 0) {
// Common5.playEffectCustom('ZaoCanDian', 'sound/蒸笼/出锅')
// }
this.scheduleOnce(() => {
// Common5.playEffectCustom('ZaoCanDian', 'sound/通用/制作完成')
let spine = tanwei.getChildByName("获取光效").getComponent(sp.Skeleton)
@ -503,16 +537,28 @@ export default class ZaoCanDian extends cc.Component {
let mainTaskInfo: any = TaskManager.getCurUnLockMainTaskInfo()
let mainId = mainTaskInfo.Id
if (mainId == MainTaskIdEnum.MainTask_303 || mainId == MainTaskIdEnum.MainTask_401 || mainId == MainTaskIdEnum.MainTask_402) {
this.node.parent.parent.removeFromParent()
this.node.parent.parent.destroy()
PrefabManage.loadPrefabByType(GameType.Room2)
} else if (mainId == MainTaskIdEnum.MainTask_501) {
this.node.parent.parent.removeFromParent()
this.node.parent.parent.destroy()
PrefabManage.loadPrefabByType(GameType.DH_1)
} else if (mainId == MainTaskIdEnum.MainTask_503) {
this.node.parent.parent.removeFromParent()
this.node.parent.parent.destroy()
PrefabManage.loadPrefabByType(GameType.DH_5)
} else if (mainId == MainTaskIdEnum.MainTask_602) {
this.node.parent.parent.removeFromParent()
this.node.parent.parent.destroy()
PrefabManage.loadPrefabByType(GameType.GameStory4)
} else if (mainId == MainTaskIdEnum.MainTask_605 || mainId == MainTaskIdEnum.MainTask_606) {
this.node.parent.parent.removeFromParent()
this.node.parent.parent.destroy()
PrefabManage.loadPrefabByType(GameType.DH_3)
} else if (mainId == MainTaskIdEnum.MainTask_701 || mainId == MainTaskIdEnum.MainTask_702) {
this.node.parent.parent.removeFromParent()
this.node.parent.parent.destroy()
PrefabManage.loadPrefabByType(GameType.DH_4)
}
})
@ -536,11 +582,25 @@ export default class ZaoCanDian extends cc.Component {
}
onTouchTieHe() {
Common5.playRemoteAudioEffect('effect/铁盒子点击音效')
clearTimeout(this.clickTimeOutEvent);
this.clickTieHeNum++
if (this.clickTieHeNum == 1) {
cc.audioEngine.stop(this.audioId)
Common5.playRemoteAudioEffect_id('effect/铁盒子点击音效', true, (id) => {
this.audioId = id
})
}
this.clickTimeOutEvent = setTimeout(() => {
this.clickTieHeNum = 0
cc.audioEngine.stop(this.audioId)
}, 500);
this.tiehe.setAnimation(0, "抖动", false)
let level = User.getMyLevel()
let money = Common5.getNumberChangeHanzi(Math.ceil(2 * Math.pow(1.025, (level - 1))))
UserManager.addMoney(money, this.tiehe.node)
let money = Math.ceil(2 * Math.pow(1.025, (level - 1)))
UserManager.addMoneyOne(money, this.tiehe.node)
}
autoTimeEvent() {
@ -625,11 +685,11 @@ export default class ZaoCanDian extends cc.Component {
})
} else if (index == 8) {
this.showYuanGongChat(6, () => {
let names = ['馒头', '鸡蛋', '饺子', '油条', '豆浆']
for (let i = 0; i < names.length; i++) {
let tanwei = this.node.getChildByName("桌子").getChildByName(names[i] + "摊位")
tanwei.active = true
}
// let names = ['馒头', '鸡蛋', '饺子', '油条', '豆浆']
// for (let i = 0; i < names.length; i++) {
// let tanwei = this.node.getChildByName("桌子").getChildByName(names[i] + "摊位")
// tanwei.active = true
// }
let othernames = ['碗1', '铁盆', '钱盒', '碗']
for (const element of othernames) {
this.node.getChildByName("桌子").getChildByName(element).active = true

@ -1500,7 +1500,7 @@
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1.5,
"timeScale": 2,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
@ -2005,7 +2005,7 @@
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1.5,
"timeScale": 2,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
@ -2510,7 +2510,7 @@
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1,
"timeScale": 2,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
@ -2908,7 +2908,7 @@
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1.5,
"timeScale": 2,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
@ -3306,7 +3306,7 @@
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1.5,
"timeScale": 2,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,

Binary file not shown.
Loading…
Cancel
Save