complete dc logic

This commit is contained in:
2025-05-22 10:55:37 +08:00
parent 64868a980f
commit 16a5eb9e6b
50 changed files with 811 additions and 695 deletions

View File

@@ -17,7 +17,129 @@
},
{
"_$type": "cd70cd5e-b4cd-4277-ac0a-2224cfbe89ac",
"enabled": false,
"scriptPath": "../src/models/UIManager.ts"
}
],
"_$child": [
{
"_$id": "scvd34ii",
"_$type": "Box",
"name": "TrophyRoom",
"width": 1080,
"height": 1920,
"_mouseState": 2,
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"_$comp": [
{
"_$type": "554595b0-0dd8-4e4b-8073-8d775219659c",
"scriptPath": "../src/views/TrophyRoom.ts",
"btn_back": {
"_$ref": "12tz34f8"
},
"obj_items": {
"_$ref": "k3gvjlus"
}
}
],
"_$child": [
{
"_$id": "lj5633i3",
"_$type": "Image",
"name": "bg",
"width": 1080,
"height": 1920,
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"skin": "res://a98f334e-ce04-4cd0-8fc5-bbdf9b048609",
"color": "#f5f7fb"
},
{
"_$id": "z1p4zsvs",
"_$type": "Box",
"name": "back",
"x": 38,
"y": 78,
"width": 400,
"height": 64,
"_mouseState": 2,
"centerX": -302,
"centerY": -850,
"_$child": [
{
"_$id": "12tz34f8",
"_$type": "Button",
"name": "btn_back",
"width": 69,
"height": 48,
"_mouseState": 2,
"stateNum": 1,
"skin": "res://06a9c4a8-d664-4f3a-9c35-25b610195ced",
"label": "",
"labelSize": 20,
"labelAlign": "center",
"labelVAlign": "middle"
},
{
"_$id": "nyfbewpo",
"_$type": "Label",
"name": "title",
"x": 92,
"y": -6,
"width": 500,
"height": 60,
"bottom": 10,
"text": "Trophy Room",
"fontSize": 54,
"color": "rgba(45, 49, 56, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "8jansi3q",
"_$type": "Panel",
"name": "Panel",
"x": 48,
"y": 200,
"width": 984,
"height": 1720,
"_mouseState": 2,
"top": 200,
"bottom": 0,
"centerX": 0,
"scrollType": 2,
"_$child": [
{
"_$id": "k3gvjlus",
"_$type": "VBox",
"name": "items",
"width": 984,
"height": 2000,
"space": 40,
"align": "center",
"_$child": [
{
"_$id": "0cxaz0lv",
"_$prefab": "381b129b-cb47-4a77-805d-6d4637bc67b8",
"name": "TrophyRoomYear",
"active": true,
"x": 0,
"y": 0,
"visible": true
}
]
}
]
}
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

View File

@@ -0,0 +1,6 @@
{
"uuid": "f558f5db-ce87-4707-92ac-0c0f426844f0",
"importer": {
"textureType": 2
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,14 +0,0 @@
{
"uuid": "d79c761b-6bc3-49e0-9e51-bd2ba385cfe0",
"importer": {
"textureType": 2,
"stateNum": 3,
"sizeGrid": [
10,
10,
10,
10,
0
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,7 +0,0 @@
{
"uuid": "a62dfa59-dd5c-491c-8d7a-346205a51a5b",
"importer": {
"textureType": 2,
"stateNum": 3
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,7 +0,0 @@
{
"uuid": "c1da2147-6391-438e-a9a3-6f2dfb6b32d3",
"importer": {
"textureType": 2,
"stateNum": 3
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,13 +0,0 @@
{
"uuid": "fc3bb457-8d97-4456-b6b6-304c6b064689",
"importer": {
"textureType": 2,
"sizeGrid": [
11,
9,
11,
9,
0
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 KiB

View File

@@ -0,0 +1,6 @@
{
"uuid": "0403c03d-0fbb-4930-8cf7-c4bf0f4d45b9",
"importer": {
"textureType": 2
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -1,5 +1,5 @@
{
"uuid": "bb1fa7d6-3640-46a5-aad3-b8aa0dacdd0e",
"uuid": "96a58de5-fc90-4ade-adfd-4a4d118a623c",
"importer": {
"textureType": 2
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -1,5 +1,5 @@
{
"uuid": "fb9b2754-ab4b-4558-8db0-f325afc06764",
"uuid": "88000a03-190e-42f2-aeee-794a20baf8e5",
"importer": {
"textureType": 2
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,5 +1,5 @@
{
"uuid": "3d104a8e-ef79-46c9-90ef-f0db298666b2",
"uuid": "9e98624e-927b-4b99-88ad-8d6f2343208f",
"importer": {
"textureType": 2
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -1,5 +1,5 @@
{
"uuid": "f84532c2-1750-4127-999b-9dd613301eb5",
"uuid": "f343eec5-a5d9-4aee-b990-06dd8814a49f",
"importer": {
"textureType": 2
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -1,5 +1,5 @@
{
"uuid": "39efa94a-7d72-41e0-8970-51e3508f01f8",
"uuid": "09690a9b-3d5a-4da1-b457-1a3275cf5c14",
"importer": {
"textureType": 2
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -1,5 +1,5 @@
{
"uuid": "06f0e4a0-8056-4632-9f9a-f939013aebd7",
"uuid": "823f9da6-1190-4cc2-8ade-1235b6e63a71",
"importer": {
"textureType": 2
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,5 +1,5 @@
{
"uuid": "2e8680d7-0e1f-4165-9354-ee110beb9c47",
"uuid": "56fae124-b8a0-41de-991a-0a8bfe4d81f7",
"importer": {
"textureType": 2
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,6 @@
{
"uuid": "e32f3996-6f91-4bea-9220-51fbe0db6000",
"importer": {
"textureType": 2
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,6 @@
{
"uuid": "5ac664df-00fa-4926-92cf-8c37f34b643c",
"importer": {
"textureType": 2
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,6 @@
{
"uuid": "90ebce6d-2376-4daa-a99b-eb932f08f396",
"importer": {
"textureType": 2
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -0,0 +1,6 @@
{
"uuid": "0fe91155-944d-47ad-b26a-0765f93e8134",
"importer": {
"textureType": 2
}
}

View File

@@ -1,6 +1,6 @@
{
"_$ver": 1,
"_$id": "1189xhfw",
"_$id": "scvd34ii",
"_$type": "Box",
"name": "TrophyRoom",
"width": 1080,
@@ -15,16 +15,16 @@
"_$type": "554595b0-0dd8-4e4b-8073-8d775219659c",
"scriptPath": "../src/views/TrophyRoom.ts",
"btn_back": {
"_$ref": "frfomxcb"
"_$ref": "12tz34f8"
},
"obj_items": {
"_$ref": "jt9xxw2i"
"_$ref": "k3gvjlus"
}
}
],
"_$child": [
{
"_$id": "ei2oglth",
"_$id": "lj5633i3",
"_$type": "Image",
"name": "bg",
"width": 1080,
@@ -37,7 +37,7 @@
"color": "#f5f7fb"
},
{
"_$id": "jgayyog0",
"_$id": "z1p4zsvs",
"_$type": "Box",
"name": "back",
"x": 38,
@@ -49,7 +49,7 @@
"centerY": -850,
"_$child": [
{
"_$id": "frfomxcb",
"_$id": "12tz34f8",
"_$type": "Button",
"name": "btn_back",
"width": 69,
@@ -63,7 +63,7 @@
"labelVAlign": "middle"
},
{
"_$id": "6dm2cil7",
"_$id": "nyfbewpo",
"_$type": "Label",
"name": "title",
"x": 92,
@@ -81,632 +81,36 @@
]
},
{
"_$id": "457s8lgx",
"_$type": "Box",
"name": "center",
"y": 188,
"width": 1080,
"height": 1632,
"bottom": 100,
"_$id": "8jansi3q",
"_$type": "Panel",
"name": "Panel",
"x": 48,
"y": 200,
"width": 984,
"height": 1720,
"_mouseState": 2,
"top": 200,
"bottom": 0,
"centerX": 0,
"scrollType": 2,
"_$child": [
{
"_$id": "sf0c1is5",
"_$type": "Sprite",
"name": "Sprite",
"x": 48,
"width": 984,
"height": 72,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
"x": 0,
"y": 0,
"width": 1,
"height": 1,
"lt": 0,
"rt": 0,
"lb": 0,
"rb": 0,
"percent": true,
"lineWidth": 1,
"fillColor": "#FFFFFF"
}
],
"_$child": [
{
"_$id": "aeojubkf",
"_$type": "Label",
"name": "Label",
"width": 984,
"height": 72,
"centerX": 0,
"centerY": 0,
"text": "2025",
"fontSize": 48,
"color": "rgba(84, 89, 98, 1)",
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "jt9xxw2i",
"_$id": "k3gvjlus",
"_$type": "VBox",
"name": "items",
"x": 60,
"y": 88,
"width": 960,
"height": 1500,
"centerX": 0,
"space": 128,
"width": 984,
"height": 2000,
"space": 40,
"align": "center",
"_$child": [
{
"_$id": "rtjlzxrg",
"_$type": "Box",
"name": "Box(1)",
"width": 960,
"height": 288,
"_$child": [
{
"_$id": "sxhnu7s0",
"_$type": "HBox",
"name": "HBox",
"width": 960,
"height": 288,
"space": 48,
"align": "middle",
"_$child": [
{
"_$id": "ahv6vinq",
"_$type": "Box",
"name": "Box(1)",
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "xs2facku"
},
"icon": {
"_$ref": "i99wsuz9"
},
"label_count": {
"_$ref": "8f3q88gt"
},
"label_month": {
"_$ref": "rnb9of21"
}
}
],
"_$child": [
{
"_$id": "xs2facku",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "i99wsuz9",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "8f3q88gt",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "rnb9of21",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "3dpnbnbm",
"_$type": "Box",
"name": "Box(2)",
"x": 336,
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "etn7qmiw"
},
"icon": {
"_$ref": "7hjok1ev"
},
"label_count": {
"_$ref": "koikjqiv"
},
"label_month": {
"_$ref": "kpfyndbn"
}
}
],
"_$child": [
{
"_$id": "etn7qmiw",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "7hjok1ev",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "koikjqiv",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "kpfyndbn",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "4hfbjkna",
"_$type": "Box",
"name": "Box(3)",
"x": 672,
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "n1srjbm6"
},
"icon": {
"_$ref": "r09n4fhm"
},
"label_count": {
"_$ref": "5lcf8a4b"
},
"label_month": {
"_$ref": "pf8nfx2v"
}
}
],
"_$child": [
{
"_$id": "n1srjbm6",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "r09n4fhm",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "5lcf8a4b",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "pf8nfx2v",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
}
]
},
{
"_$id": "908k43gz",
"_$type": "Sprite",
"name": "Sprite",
"y": 288,
"width": 960,
"height": 18,
"_gcmds": [
{
"_$type": "DrawRectCmd",
"x": 0,
"y": 0,
"width": 1,
"height": 1,
"percent": true,
"lineWidth": 1,
"fillColor": "#ffffff"
}
]
}
]
},
{
"_$id": "d57ox1j2",
"_$type": "Box",
"name": "Box(2)",
"y": 416,
"width": 960,
"height": 288,
"_$child": [
{
"_$id": "0b9gkf05",
"_$type": "HBox",
"name": "HBox",
"width": 960,
"height": 288,
"space": 48,
"align": "middle",
"_$child": [
{
"_$id": "jp4pzvxr",
"_$type": "Box",
"name": "Box(1)",
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "u167io9a"
},
"icon": {
"_$ref": "umqtxrh0"
},
"label_count": {
"_$ref": "cixct5br"
},
"label_month": {
"_$ref": "7343tj11"
}
}
],
"_$child": [
{
"_$id": "u167io9a",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "umqtxrh0",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "cixct5br",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "7343tj11",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "hx6pe1ov",
"_$type": "Box",
"name": "Box(2)",
"x": 336,
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "74es56r4"
},
"icon": {
"_$ref": "tcdkrp1u"
},
"label_count": {
"_$ref": "n8uw70hh"
},
"label_month": {
"_$ref": "1fmgl5ec"
}
}
],
"_$child": [
{
"_$id": "74es56r4",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "tcdkrp1u",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "n8uw70hh",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "1fmgl5ec",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "crbop6ic",
"_$type": "Box",
"name": "Box(3)",
"x": 672,
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "k1u9d18x"
},
"icon": {
"_$ref": "js7oqbfw"
},
"label_count": {
"_$ref": "tyah3p0y"
},
"label_month": {
"_$ref": "k8xv4u65"
}
}
],
"_$child": [
{
"_$id": "k1u9d18x",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "js7oqbfw",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "tyah3p0y",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "k8xv4u65",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
}
]
},
{
"_$id": "qddl5vua",
"_$type": "Sprite",
"name": "Sprite",
"y": 288,
"width": 960,
"height": 18,
"_gcmds": [
{
"_$type": "DrawRectCmd",
"x": 0,
"y": 0,
"width": 1,
"height": 1,
"percent": true,
"lineWidth": 1,
"fillColor": "#ffffff"
}
]
}
]
"_$id": "0cxaz0lv",
"_$prefab": "381b129b-cb47-4a77-805d-6d4637bc67b8",
"name": "TrophyRoomYear",
"active": true,
"x": 0,
"y": 0,
"visible": true
}
]
}

View File

@@ -1,3 +1,3 @@
{
"uuid": "9bb199ae-4249-42ca-bc7a-49bbd550454b"
"uuid": "138e36b2-3fd0-4e8b-9fb8-1140477a4254"
}

View File

@@ -0,0 +1,291 @@
{
"_$ver": 1,
"_$id": "qayij6fq",
"_$type": "VBox",
"name": "TrophyRoomCell",
"y": 120,
"width": 984,
"height": 444,
"space": 0,
"align": "center",
"_$child": [
{
"_$id": "edutm8p9",
"_$type": "HBox",
"name": "HBox",
"width": 984,
"height": 288,
"space": 48,
"align": "middle",
"_$child": [
{
"_$id": "npywocl2",
"_$type": "Box",
"name": "Box(1)",
"width": 328,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "7a93ikng"
},
"icon": {
"_$ref": "232cncr7"
},
"label_count": {
"_$ref": "jafwv0lk"
},
"label_month": {
"_$ref": "5ifvmsv6"
}
}
],
"_$child": [
{
"_$id": "7a93ikng",
"_$type": "Image",
"name": "bg_light",
"x": 20,
"width": 288,
"height": 288,
"centerX": 0,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "232cncr7",
"_$type": "Image",
"name": "icon",
"x": 20,
"width": 288,
"height": 288,
"centerX": 0,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "jafwv0lk",
"_$type": "Label",
"name": "label_count",
"x": 128,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "5ifvmsv6",
"_$type": "Label",
"name": "month",
"x": 114,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "h293u30o",
"_$type": "Box",
"name": "Box(2)",
"x": 376,
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "tsk96lzw"
},
"icon": {
"_$ref": "vnxa59lv"
},
"label_count": {
"_$ref": "3matj08s"
},
"label_month": {
"_$ref": "z4msejq5"
}
}
],
"_$child": [
{
"_$id": "tsk96lzw",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "vnxa59lv",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "3matj08s",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "z4msejq5",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "g7w60s1c",
"_$type": "Box",
"name": "Box(3)",
"x": 712,
"width": 288,
"height": 288,
"_$comp": [
{
"_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1",
"scriptPath": "../src/views/TrophyUnit.ts",
"bg_light": {
"_$ref": "ka2embmi"
},
"icon": {
"_$ref": "d1fdbz6w"
},
"label_count": {
"_$ref": "6rod3nlm"
},
"label_month": {
"_$ref": "tmao7m9v"
}
}
],
"_$child": [
{
"_$id": "ka2embmi",
"_$type": "Image",
"name": "bg_light",
"width": 288,
"height": 288,
"skin": "res://d0c3b007-6036-460a-b23d-09d6f2492886",
"color": "#ffffff"
},
{
"_$id": "d1fdbz6w",
"_$type": "Image",
"name": "icon",
"width": 288,
"height": 288,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "6rod3nlm",
"_$type": "Label",
"name": "label_count",
"x": 108,
"y": 233,
"width": 72,
"height": 20,
"centerX": 0,
"text": "03/20",
"fontSize": 24,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "tmao7m9v",
"_$type": "Label",
"name": "month",
"x": 94,
"y": 334,
"width": 100,
"height": 60,
"bottom": -106,
"centerX": 0,
"text": "Otc",
"fontSize": 42,
"color": "rgba(167, 171, 179, 1)",
"bold": true,
"valign": "middle",
"padding": "0,0,0,0"
}
]
}
]
},
{
"_$id": "btspwass",
"_$type": "Sprite",
"name": "Sprite",
"x": 12,
"y": 288,
"width": 960,
"height": 18,
"_gcmds": [
{
"_$type": "DrawRectCmd",
"x": 0,
"y": 0,
"width": 1,
"height": 1,
"percent": true,
"lineWidth": 1,
"fillColor": "#ffffff"
}
]
}
]
}

View File

@@ -0,0 +1,3 @@
{
"uuid": "c4bc91b4-43cc-4655-b508-946a63b6534f"
}

View File

@@ -0,0 +1,70 @@
{
"_$ver": 1,
"_$id": "4d6d3tpb",
"_$type": "VBox",
"name": "TrophyRoomYear",
"width": 984,
"height": 564,
"space": 0,
"align": "center",
"_$child": [
{
"_$id": "ijq66j2p",
"_$type": "Box",
"name": "year",
"width": 984,
"height": 120,
"_$child": [
{
"_$id": "5y2etcc5",
"_$type": "Sprite",
"name": "Sprite",
"y": 24,
"width": 984,
"height": 72,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
"x": 0,
"y": 0,
"width": 1,
"height": 1,
"lt": 0,
"rt": 0,
"lb": 0,
"rb": 0,
"percent": true,
"lineWidth": 1,
"fillColor": "#FFFFFF"
}
]
},
{
"_$id": "fkmnbowd",
"_$type": "Label",
"name": "Label",
"y": 48,
"width": 984,
"height": 72,
"centerX": 0,
"centerY": 0,
"text": "2025",
"fontSize": 48,
"color": "rgba(84, 89, 98, 1)",
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
}
]
},
{
"_$id": "6j7wol13",
"_$prefab": "c4bc91b4-43cc-4655-b508-946a63b6534f",
"name": "TrophyRoomCell",
"active": true,
"x": 0,
"y": 120,
"visible": true
}
]
}

View File

@@ -0,0 +1,3 @@
{
"uuid": "381b129b-cb47-4a77-805d-6d4637bc67b8"
}

View File

@@ -0,0 +1,146 @@
{
"_$ver": 1,
"_$id": "1fwr5vkm",
"_$type": "Box",
"name": "TrophyShow",
"width": 1080,
"height": 1920,
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"_$comp": [
{
"_$type": "42f2370b-c65c-4119-8725-6d4520582431",
"scriptPath": "../src/views/TrophyShow.ts",
"icon": {
"_$ref": "ln9pnpqz"
},
"label_date": {
"_$ref": "xrkm18lm"
},
"btn_close": {
"_$ref": "wij1by9x"
}
}
],
"_$child": [
{
"_$id": "fey28xb5",
"_$type": "Image",
"name": "Image",
"width": 1080,
"height": 1920,
"alpha": 0.8,
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"skin": "res://a98f334e-ce04-4cd0-8fc5-bbdf9b048609",
"color": "#000000"
},
{
"_$id": "2177oyto",
"_$type": "Box",
"name": "center",
"y": 164,
"width": 1080,
"height": 1080,
"centerX": 0,
"centerY": -256,
"_$child": [
{
"_$id": "x5epx2r5",
"_$type": "Image",
"name": "img_light_yellow",
"width": 1080,
"height": 1080,
"centerX": 0,
"centerY": 0,
"skin": "res://0403c03d-0fbb-4930-8cf7-c4bf0f4d45b9",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "ln9pnpqz",
"_$type": "Image",
"name": "trophy",
"x": 123,
"y": 123,
"width": 834,
"height": 834,
"centerX": 0,
"centerY": 0,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"color": "#ffffff"
},
{
"_$id": "wij1by9x",
"_$type": "Box",
"name": "btn_close",
"x": 474,
"y": 1164,
"width": 132,
"height": 132,
"bottom": -216,
"centerX": 0,
"_$child": [
{
"_$id": "080lm4sm",
"_$type": "Sprite",
"name": "Sprite",
"width": 132,
"height": 132,
"alpha": 0.1,
"mouseThrough": true,
"_gcmds": [
{
"_$type": "DrawCircleCmd",
"x": 0.5,
"y": 0.5,
"radius": 0.5,
"percent": true,
"lineWidth": 1,
"fillColor": "#FFFFFF"
}
]
},
{
"_$id": "ziectevo",
"_$type": "Image",
"name": "icon_x",
"x": 43,
"y": 44,
"width": 46,
"height": 45,
"mouseThrough": true,
"centerX": 0,
"centerY": 0,
"skin": "res://f558f5db-ce87-4707-92ac-0c0f426844f0",
"useSourceSize": true,
"color": "#ffffff"
}
]
},
{
"_$id": "xrkm18lm",
"_$type": "Label",
"name": "label_date",
"x": 90,
"y": 1010,
"width": 900,
"height": 60,
"alpha": 0.8,
"bottom": 10,
"centerX": 0,
"text": "Sep 11, 2024",
"fontSize": 60,
"color": "#FFFFFF",
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
}
]
}
]
}

View File

@@ -0,0 +1,3 @@
{
"uuid": "3b41f5b0-65b5-40eb-83cb-5d8f9f17cb31"
}

View File

@@ -39,6 +39,7 @@ export const config = {
MONTH_FULLNAMES: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
MONTH_LIST: [
{year: 2024, month: 12, begin: 0, dayCount: 31, icon_res: respath.trophy_12},
{year: 2025, month: 1, begin: 3, dayCount: 31, icon_res: respath.trophy_01},
{year: 2025, month: 2, begin: 6, dayCount: 30, icon_res: respath.trophy_02},
{year: 2025, month: 3, begin: 6, dayCount: 31, icon_res: respath.trophy_03},
@@ -47,10 +48,10 @@ export const config = {
{year: 2025, month: 6, begin: 0, dayCount: 30, icon_res: respath.trophy_06},
{year: 2025, month: 7, begin: 2, dayCount: 31, icon_res: respath.trophy_07},
{year: 2025, month: 8, begin: 5, dayCount: 31, icon_res: respath.trophy_08},
{year: 2025, month: 9, begin: 1, dayCount: 30, icon_res: respath.trophy_01},
{year: 2025, month: 10, begin: 3, dayCount: 31, icon_res: respath.trophy_02},
{year: 2025, month: 11, begin: 6, dayCount: 30, icon_res: respath.trophy_03},
{year: 2025, month: 12, begin: 1, dayCount: 31, icon_res: respath.trophy_04},
{year: 2025, month: 9, begin: 1, dayCount: 30, icon_res: respath.trophy_09},
{year: 2025, month: 10, begin: 3, dayCount: 31, icon_res: respath.trophy_10},
{year: 2025, month: 11, begin: 6, dayCount: 30, icon_res: respath.trophy_11},
{year: 2025, month: 12, begin: 1, dayCount: 31, icon_res: respath.trophy_12},
]
}

View File

@@ -4,6 +4,8 @@ export const respath = {
home_ui_res: "resources/Home.lh",
dc_ui_res: "resources/DailyChallenge.lh",
trophy_ui_res: "resources/TrophyRoom.lh",
trophy_year_ui_res: "resources/TrophyRoomYear.lh",
trophy_cell_ui_res: "resources/TrophyRoomCell.lh",
stage_ui_res: "resources/Stage.lh",
gameover_ui_res: "resources/GameOver.lh",
gamedone_ui_res: "resources/GameDone.lh",
@@ -30,5 +32,9 @@ export const respath = {
trophy_06: "atlas/trophys/trophy_06.png",
trophy_07: "atlas/trophys/trophy_07.png",
trophy_08: "atlas/trophys/trophy_08.png",
trophy_09: "atlas/trophys/trophy_09.png",
trophy_10: "atlas/trophys/trophy_10.png",
trophy_11: "atlas/trophys/trophy_11.png",
trophy_12: "atlas/trophys/trophy_12.png",
}

View File

@@ -2,6 +2,7 @@
import { config } from "../constants/config";
import { respath } from "../constants/respath";
import { TrophyUnit } from "./TrophyUnit";
const { regClass, property } = Laya;
@@ -15,7 +16,6 @@ export class TrophyRoom extends Laya.Script {
@property(Laya.Box)
public obj_items: Laya.Box;
private items: Array<TrophyUnit> = new Array()
//第一次执行update之前执行只会执行一次
onStart(): void {
@@ -24,34 +24,80 @@ export class TrophyRoom extends Laya.Script {
this.owner.destroy()
})
var list: Array<any> = new Array()
var infos: Array<any> = new Array()
var now = new Date()
var nowYear = now.getFullYear()
var nowMonth = now.getMonth() + 1
for (var i=0; i<config.MONTH_LIST.length; i++) {
var obj = config.MONTH_LIST[i]
list.push(obj)
infos.push(obj)
if (obj.year == nowYear && obj.month == nowMonth) {
break
}
}
list.reverse()
infos.reverse()
var index = -1
for (var i=0; i<this.obj_items.numChildren; i++) {
var hbox = this.obj_items.getChildAt(i).getChildByName("HBox")
for (var j=0; j<hbox.numChildren; j++) {
var unit = hbox.getChildAt(j).getComponent(TrophyUnit)
index ++
if (index < list.length) {
unit.owner.visible = true
unit.onInit(list[index])
}
else {
unit.owner.visible = false
var years: Array<number> = new Array()
var monthMap: Map<number, Array<any>> = new Map()
for (var i=0; i<infos.length; i++) {
obj = infos[i]
if (years.indexOf(obj.year) < 0) {
years.push(obj.year)
}
if (monthMap.has(obj.year)== false) {
monthMap.set(obj.year, new Array())
}
var list = monthMap.get(obj.year)
list.push(obj)
}
console.log(">>>>>>>>>>>>years=", years)
Laya.loader.load(respath.trophy_year_ui_res).then((go)=>{
for (var i=1; i<years.length; i++) {
var obj_year = this.obj_items.getChildAt(i)
if (!obj_year) {
var prefab = go.create()
this.obj_items.addChild(prefab)
}
}
}
Laya.loader.load(respath.trophy_cell_ui_res).then((go)=>{
var itemsHeight = 0
for (var i=0; i<years.length; i++) {
var list = monthMap.get(years[i])
var cellCount = Math.ceil(list.length/3)
var yearHeight = 120 + cellCount * 444
itemsHeight += yearHeight
var obj_year = this.obj_items.getChildAt(i) as Laya.Box
obj_year.height = yearHeight
var label = obj_year.getChildByName("year").getChildByName("Label") as Laya.Label
label.text = years[i].toString()
var index = -1
for (var j=1; j<cellCount+1; j++) {
var obj_cell = obj_year.getChildAt(j)
if (!obj_cell) {
var prefab = go.create()
obj_cell = obj_year.addChild(prefab)
}
var hbox = obj_cell.getChildByName("HBox")
for (var k=0; k<hbox.numChildren; k++) {
var unit = hbox.getChildAt(k).getComponent(TrophyUnit)
index ++
if (index < list.length) {
unit.owner.visible = true
unit.onInit(list[index])
}
else {
unit.owner.visible = false
}
}
}
}
this.obj_items.height = itemsHeight
})
})
}
}

19
src/views/TrophyShow.ts Normal file
View File

@@ -0,0 +1,19 @@
const { regClass, property } = Laya;
@regClass()
export class TrophyShow extends Laya.Script {
declare owner : Laya.Box;
@property(Laya.Image)
public icon: Laya.Image
@property(Laya.Label)
public label_date: Laya.Label
@property(Laya.Box)
public btn_close: Laya.Box
public onSetShow(): void {
}
}

View File

@@ -0,0 +1,3 @@
{
"uuid": "42f2370b-c65c-4119-8725-6d4520582431"
}

View File

@@ -33,5 +33,9 @@ export class TrophyUnit extends Laya.Script {
this.icon.gray = true
this.label_month.color = "#a7abb3"
}
this.icon.on(Laya.Event.CLICK, this, ()=>{
})
}
}