添加dc奖杯背景
This commit is contained in:
@@ -20,7 +20,9 @@ export class DailyChallenge extends Laya.Script {
|
||||
@property(Laya.Sprite)
|
||||
public btn_trophy_red: Laya.Sprite
|
||||
@property(Laya.Image)
|
||||
public icon_trophy: Laya.Image
|
||||
public trophy_light: Laya.Image
|
||||
@property(Laya.Image)
|
||||
public trophy_icon: Laya.Image
|
||||
@property(Laya.Box)
|
||||
public btn_left: Laya.Box
|
||||
@property(Laya.Box)
|
||||
@@ -170,14 +172,16 @@ export class DailyChallenge extends Laya.Script {
|
||||
var nowMonth = now.getMonth() + 1
|
||||
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)
|
||||
if (starCount >= info.dayCount) {
|
||||
this.bg_dc.skin = respath.dc_top_bg_month_finish
|
||||
this.trophy_light.visible = true
|
||||
}
|
||||
else {
|
||||
this.bg_dc.skin = respath.dc_top_bg_normal
|
||||
this.trophy_light.visible = false
|
||||
}
|
||||
this.label_year.text = info.year.toString()
|
||||
this.label_month.text = config.MONTH_FULLNAMES[info.month-1]
|
||||
|
||||
Reference in New Issue
Block a user