添加dc奖杯背景

This commit is contained in:
2025-05-27 16:49:15 +08:00
parent 606c5a78fd
commit 8552a7eeb5
6 changed files with 63 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,6 @@
{
"uuid": "2a5d1872-8a36-4ac1-ad80-f375499754a6",
"importer": {
"textureType": 2
}
}

View File

@@ -23,7 +23,10 @@
"btn_trophy_red": { "btn_trophy_red": {
"_$ref": "zx15vggp" "_$ref": "zx15vggp"
}, },
"icon_trophy": { "trophy_light": {
"_$ref": "et3t0uy6"
},
"trophy_icon": {
"_$ref": "e7a1ntdg" "_$ref": "e7a1ntdg"
}, },
"btn_left": { "btn_left": {
@@ -175,6 +178,19 @@
} }
] ]
}, },
{
"_$id": "et3t0uy6",
"_$type": "Image",
"name": "trophy_light",
"x": 375,
"width": 705,
"height": 960,
"right": 0,
"top": 0,
"skin": "res://2a5d1872-8a36-4ac1-ad80-f375499754a6",
"useSourceSize": true,
"color": "#ffffff"
},
{ {
"_$id": "e7a1ntdg", "_$id": "e7a1ntdg",
"_$type": "Image", "_$type": "Image",
@@ -183,7 +199,7 @@
"y": 108, "y": 108,
"width": 468, "width": 468,
"height": 468, "height": 468,
"skin": "res://fb9b2754-ab4b-4558-8db0-f325afc06764", "skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"color": "#ffffff" "color": "#ffffff"
}, },
{ {

View File

@@ -21,7 +21,10 @@
"btn_trophy_red": { "btn_trophy_red": {
"_$ref": "7nzau29s" "_$ref": "7nzau29s"
}, },
"icon_trophy": { "trophy_light": {
"_$ref": "geon9fbm"
},
"trophy_icon": {
"_$ref": "5cayqz7i" "_$ref": "5cayqz7i"
}, },
"btn_left": { "btn_left": {
@@ -93,6 +96,33 @@
"skin": "res://4182ef3f-6065-44dd-83c2-70490f02e9cb", "skin": "res://4182ef3f-6065-44dd-83c2-70490f02e9cb",
"color": "#ffffff" "color": "#ffffff"
}, },
{
"_$id": "geon9fbm",
"_$type": "Image",
"name": "light",
"x": 21,
"y": 75,
"width": 678,
"height": 855,
"bottom": 30,
"centerX": 0,
"skin": "res://2a5d1872-8a36-4ac1-ad80-f375499754a6",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "5cayqz7i",
"_$type": "Image",
"name": "trophy",
"x": 21,
"y": 252,
"width": 678,
"height": 678,
"bottom": 30,
"centerX": 0,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"color": "#ffffff"
},
{ {
"_$id": "uy1v515z", "_$id": "uy1v515z",
"_$type": "Label", "_$type": "Label",
@@ -272,19 +302,6 @@
] ]
} }
] ]
},
{
"_$id": "5cayqz7i",
"_$type": "Image",
"name": "trophy",
"x": 21,
"y": 252,
"width": 678,
"height": 678,
"bottom": 30,
"centerX": 0,
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
"color": "#ffffff"
} }
] ]
}, },

View File

@@ -1,7 +1,7 @@
{ {
"resolution": { "resolution": {
"designWidth": 1920, "designWidth": 1080,
"designHeight": 1080, "designHeight": 1920,
"backgroundColor": "rgba(245, 247, 251, 1)" "backgroundColor": "rgba(245, 247, 251, 1)"
}, },
"modules": { "modules": {

View File

@@ -20,7 +20,9 @@ export class DailyChallenge extends Laya.Script {
@property(Laya.Sprite) @property(Laya.Sprite)
public btn_trophy_red: Laya.Sprite public btn_trophy_red: Laya.Sprite
@property(Laya.Image) @property(Laya.Image)
public icon_trophy: Laya.Image public trophy_light: Laya.Image
@property(Laya.Image)
public trophy_icon: Laya.Image
@property(Laya.Box) @property(Laya.Box)
public btn_left: Laya.Box public btn_left: Laya.Box
@property(Laya.Box) @property(Laya.Box)
@@ -170,14 +172,16 @@ export class DailyChallenge extends Laya.Script {
var nowMonth = now.getMonth() + 1 var nowMonth = now.getMonth() + 1
var nowDay = new Date().getDate() var nowDay = new Date().getDate()
this.icon_trophy.skin = info.icon_res this.trophy_icon.skin = info.icon_res
//设置背景 //设置背景
var starCount = user.get_doneCountByDate(info.year, info.month) var starCount = user.get_doneCountByDate(info.year, info.month)
if (starCount >= info.dayCount) { if (starCount >= info.dayCount) {
this.bg_dc.skin = respath.dc_top_bg_month_finish this.bg_dc.skin = respath.dc_top_bg_month_finish
this.trophy_light.visible = true
} }
else { else {
this.bg_dc.skin = respath.dc_top_bg_normal this.bg_dc.skin = respath.dc_top_bg_normal
this.trophy_light.visible = false
} }
this.label_year.text = info.year.toString() this.label_year.text = info.year.toString()
this.label_month.text = config.MONTH_FULLNAMES[info.month-1] this.label_month.text = config.MONTH_FULLNAMES[info.month-1]