diff --git a/assets/images/Congratulations.png b/assets/images/Congratulations.png new file mode 100644 index 0000000..6df8ac8 Binary files /dev/null and b/assets/images/Congratulations.png differ diff --git a/assets/images/Congratulations.png.meta b/assets/images/Congratulations.png.meta new file mode 100644 index 0000000..801da75 --- /dev/null +++ b/assets/images/Congratulations.png.meta @@ -0,0 +1,6 @@ +{ + "uuid": "2c16b5f4-49d5-4203-8099-b285426e740e", + "importer": { + "textureType": 2 + } +} \ No newline at end of file diff --git a/assets/resources/GameDone_DC.lh b/assets/resources/GameDone_DC.lh index 4f83464..613ff12 100644 --- a/assets/resources/GameDone_DC.lh +++ b/assets/resources/GameDone_DC.lh @@ -37,6 +37,9 @@ "star4": { "_$ref": "kn1x3k7e" }, + "img_title": { + "_$ref": "zu1c4o9d" + }, "label_diffucuty": { "_$ref": "sli8jsxk" }, @@ -144,8 +147,8 @@ "_gcmds": [ { "_$type": "DrawRoundRectCmd", - "lt": 0, - "rt": 0, + "lt": 48, + "rt": 48, "lb": 48, "rb": 48, "lineWidth": 1, @@ -217,22 +220,15 @@ "color": "#ffffff" }, { - "_$id": "khlzgsr5", - "_$type": "Label", - "name": "Label", - "y": 216, - "width": 246, - "height": 30, - "scaleX": 4, - "scaleY": 4, - "centerX": 0, - "centerY": -147, - "text": "Congratulations!", - "font": "res://3f79306d-f490-4a54-a4f3-26cb51d56a12", - "fontSize": 20, - "color": "rgba(0, 0, 0, 1)", - "align": "center", - "valign": "middle" + "_$id": "zu1c4o9d", + "_$type": "Image", + "name": "Congratulations!", + "y": 168, + "width": 984, + "height": 198, + "skin": "res://2c16b5f4-49d5-4203-8099-b285426e740e", + "useSourceSize": true, + "color": "#ffffff" }, { "_$id": "n4jhcwy7", diff --git a/assets/resources/GameDone_Normal.lh b/assets/resources/GameDone_Normal.lh index fe422fc..d25000d 100644 --- a/assets/resources/GameDone_Normal.lh +++ b/assets/resources/GameDone_Normal.lh @@ -37,6 +37,9 @@ "star4": { "_$ref": "08ict2h8" }, + "img_title": { + "_$ref": "v49hsu2v" + }, "label_diffucuty": { "_$ref": "mdvetv8w" }, @@ -144,8 +147,8 @@ "_gcmds": [ { "_$type": "DrawRoundRectCmd", - "lt": 0, - "rt": 0, + "lt": 48, + "rt": 48, "lb": 48, "rb": 48, "lineWidth": 1, @@ -222,22 +225,15 @@ "color": "#ffffff" }, { - "_$id": "bp5q98ww", - "_$type": "Label", - "name": "Label", - "y": 216, - "width": 246, - "height": 30, - "scaleX": 4, - "scaleY": 4, - "centerX": 0, - "centerY": -147, - "text": "Congratulations!", - "font": "res://3f79306d-f490-4a54-a4f3-26cb51d56a12", - "fontSize": 20, - "color": "rgba(0, 0, 0, 1)", - "align": "center", - "valign": "middle" + "_$id": "v49hsu2v", + "_$type": "Image", + "name": "Congratulations!", + "y": 166, + "width": 984, + "height": 198, + "skin": "res://2c16b5f4-49d5-4203-8099-b285426e740e", + "useSourceSize": true, + "color": "#ffffff" }, { "_$id": "b4ajczjh", diff --git a/src/constants/respath.ts b/src/constants/respath.ts index af7e96f..dd5f75b 100644 --- a/src/constants/respath.ts +++ b/src/constants/respath.ts @@ -59,6 +59,7 @@ export const respath = { bg_done_top: "images/bg_done_top.png", icon_star1: "images/star.png", icon_star2: "images/star2.png", + Congratulations: "images/Congratulations.png", home_top_dc_bg_normal: "images/bg_dc_top1.png", home_top_dc_bg_finish: "images/bg_dc_top2.png", diff --git a/src/models/ResourceManager.ts b/src/models/ResourceManager.ts index 26cfe53..08c0144 100644 --- a/src/models/ResourceManager.ts +++ b/src/models/ResourceManager.ts @@ -60,6 +60,7 @@ export class ResourceManager { this.resources.push({ url: respath.bg_done_top, type: Laya.Loader.IMAGE }) this.resources.push({ url: respath.icon_star1, type: Laya.Loader.IMAGE }) this.resources.push({ url: respath.icon_star2, type: Laya.Loader.IMAGE }) + this.resources.push({ url: respath.Congratulations, type: Laya.Loader.IMAGE }) this.resources.push({ url: respath.home_top_dc_bg_normal, type: Laya.Loader.IMAGE }) this.resources.push({ url: respath.home_top_dc_bg_finish, type: Laya.Loader.IMAGE }) diff --git a/src/views/GameDone.ts b/src/views/GameDone.ts index 1f2cbc8..57aeb06 100644 --- a/src/views/GameDone.ts +++ b/src/views/GameDone.ts @@ -37,6 +37,9 @@ export class GameDone extends Laya.Script { @property(Laya.Image) public star4: Laya.Image + @property(Laya.Image) + public img_title: Laya.Image + @property(Laya.Label) public label_diffucuty: Laya.Label @@ -63,6 +66,8 @@ export class GameDone extends Laya.Script { ResourceManager.getInstance().loadTexture(respath.icon_star2, this.star2) ResourceManager.getInstance().loadTexture(respath.icon_star2, this.star3) ResourceManager.getInstance().loadTexture(respath.icon_star1, this.star4) + if (this.img_title) + ResourceManager.getInstance().loadTexture(respath.Congratulations, this.img_title) this.owner.x = 0 this.owner.y = 0