188 lines
4.8 KiB
JSON
188 lines
4.8 KiB
JSON
{
|
|
"schemaVersion": 1,
|
|
"prefabName": "UI_MiniGameResult",
|
|
"prefabPath": "Assets/Game/Art/UI/Prefab/UI_MiniGameResult.prefab",
|
|
"description": "小游戏通用结算弹窗(胜利/失败/平局 + 比分文本 + 确定)。自带 Canvas(sortingOrder 30000)覆盖在小游戏 UI 之上;由 MiniGameHost 运行时按名绑定 Txt_Title/Txt_Message/Btn_Ok,无 MonoBehaviour 控制器。",
|
|
"canvas": {
|
|
"canvasScaler": {
|
|
"referenceResolution": [2048, 1024],
|
|
"matchWidthOrHeight": 0.5
|
|
}
|
|
},
|
|
"assets": {
|
|
"sprites": {
|
|
"ui_overlay_dim": "Assets/Game/Art/UI/Texture/Common/ui_overlay_dim.png",
|
|
"ui_panel_popup": "Assets/Game/Art/UI/Texture/Common/ui_panel_popup.png",
|
|
"btn_primary_normal": "Assets/Game/Art/UI/Texture/Common/btn_primary_normal.png",
|
|
"btn_primary_hover": "Assets/Game/Art/UI/Texture/Common/btn_primary_hover.png",
|
|
"btn_primary_pressed": "Assets/Game/Art/UI/Texture/Common/btn_primary_pressed.png",
|
|
"btn_primary_disabled": "Assets/Game/Art/UI/Texture/Common/btn_primary_disabled.png"
|
|
}
|
|
},
|
|
"nodes": [
|
|
{
|
|
"name": "UI_MiniGameResult",
|
|
"parent": null,
|
|
"active": true,
|
|
"rect": {
|
|
"anchorMin": [0, 0],
|
|
"anchorMax": [1, 1],
|
|
"offsetMin": [0, 0],
|
|
"offsetMax": [0, 0]
|
|
},
|
|
"components": [
|
|
{
|
|
"type": "Canvas",
|
|
"sortingOrder": 30000
|
|
},
|
|
{
|
|
"type": "CanvasScaler",
|
|
"referenceResolution": [2048, 1024],
|
|
"matchWidthOrHeight": 0.5
|
|
},
|
|
{
|
|
"type": "GraphicRaycaster"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Img_Mask",
|
|
"parent": "UI_MiniGameResult",
|
|
"active": true,
|
|
"rect": {
|
|
"anchorMin": [0, 0],
|
|
"anchorMax": [1, 1],
|
|
"offsetMin": [0, 0],
|
|
"offsetMax": [0, 0]
|
|
},
|
|
"components": [
|
|
{
|
|
"type": "Image",
|
|
"sprite": "ui_overlay_dim",
|
|
"imageType": "Simple",
|
|
"raycastTarget": true,
|
|
"color": "#FFFFFFFF"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Panel",
|
|
"parent": "Img_Mask",
|
|
"active": true,
|
|
"rect": {
|
|
"anchorMin": [0.5, 0.5],
|
|
"anchorMax": [0.5, 0.5],
|
|
"pivot": [0.5, 0.5],
|
|
"anchoredPosition": [0, 0],
|
|
"sizeDelta": [680, 420]
|
|
},
|
|
"components": [
|
|
{
|
|
"type": "Image",
|
|
"sprite": "ui_panel_popup",
|
|
"imageType": "Sliced",
|
|
"raycastTarget": true,
|
|
"color": "#FFFFFFFF"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Txt_Title",
|
|
"parent": "Panel",
|
|
"active": true,
|
|
"rect": {
|
|
"anchorMin": [0, 1],
|
|
"anchorMax": [1, 1],
|
|
"pivot": [0.5, 1],
|
|
"anchoredPosition": [0, -72],
|
|
"sizeDelta": [-96, 76]
|
|
},
|
|
"components": [
|
|
{
|
|
"type": "TextMeshProUGUI",
|
|
"text": "游戏结束",
|
|
"fontSize": 52,
|
|
"fontStyle": "Bold",
|
|
"alignment": "Center",
|
|
"color": "#102033FF"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Txt_Message",
|
|
"parent": "Panel",
|
|
"active": true,
|
|
"rect": {
|
|
"anchorMin": [0, 0],
|
|
"anchorMax": [1, 1],
|
|
"pivot": [0.5, 0.5],
|
|
"anchoredPosition": [0, -14],
|
|
"sizeDelta": [-112, -240]
|
|
},
|
|
"components": [
|
|
{
|
|
"type": "TextMeshProUGUI",
|
|
"text": "",
|
|
"fontSize": 34,
|
|
"alignment": "Center",
|
|
"color": "#2F4256FF"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Btn_Ok",
|
|
"parent": "Panel",
|
|
"active": true,
|
|
"rect": {
|
|
"anchorMin": [0.5, 0],
|
|
"anchorMax": [0.5, 0],
|
|
"pivot": [0.5, 0],
|
|
"anchoredPosition": [0, 44],
|
|
"sizeDelta": [240, 84]
|
|
},
|
|
"components": [
|
|
{
|
|
"type": "Image",
|
|
"sprite": "btn_primary_normal",
|
|
"imageType": "Sliced",
|
|
"raycastTarget": true,
|
|
"color": "#FFFFFFFF"
|
|
},
|
|
{
|
|
"type": "Button",
|
|
"transition": "SpriteSwap",
|
|
"spriteHighlighted": "btn_primary_hover",
|
|
"spritePressed": "btn_primary_pressed",
|
|
"spriteDisabled": "btn_primary_disabled",
|
|
"onClick": "MiniGame.ResultConfirm"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Txt_Ok",
|
|
"parent": "Btn_Ok",
|
|
"active": true,
|
|
"rect": {
|
|
"anchorMin": [0, 0],
|
|
"anchorMax": [1, 1],
|
|
"offsetMin": [0, 0],
|
|
"offsetMax": [0, 0]
|
|
},
|
|
"components": [
|
|
{
|
|
"type": "TextMeshProUGUI",
|
|
"text": "确定",
|
|
"fontSize": 36,
|
|
"fontStyle": "Bold",
|
|
"alignment": "Center",
|
|
"color": "#1F3A0EFF"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"bindings": ["Txt_Title", "Txt_Message"],
|
|
"events": [
|
|
{ "name": "MiniGame.ResultConfirm", "node": "Btn_Ok" }
|
|
]
|
|
}
|