diff --git a/assets/Scene.ls b/assets/Scene.ls index d34b22d..82d1cb2 100644 --- a/assets/Scene.ls +++ b/assets/Scene.ls @@ -7,19 +7,22 @@ "top": 0, "bottom": 0, "name": "Scene2D", - "width": 1920, - "height": 1080, + "width": 1080, + "height": 1920, "_$comp": [ { "_$type": "7bad1742-6eed-4d8d-81c0-501dc5bf03d6", - "scriptPath": "../src/Main.ts", - "debug": false + "scriptPath": "../src/Main.ts" }, { "_$type": "cd70cd5e-b4cd-4277-ac0a-2224cfbe89ac", "scriptPath": "../src/models/UIManager.ts", + "debug": false, "mask": { "_$ref": "2668mvhf" + }, + "btn_clean": { + "_$ref": "c5p596do" } } ], @@ -28,6 +31,8 @@ "_$id": "4rxcl2w3", "_$type": "Panel", "name": "UIRoot", + "x": -420, + "y": 420, "width": 1920, "height": 1080, "_mouseState": 2, @@ -38,8 +43,8 @@ "_$id": "2668mvhf", "_$type": "Image", "name": "mask", - "width": 1920, - "height": 1080, + "width": 1080, + "height": 1920, "alpha": 0, "left": 0, "right": 0, @@ -47,6 +52,41 @@ "bottom": 0, "skin": "res://a98f334e-ce04-4cd0-8fc5-bbdf9b048609", "color": "#ffffff" + }, + { + "_$id": "c5p596do", + "_$type": "Box", + "name": "btn_clean", + "x": 440, + "y": 1860, + "width": 200, + "height": 60, + "bottom": 0, + "centerX": 0, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], + "_$child": [ + { + "_$id": "oedhd7ds", + "_$type": "Label", + "name": "Label", + "width": 200, + "height": 60, + "centerX": 0, + "centerY": 0, + "text": "Clean", + "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "fontSize": 60, + "color": "rgba(89, 109, 152, 1)", + "align": "center", + "valign": "middle", + "padding": "0,0,0,0" + } + ] } ] } \ No newline at end of file diff --git a/assets/resources/Home.lh b/assets/resources/Home.lh index 82bfab2..0dcb9cd 100644 --- a/assets/resources/Home.lh +++ b/assets/resources/Home.lh @@ -43,9 +43,6 @@ }, "btn_new_white": { "_$ref": "n4ggvqc0" - }, - "btn_clean": { - "_$ref": "mdqfz48j" } } ], @@ -133,6 +130,12 @@ "fillColor": "#FFFFFF" } ], + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "8s2b3obv", @@ -178,6 +181,12 @@ "fillColor": "#FFFFFF" } ], + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "2ou1bw71", @@ -222,6 +231,12 @@ "fillColor": "#FFFFFF" } ], + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "w132wbbv", @@ -275,6 +290,12 @@ "height": 168, "visible": false, "centerX": 0, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "ry13plzy", @@ -327,6 +348,12 @@ "width": 792, "height": 168, "centerX": 0, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "vfod7fmk", @@ -412,6 +439,12 @@ "width": 792, "height": 168, "centerX": 0, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "sez4l9sx", @@ -454,36 +487,6 @@ "padding": "0,0,0,0" } ] - }, - { - "_$id": "mdqfz48j", - "_$type": "Box", - "name": "btn_clean", - "x": 440, - "y": -100, - "width": 200, - "height": 100, - "bottom": 0, - "centerX": 0, - "_$child": [ - { - "_$id": "yfgx8fq9", - "_$type": "Label", - "name": "Label", - "width": 200, - "height": 100, - "centerX": 0, - "centerY": 0, - "text": "Clean", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", - "fontSize": 80, - "color": "rgba(89, 109, 152, 1)", - "bold": true, - "align": "center", - "valign": "middle", - "padding": "0,0,0,0" - } - ] } ] }, diff --git a/assets/resources/Stage.lh b/assets/resources/Stage.lh index dab988a..2eb95b9 100644 --- a/assets/resources/Stage.lh +++ b/assets/resources/Stage.lh @@ -73,6 +73,12 @@ "width": 69, "height": 48, "_mouseState": 2, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "ij5lctcm", @@ -100,7 +106,13 @@ "label": "", "labelSize": 20, "labelAlign": "center", - "labelVAlign": "middle" + "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ] } ] }, @@ -44309,6 +44321,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "at2v2bn5", @@ -44357,6 +44375,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "nu0r4h4m", @@ -44406,6 +44430,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "nd653uaf", @@ -44511,6 +44541,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "qgd1z6lm", @@ -44696,6 +44732,10 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -44790,6 +44830,10 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -44884,6 +44928,10 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -44970,7 +45018,7 @@ ] }, { - "_$id": "rmd0c3nr", + "_$id": "yg9r4jfg", "_$type": "HBox", "name": "HBox(2)", "x": 348, @@ -44980,7 +45028,7 @@ "align": "middle", "_$child": [ { - "_$id": "nomr2y97", + "_$id": "dguouisn", "_$type": "Box", "name": "Box(1)", "width": 116, @@ -44989,11 +45037,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "o7i2659h", + "_$id": "wh46ryv7", "_$type": "Box", "name": "offset", "x": 58, @@ -45008,7 +45060,7 @@ "centerY": 0, "_$child": [ { - "_$id": "7qp4az0y", + "_$id": "4la6vvl8", "_$type": "Sprite", "name": "Sprite", "width": 106, @@ -45032,7 +45084,7 @@ ] }, { - "_$id": "4oidba1s", + "_$id": "020zisjj", "_$type": "Label", "name": "label", "y": 18, @@ -45051,7 +45103,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "1q6dwpth", + "_$id": "0gsjogz9", "_$type": "Label", "name": "label_left", "y": 126, @@ -45073,7 +45125,7 @@ ] }, { - "_$id": "0197591x", + "_$id": "2anx4ph9", "_$type": "Box", "name": "Box(2)", "x": 116, @@ -45083,11 +45135,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "y955nhrf", + "_$id": "iw98ns4t", "_$type": "Box", "name": "offset", "x": 58, @@ -45102,7 +45158,7 @@ "centerY": 0, "_$child": [ { - "_$id": "twxuuvzv", + "_$id": "6unm55cv", "_$type": "Sprite", "name": "Sprite", "width": 106, @@ -45126,7 +45182,7 @@ ] }, { - "_$id": "b8sykx1b", + "_$id": "9ut0g062", "_$type": "Label", "name": "label", "y": 18, @@ -45145,7 +45201,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "3b3i3l6t", + "_$id": "zqzpihqz", "_$type": "Label", "name": "label_left", "y": 126, @@ -45167,7 +45223,7 @@ ] }, { - "_$id": "a41kztnm", + "_$id": "etkk3rxo", "_$type": "Box", "name": "Box(3)", "x": 232, @@ -45177,11 +45233,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "snk3moec", + "_$id": "p40qz1kj", "_$type": "Box", "name": "offset", "x": 58, @@ -45196,7 +45256,7 @@ "centerY": 0, "_$child": [ { - "_$id": "y72x3oog", + "_$id": "dhxm42pz", "_$type": "Sprite", "name": "Sprite", "width": 106, @@ -45220,7 +45280,7 @@ ] }, { - "_$id": "lwkc0zua", + "_$id": "f2af8pko", "_$type": "Label", "name": "label", "y": 18, @@ -45239,7 +45299,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "v5cxh5ii", + "_$id": "epruravb", "_$type": "Label", "name": "label_left", "y": 126, @@ -45263,7 +45323,7 @@ ] }, { - "_$id": "yq0m8uwl", + "_$id": "bcs1k5h2", "_$type": "HBox", "name": "HBox(3)", "x": 696, @@ -45273,7 +45333,7 @@ "align": "middle", "_$child": [ { - "_$id": "74m851ns", + "_$id": "0b5pacca", "_$type": "Box", "name": "Box(1)", "width": 116, @@ -45282,11 +45342,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "f9lifzlk", + "_$id": "6tw45q6c", "_$type": "Box", "name": "offset", "x": 58, @@ -45301,7 +45365,7 @@ "centerY": 0, "_$child": [ { - "_$id": "75vpusf1", + "_$id": "nrlpoolf", "_$type": "Sprite", "name": "Sprite", "width": 106, @@ -45325,7 +45389,7 @@ ] }, { - "_$id": "1zvrby3u", + "_$id": "44c6ufyx", "_$type": "Label", "name": "label", "y": 18, @@ -45344,7 +45408,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "x447q2jp", + "_$id": "k238uqmr", "_$type": "Label", "name": "label_left", "y": 126, @@ -45366,7 +45430,7 @@ ] }, { - "_$id": "k9kfi5fl", + "_$id": "d2pjmyjw", "_$type": "Box", "name": "Box(2)", "x": 116, @@ -45376,11 +45440,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "lnme4lne", + "_$id": "6azvep56", "_$type": "Box", "name": "offset", "x": 58, @@ -45395,7 +45463,7 @@ "centerY": 0, "_$child": [ { - "_$id": "t4l5usjw", + "_$id": "khy3dfyu", "_$type": "Sprite", "name": "Sprite", "width": 106, @@ -45419,7 +45487,7 @@ ] }, { - "_$id": "ro13ln05", + "_$id": "95argjvl", "_$type": "Label", "name": "label", "y": 18, @@ -45438,7 +45506,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "hhtskffi", + "_$id": "l2iopvz8", "_$type": "Label", "name": "label_left", "y": 126, @@ -45460,7 +45528,7 @@ ] }, { - "_$id": "v3syogys", + "_$id": "iul5u8ua", "_$type": "Box", "name": "Box(3)", "x": 232, @@ -45470,11 +45538,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "zrpx3n2i", + "_$id": "p69gjp6h", "_$type": "Box", "name": "offset", "x": 58, @@ -45489,7 +45561,7 @@ "centerY": 0, "_$child": [ { - "_$id": "h8u3iye3", + "_$id": "x85sapb8", "_$type": "Sprite", "name": "Sprite", "width": 106, @@ -45513,7 +45585,7 @@ ] }, { - "_$id": "tb0hh22p", + "_$id": "fdsqrs34", "_$type": "Label", "name": "label", "y": 18, @@ -45532,7 +45604,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "olcmpccm", + "_$id": "atopoz4l", "_$type": "Label", "name": "label_left", "y": 126, diff --git a/assets/resources/Stage_H.lh b/assets/resources/Stage_H.lh index 2479468..fc2499e 100644 --- a/assets/resources/Stage_H.lh +++ b/assets/resources/Stage_H.lh @@ -44041,6 +44041,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "93gv08fv", @@ -44089,6 +44095,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "u09sxy57", @@ -44137,6 +44149,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "3coimgb5", @@ -44242,6 +44260,12 @@ "labelSize": 20, "labelAlign": "center", "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "79f7a7u2", @@ -44427,6 +44451,10 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -44514,6 +44542,10 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -44601,6 +44633,10 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -44680,7 +44716,7 @@ ] }, { - "_$id": "k9aqiwy1", + "_$id": "8xzfcdv6", "_$type": "HBox", "name": "HBox(2)", "y": 156, @@ -44691,7 +44727,7 @@ "align": "middle", "_$child": [ { - "_$id": "0tyzb3nc", + "_$id": "4qwebl2k", "_$type": "Box", "name": "Box(1)", "width": 288, @@ -44700,11 +44736,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "ud6uyd87", + "_$id": "lrx344yz", "_$type": "Box", "name": "offset", "width": 288, @@ -44712,7 +44752,7 @@ "centerX": 0, "_$child": [ { - "_$id": "6pjr937m", + "_$id": "x9iy3vsg", "_$type": "Sprite", "name": "Sprite", "width": 288, @@ -44736,7 +44776,7 @@ ] }, { - "_$id": "ramqkcym", + "_$id": "demhc2ah", "_$type": "Label", "name": "label", "y": 12, @@ -44755,7 +44795,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "u7xr71xk", + "_$id": "fk9cl0bm", "_$type": "Label", "name": "label_left", "y": 84, @@ -44777,7 +44817,7 @@ ] }, { - "_$id": "kkfrqzjv", + "_$id": "65wrn0br", "_$type": "Box", "name": "Box(2)", "x": 312, @@ -44787,11 +44827,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "ldsbd9ay", + "_$id": "d9ws7im7", "_$type": "Box", "name": "offset", "width": 288, @@ -44799,7 +44843,7 @@ "centerX": 0, "_$child": [ { - "_$id": "uk4lw6ya", + "_$id": "1vwr3239", "_$type": "Sprite", "name": "Sprite", "width": 288, @@ -44823,7 +44867,7 @@ ] }, { - "_$id": "7nkmd0aj", + "_$id": "xwcajsjw", "_$type": "Label", "name": "label", "y": 12, @@ -44842,7 +44886,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "c9q7fszq", + "_$id": "8so7iz78", "_$type": "Label", "name": "label_left", "y": 84, @@ -44864,7 +44908,7 @@ ] }, { - "_$id": "vwifxo97", + "_$id": "f54ytb52", "_$type": "Box", "name": "Box(3)", "x": 624, @@ -44874,11 +44918,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "0v67syue", + "_$id": "q0klsi7h", "_$type": "Box", "name": "offset", "width": 288, @@ -44886,7 +44934,7 @@ "centerX": 0, "_$child": [ { - "_$id": "y3vews7w", + "_$id": "52ol2fy5", "_$type": "Sprite", "name": "Sprite", "width": 288, @@ -44910,7 +44958,7 @@ ] }, { - "_$id": "gn0f0kwh", + "_$id": "nao6ajf6", "_$type": "Label", "name": "label", "y": 12, @@ -44929,7 +44977,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "76vpywpe", + "_$id": "jd2ps01k", "_$type": "Label", "name": "label_left", "y": 84, @@ -44953,7 +45001,7 @@ ] }, { - "_$id": "888vj22v", + "_$id": "m8xcdkat", "_$type": "HBox", "name": "HBox(3)", "y": 312, @@ -44964,7 +45012,7 @@ "align": "middle", "_$child": [ { - "_$id": "2tcx2zzo", + "_$id": "dmu3c9xr", "_$type": "Box", "name": "Box(1)", "width": 288, @@ -44973,11 +45021,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "hrxnkhv6", + "_$id": "0k9ust4e", "_$type": "Box", "name": "offset", "width": 288, @@ -44985,7 +45037,7 @@ "centerX": 0, "_$child": [ { - "_$id": "9s5j7kv8", + "_$id": "lv0ab9xp", "_$type": "Sprite", "name": "Sprite", "width": 288, @@ -45009,7 +45061,7 @@ ] }, { - "_$id": "6ixrqpir", + "_$id": "7rggngkc", "_$type": "Label", "name": "label", "y": 12, @@ -45028,7 +45080,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "cctp9ck8", + "_$id": "7uz2kaqw", "_$type": "Label", "name": "label_left", "y": 84, @@ -45050,7 +45102,7 @@ ] }, { - "_$id": "uwotju0s", + "_$id": "xgbi8www", "_$type": "Box", "name": "Box(2)", "x": 312, @@ -45060,11 +45112,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "1ou9n2dx", + "_$id": "lt8spgjf", "_$type": "Box", "name": "offset", "width": 288, @@ -45072,7 +45128,7 @@ "centerX": 0, "_$child": [ { - "_$id": "jdc241tx", + "_$id": "d4dpneju", "_$type": "Sprite", "name": "Sprite", "width": 288, @@ -45096,7 +45152,7 @@ ] }, { - "_$id": "qpbfcw31", + "_$id": "gp6g0rfs", "_$type": "Label", "name": "label", "y": 12, @@ -45115,7 +45171,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "nw1xt3o0", + "_$id": "p1o5qed5", "_$type": "Label", "name": "label_left", "y": 84, @@ -45137,7 +45193,7 @@ ] }, { - "_$id": "4dtvbapb", + "_$id": "0cx6c272", "_$type": "Box", "name": "Box(3)", "x": 624, @@ -45147,11 +45203,15 @@ { "_$type": "067a5d3a-4d7c-48d7-bb01-db2682fd6c01", "scriptPath": "../src/views/Candy.ts" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ { - "_$id": "buzjklhn", + "_$id": "io7nwnqg", "_$type": "Box", "name": "offset", "width": 288, @@ -45159,7 +45219,7 @@ "centerX": 0, "_$child": [ { - "_$id": "9qslbi7l", + "_$id": "70yp7lmn", "_$type": "Sprite", "name": "Sprite", "width": 288, @@ -45183,7 +45243,7 @@ ] }, { - "_$id": "e59ycnin", + "_$id": "a1idi4sv", "_$type": "Label", "name": "label", "y": 12, @@ -45202,7 +45262,7 @@ "strokeColor": "rgba(0, 0, 0, 1)" }, { - "_$id": "47etjk0b", + "_$id": "vx0m8m6q", "_$type": "Label", "name": "label_left", "y": 84, @@ -45236,6 +45296,12 @@ "height": 120, "bottom": 0, "centerX": 0, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "1ot0e6se", @@ -45292,6 +45358,12 @@ "visible": false, "bottom": 0, "centerX": 0, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "p11cl0oa", @@ -45424,7 +45496,13 @@ "label": "", "labelSize": 20, "labelAlign": "center", - "labelVAlign": "middle" + "labelVAlign": "middle", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ] } ] } diff --git a/assets/resources/TopBar.lh b/assets/resources/TopBar.lh index 9214b5a..c17587b 100644 --- a/assets/resources/TopBar.lh +++ b/assets/resources/TopBar.lh @@ -57,6 +57,12 @@ "y": 24, "width": 312, "height": 72, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "1nndzv6a", @@ -109,6 +115,12 @@ "y": 24, "width": 312, "height": 72, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "ool3zqvi", @@ -172,12 +184,12 @@ "_$type": "Label", "name": "Label", "x": -108, - "y": 30, + "y": 34, "width": 292, "height": 60, - "centerY": 0, + "centerY": 4, "text": "Difficulty:", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "font": "ArialMT", "fontSize": 36, "color": "rgba(167, 171, 179, 1)", "align": "center", @@ -208,6 +220,10 @@ "scriptPath": "../src/views/common/CommonData.ts", "intValue": 0, "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -267,6 +283,10 @@ "scriptPath": "../src/views/common/CommonData.ts", "intValue": 0, "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -326,6 +346,10 @@ "scriptPath": "../src/views/common/CommonData.ts", "intValue": 0, "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -385,6 +409,10 @@ "scriptPath": "../src/views/common/CommonData.ts", "intValue": 0, "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ @@ -444,6 +472,10 @@ "scriptPath": "../src/views/common/CommonData.ts", "intValue": 0, "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" } ], "_$child": [ diff --git a/assets/resources/dc/DailyChallenge.lh b/assets/resources/dc/DailyChallenge.lh index 5f6c033..6a2d229 100644 --- a/assets/resources/dc/DailyChallenge.lh +++ b/assets/resources/dc/DailyChallenge.lh @@ -154,6 +154,12 @@ "skin": "res://4458c7de-47ff-496e-a28f-be808c0823b3", "useSourceSize": true, "color": "#ffffff", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "zx15vggp", @@ -7659,6 +7665,12 @@ "visible": false, "centerX": 0, "centerY": 36, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "fsdu7vjq", diff --git a/assets/resources/dc/DailyChallenge_H.lh b/assets/resources/dc/DailyChallenge_H.lh index 7ecf7fd..ccf2e11 100644 --- a/assets/resources/dc/DailyChallenge_H.lh +++ b/assets/resources/dc/DailyChallenge_H.lh @@ -344,6 +344,12 @@ "height": 54, "skin": "res://4458c7de-47ff-496e-a28f-be808c0823b3", "color": "#545962", + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "7nzau29s", @@ -7658,6 +7664,12 @@ "visible": false, "top": 96, "centerX": 0, + "_$comp": [ + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts" + } + ], "_$child": [ { "_$id": "6wtxo5cb", diff --git a/src/Main.ts b/src/Main.ts index c3d307c..517bca6 100644 --- a/src/Main.ts +++ b/src/Main.ts @@ -4,16 +4,14 @@ import { DCManager } from "./models/DCManager" import { LevelManager } from "./models/LevelManager" import { StorageManager } from "./models/StorageManager" -const { regClass, property } = Laya +const { regClass } = Laya @regClass() export class Main extends Laya.Script { - @property(Boolean) - public debug: boolean = false + onAwake() { console.log("Game onAwake") - config.DEBUG = this.debug DCManager.getInstance().init() LevelManager.getInstance().init() StorageManager.getInstance().init() diff --git a/src/models/UIManager.ts b/src/models/UIManager.ts index e81ec9c..614cd21 100644 --- a/src/models/UIManager.ts +++ b/src/models/UIManager.ts @@ -24,15 +24,28 @@ export class UIManager extends Laya.Script { return UIManager._instance } + @property(Boolean) + public debug: boolean = false + @property(Laya.Image) public mask: Laya.Image + @property(Laya.Box) + public btn_clean: Laya.Box + onAwake(): void { UIManager._instance = this + config.DEBUG = this.debug this.mask.on(Laya.Event.CLICK, this, () => { console.log("on click mask >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>") }) this.mask.visible = false + + this.btn_clean.on(Laya.Event.CLICK, this, (evt: Laya.Event) => { + console.log("btn_clean=", evt) + StorageManager.getInstance().cleanAll() + }) + this.btn_clean.visible = this.debug } private UIRoot: Laya.Panel diff --git a/src/views/Home.ts b/src/views/Home.ts index dbb533f..b0efee9 100644 --- a/src/views/Home.ts +++ b/src/views/Home.ts @@ -42,9 +42,6 @@ export class Home extends Laya.Script { @property(Laya.Box) public btn_new_white: Laya.Box - @property(Laya.Box) - public btn_clean: Laya.Box - // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { const user = StorageManager.getInstance().getUser() @@ -140,13 +137,6 @@ export class Home extends Laya.Script { } } - // 测试逻辑 - this.btn_clean.on(Laya.Event.CLICK, this, (evt: Laya.Event) => { - console.log("btn_clean=", evt) - StorageManager.getInstance().cleanAll() - }) - this.btn_clean.visible = config.DEBUG - // ====== } public onClickNew(_evt: Laya.Event): void { diff --git a/src/views/common/CommonHover.ts b/src/views/common/CommonHover.ts new file mode 100644 index 0000000..00532d6 --- /dev/null +++ b/src/views/common/CommonHover.ts @@ -0,0 +1,20 @@ +const { regClass, property } = Laya; + +@regClass() +export class CommonHover extends Laya.Script { + declare owner : Laya.Box; + + + onAwake(): void { + this.owner.on(Laya.Event.MOUSE_OVER, this, ()=>{ + Laya.Render.canvas.style.cursor = "pointer" + this.owner.alpha = 0.7 + }) + this.owner.on(Laya.Event.MOUSE_OUT, this, ()=>{ + Laya.Render.canvas.style.cursor = "" + this.owner.alpha = 1 + }) + + } + +} \ No newline at end of file diff --git a/src/views/common/CommonHover.ts.meta b/src/views/common/CommonHover.ts.meta new file mode 100644 index 0000000..c84824d --- /dev/null +++ b/src/views/common/CommonHover.ts.meta @@ -0,0 +1,3 @@ +{ + "uuid": "a541bdfc-e8e1-4795-b68e-7138c5190f17" +} \ No newline at end of file