feat(游戏): 新增背景音乐资源,添加播放逻辑并优化教程UI
新增主页与战斗场景的背景音乐文件及对应的导入配置 在主页和战斗任务组件中添加循环播放背景音乐的逻辑 调整四个新手教程引导预制体的文字、字体、描边与布局参数
This commit is contained in:
@@ -710,10 +710,10 @@
|
|||||||
"_string": "点击开始游戏",
|
"_string": "点击开始游戏",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 36,
|
"_actualFontSize": 51,
|
||||||
"_fontSize": 35,
|
"_fontSize": 50,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 50,
|
||||||
"_overflow": 2,
|
"_overflow": 2,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
"_font": null,
|
"_font": null,
|
||||||
@@ -732,7 +732,7 @@
|
|||||||
"b": 0,
|
"b": 0,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_outlineWidth": 2,
|
"_outlineWidth": 4,
|
||||||
"_enableShadow": false,
|
"_enableShadow": false,
|
||||||
"_shadowColor": {
|
"_shadowColor": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
|
|||||||
@@ -406,7 +406,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 279.527,
|
"y": 418.633,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -707,13 +707,13 @@
|
|||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_string": "点击开始游戏",
|
"_string": "选择一个战斗技能",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 36,
|
"_actualFontSize": 46,
|
||||||
"_fontSize": 35,
|
"_fontSize": 45,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 50,
|
||||||
"_overflow": 2,
|
"_overflow": 2,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
"_font": null,
|
"_font": null,
|
||||||
@@ -732,7 +732,7 @@
|
|||||||
"b": 0,
|
"b": 0,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_outlineWidth": 2,
|
"_outlineWidth": 3,
|
||||||
"_enableShadow": false,
|
"_enableShadow": false,
|
||||||
"_shadowColor": {
|
"_shadowColor": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
@@ -762,8 +762,6 @@
|
|||||||
"__id__": 0
|
"__id__": 0
|
||||||
},
|
},
|
||||||
"fileId": "25KvUjWTBKZq5B20vwtseT",
|
"fileId": "25KvUjWTBKZq5B20vwtseT",
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
"nestedPrefabInstanceRoots": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1178,14 +1176,14 @@
|
|||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 49
|
"__id__": 49
|
||||||
},
|
},
|
||||||
"_alignFlags": 40,
|
"_alignFlags": 42,
|
||||||
"_target": null,
|
"_target": null,
|
||||||
"_left": 0,
|
"_left": 0,
|
||||||
"_right": 0,
|
"_right": 0,
|
||||||
"_top": 590,
|
"_top": 590,
|
||||||
"_bottom": 590,
|
"_bottom": 590,
|
||||||
"_horizontalCenter": 0,
|
"_horizontalCenter": 0,
|
||||||
"_verticalCenter": 0,
|
"_verticalCenter": 418.633,
|
||||||
"_isAbsLeft": true,
|
"_isAbsLeft": true,
|
||||||
"_isAbsRight": true,
|
"_isAbsRight": true,
|
||||||
"_isAbsTop": true,
|
"_isAbsTop": true,
|
||||||
|
|||||||
@@ -402,7 +402,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 0,
|
"y": 248.35000000000002,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -703,13 +703,13 @@
|
|||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_string": "点击开始游戏",
|
"_string": "选中卡牌向上滑动,召唤英雄",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 36,
|
"_actualFontSize": 41,
|
||||||
"_fontSize": 35,
|
"_fontSize": 40,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 50,
|
||||||
"_overflow": 2,
|
"_overflow": 2,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
"_font": null,
|
"_font": null,
|
||||||
@@ -728,7 +728,7 @@
|
|||||||
"b": 0,
|
"b": 0,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_outlineWidth": 2,
|
"_outlineWidth": 4,
|
||||||
"_enableShadow": false,
|
"_enableShadow": false,
|
||||||
"_shadowColor": {
|
"_shadowColor": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
@@ -1174,12 +1174,12 @@
|
|||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 49
|
"__id__": 49
|
||||||
},
|
},
|
||||||
"_alignFlags": 40,
|
"_alignFlags": 44,
|
||||||
"_target": null,
|
"_target": null,
|
||||||
"_left": 0,
|
"_left": 0,
|
||||||
"_right": 0,
|
"_right": 0,
|
||||||
"_top": 590,
|
"_top": 590,
|
||||||
"_bottom": 590,
|
"_bottom": 788.35,
|
||||||
"_horizontalCenter": 0,
|
"_horizontalCenter": 0,
|
||||||
"_verticalCenter": 0,
|
"_verticalCenter": 0,
|
||||||
"_isAbsLeft": true,
|
"_isAbsLeft": true,
|
||||||
@@ -1303,7 +1303,6 @@
|
|||||||
"__id__": 0
|
"__id__": 0
|
||||||
},
|
},
|
||||||
"fileId": "6dh4o/8p1Cy5An1p6o4Bc3",
|
"fileId": "6dh4o/8p1Cy5An1p6o4Bc3",
|
||||||
"instance": null,
|
"instance": null
|
||||||
"targetOverrides": null
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -335,12 +335,12 @@
|
|||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 14
|
"__id__": 14
|
||||||
},
|
},
|
||||||
"_alignFlags": 0,
|
"_alignFlags": 36,
|
||||||
"_target": null,
|
"_target": null,
|
||||||
"_left": 0,
|
"_left": 651.948,
|
||||||
"_right": 0,
|
"_right": 67.05200000000002,
|
||||||
"_top": 0,
|
"_top": 0,
|
||||||
"_bottom": 0,
|
"_bottom": 50.20600000000002,
|
||||||
"_horizontalCenter": 0,
|
"_horizontalCenter": 0,
|
||||||
"_verticalCenter": 0,
|
"_verticalCenter": 0,
|
||||||
"_isAbsLeft": true,
|
"_isAbsLeft": true,
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
"_isAbsBottom": true,
|
"_isAbsBottom": true,
|
||||||
"_isAbsHorizontalCenter": true,
|
"_isAbsHorizontalCenter": true,
|
||||||
"_isAbsVerticalCenter": true,
|
"_isAbsVerticalCenter": true,
|
||||||
"_originalWidth": 0,
|
"_originalWidth": 1,
|
||||||
"_originalHeight": 0,
|
"_originalHeight": 0,
|
||||||
"_alignMode": 2,
|
"_alignMode": 2,
|
||||||
"_lockFlags": 0,
|
"_lockFlags": 0,
|
||||||
@@ -707,13 +707,13 @@
|
|||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_string": "点击开始游戏",
|
"_string": "点击「战斗」进入战斗阶段",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 36,
|
"_actualFontSize": 41,
|
||||||
"_fontSize": 35,
|
"_fontSize": 40,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 50,
|
||||||
"_overflow": 2,
|
"_overflow": 2,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
"_font": null,
|
"_font": null,
|
||||||
@@ -732,7 +732,7 @@
|
|||||||
"b": 0,
|
"b": 0,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_outlineWidth": 2,
|
"_outlineWidth": 4,
|
||||||
"_enableShadow": false,
|
"_enableShadow": false,
|
||||||
"_shadowColor": {
|
"_shadowColor": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
|
|||||||
BIN
assets/resources/music/BATTLE.wav
Normal file
BIN
assets/resources/music/BATTLE.wav
Normal file
Binary file not shown.
14
assets/resources/music/BATTLE.wav.meta
Normal file
14
assets/resources/music/BATTLE.wav.meta
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "7077f9ac-0d7f-49b2-b1fc-258f48ebcb92",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".wav"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/resources/music/home.wav
Normal file
BIN
assets/resources/music/home.wav
Normal file
Binary file not shown.
14
assets/resources/music/home.wav.meta
Normal file
14
assets/resources/music/home.wav.meta
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "70867b0a-df6f-4e16-be5d-761e17533c5b",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".wav"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -307,6 +307,9 @@ export class MissionComp extends CCComp {
|
|||||||
loading.active = false
|
loading.active = false
|
||||||
}, 0.5)
|
}, 0.5)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 播放战斗背景音乐
|
||||||
|
oops.audio.playerMusicLoop("music/BATTLE");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更新开始按钮的状态显示 */
|
/** 更新开始按钮的状态显示 */
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ export class MissionHomeComp extends CCComp {
|
|||||||
this.uodate_data()
|
this.uodate_data()
|
||||||
this.hideAllPages()
|
this.hideAllPages()
|
||||||
this.node.active=true
|
this.node.active=true
|
||||||
|
// 播放主页背景音乐
|
||||||
|
oops.audio.playerMusicLoop("music/home")
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更新主页显示数据(预留) */
|
/** 更新主页显示数据(预留) */
|
||||||
|
|||||||
Reference in New Issue
Block a user