计算积分
This commit is contained in:
124
assets/Scene.ls
124
assets/Scene.ls
@@ -13,133 +13,11 @@
|
|||||||
{
|
{
|
||||||
"_$type": "7bad1742-6eed-4d8d-81c0-501dc5bf03d6",
|
"_$type": "7bad1742-6eed-4d8d-81c0-501dc5bf03d6",
|
||||||
"scriptPath": "../src/Main.ts",
|
"scriptPath": "../src/Main.ts",
|
||||||
"debug": false
|
"debug": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_$type": "cd70cd5e-b4cd-4277-ac0a-2224cfbe89ac",
|
"_$type": "cd70cd5e-b4cd-4277-ac0a-2224cfbe89ac",
|
||||||
"enabled": false,
|
|
||||||
"scriptPath": "../src/models/UIManager.ts"
|
"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.
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 238 KiB |
@@ -73,10 +73,13 @@
|
|||||||
"_$id": "v3amkm36",
|
"_$id": "v3amkm36",
|
||||||
"_$type": "Image",
|
"_$type": "Image",
|
||||||
"name": "light",
|
"name": "light",
|
||||||
"x": -48,
|
"x": -894,
|
||||||
"y": -680,
|
"y": -1308,
|
||||||
"width": 1080,
|
"width": 924,
|
||||||
"height": 1920,
|
"height": 924,
|
||||||
|
"scaleX": 3,
|
||||||
|
"scaleY": 3,
|
||||||
|
"alpha": 0.2,
|
||||||
"centerX": 0,
|
"centerX": 0,
|
||||||
"skin": "res://ebbaa034-8dd8-4fb8-abd5-094cdd76f93a",
|
"skin": "res://ebbaa034-8dd8-4fb8-abd5-094cdd76f93a",
|
||||||
"color": "#ffffff"
|
"color": "#ffffff"
|
||||||
|
|||||||
517
assets/resources/GameDone_H.lh
Normal file
517
assets/resources/GameDone_H.lh
Normal file
@@ -0,0 +1,517 @@
|
|||||||
|
{
|
||||||
|
"_$ver": 1,
|
||||||
|
"_$id": "d046cyp3",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "GameDone_H",
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080,
|
||||||
|
"_mouseState": 2,
|
||||||
|
"drawCallOptimize": true,
|
||||||
|
"left": 0,
|
||||||
|
"right": 0,
|
||||||
|
"top": 0,
|
||||||
|
"bottom": 0,
|
||||||
|
"_$comp": [
|
||||||
|
{
|
||||||
|
"_$type": "13e020d1-5ab8-4082-80ca-c0d208342103",
|
||||||
|
"scriptPath": "../src/views/GameDone.ts",
|
||||||
|
"obj_top": {
|
||||||
|
"_$ref": "n1aeh5hl"
|
||||||
|
},
|
||||||
|
"obj_stars": {
|
||||||
|
"_$ref": "td7ts6dl"
|
||||||
|
},
|
||||||
|
"obj_star": {
|
||||||
|
"_$ref": "jyqtn07j"
|
||||||
|
},
|
||||||
|
"label_diffucuty": {
|
||||||
|
"_$ref": "0pj64d40"
|
||||||
|
},
|
||||||
|
"label_time": {
|
||||||
|
"_$ref": "704gyeyq"
|
||||||
|
},
|
||||||
|
"label_score": {
|
||||||
|
"_$ref": "n75ha0o6"
|
||||||
|
},
|
||||||
|
"btn_new": {
|
||||||
|
"_$ref": "bqe5ubud"
|
||||||
|
},
|
||||||
|
"btn_home": {
|
||||||
|
"_$ref": "4udm9qfw"
|
||||||
|
},
|
||||||
|
"btn_continue": {
|
||||||
|
"_$ref": "e9lboae1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "ye1epf1c",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "bg_done",
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080,
|
||||||
|
"left": 0,
|
||||||
|
"right": 0,
|
||||||
|
"top": 0,
|
||||||
|
"bottom": 0,
|
||||||
|
"skin": "res://2b008659-862a-4155-b094-ee87ba692be1",
|
||||||
|
"color": "#ffffff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "n1aeh5hl",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "top",
|
||||||
|
"x": 100,
|
||||||
|
"y": 200,
|
||||||
|
"width": 984,
|
||||||
|
"height": 846,
|
||||||
|
"left": 100,
|
||||||
|
"centerY": 83,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "mspjp4xh",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "light",
|
||||||
|
"x": -48,
|
||||||
|
"y": -680,
|
||||||
|
"width": 1080,
|
||||||
|
"height": 1080,
|
||||||
|
"centerX": 0,
|
||||||
|
"skin": "res://ebbaa034-8dd8-4fb8-abd5-094cdd76f93a",
|
||||||
|
"color": "#ffffff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "ymdidw9g",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "bg",
|
||||||
|
"width": 984,
|
||||||
|
"height": 180,
|
||||||
|
"skin": "res://14316514-e8bf-4d32-bf9c-ba375ea24798",
|
||||||
|
"color": "#ffffff",
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "dtt03zk0",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite",
|
||||||
|
"y": 180,
|
||||||
|
"width": 984,
|
||||||
|
"height": 666,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 0,
|
||||||
|
"rt": 0,
|
||||||
|
"lb": 30,
|
||||||
|
"rb": 30,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "4uil2sv7",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite(1)",
|
||||||
|
"x": 44,
|
||||||
|
"y": 400,
|
||||||
|
"width": 888,
|
||||||
|
"height": 372,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 0,
|
||||||
|
"rt": 0,
|
||||||
|
"lb": 30,
|
||||||
|
"rb": 30,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "rgba(245, 247, 251, 1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "td7ts6dl",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "stars",
|
||||||
|
"y": -168,
|
||||||
|
"width": 984,
|
||||||
|
"height": 300,
|
||||||
|
"visible": false,
|
||||||
|
"centerX": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "u2pvpslb",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "check(1)",
|
||||||
|
"x": 69,
|
||||||
|
"y": 19,
|
||||||
|
"width": 308,
|
||||||
|
"height": 309,
|
||||||
|
"skin": "res://71d84f8a-b8bc-46ae-b68b-bbb43fd588d7",
|
||||||
|
"useSourceSize": true,
|
||||||
|
"color": "#ffffff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "5ufqn1lo",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "check(2)",
|
||||||
|
"x": 339,
|
||||||
|
"width": 306,
|
||||||
|
"height": 307,
|
||||||
|
"centerX": 0,
|
||||||
|
"skin": "res://902e1f3a-6f95-4796-8449-974ae5354d72",
|
||||||
|
"useSourceSize": true,
|
||||||
|
"color": "#ffffff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "cw48ra6d",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "check(3)",
|
||||||
|
"x": 696,
|
||||||
|
"y": -35,
|
||||||
|
"width": 308,
|
||||||
|
"height": 309,
|
||||||
|
"rotation": 26,
|
||||||
|
"gray": true,
|
||||||
|
"skin": "res://71d84f8a-b8bc-46ae-b68b-bbb43fd588d7",
|
||||||
|
"useSourceSize": true,
|
||||||
|
"color": "#ffffff"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "jyqtn07j",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "star",
|
||||||
|
"x": 330,
|
||||||
|
"y": -160,
|
||||||
|
"width": 108,
|
||||||
|
"height": 108,
|
||||||
|
"scaleX": 3,
|
||||||
|
"scaleY": 3,
|
||||||
|
"centerX": 0,
|
||||||
|
"skin": "res://c5e80bd0-632f-4460-bce3-ebf9669359e3",
|
||||||
|
"color": "#ffffff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "m4gct3kb",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "Label",
|
||||||
|
"y": 226,
|
||||||
|
"width": 984,
|
||||||
|
"height": 100,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": -147,
|
||||||
|
"text": "Congratulations!",
|
||||||
|
"fontSize": 80,
|
||||||
|
"color": "rgba(0, 0, 0, 1)",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "kyeppf37",
|
||||||
|
"_$type": "VBox",
|
||||||
|
"name": "summary",
|
||||||
|
"x": 92,
|
||||||
|
"y": 436,
|
||||||
|
"width": 800,
|
||||||
|
"height": 300,
|
||||||
|
"centerX": 0,
|
||||||
|
"space": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "66dlfmo8",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "Box(1)",
|
||||||
|
"width": 800,
|
||||||
|
"height": 100,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "0oiwsh8k",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "left",
|
||||||
|
"width": 400,
|
||||||
|
"height": 100,
|
||||||
|
"text": "Difficuty",
|
||||||
|
"fontSize": 42,
|
||||||
|
"color": "rgba(123, 129, 140, 1)",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "0pj64d40",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "right",
|
||||||
|
"x": 400,
|
||||||
|
"width": 400,
|
||||||
|
"height": 100,
|
||||||
|
"text": "Medium",
|
||||||
|
"fontSize": 48,
|
||||||
|
"color": "rgba(45, 49, 56, 1)",
|
||||||
|
"align": "right",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "l6abbx3m",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "Box(2)",
|
||||||
|
"y": 100,
|
||||||
|
"width": 800,
|
||||||
|
"height": 100,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "ro371bbq",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "left",
|
||||||
|
"width": 400,
|
||||||
|
"height": 100,
|
||||||
|
"text": "Time",
|
||||||
|
"fontSize": 42,
|
||||||
|
"color": "rgba(123, 129, 140, 1)",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "704gyeyq",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "right",
|
||||||
|
"x": 400,
|
||||||
|
"width": 400,
|
||||||
|
"height": 100,
|
||||||
|
"text": "Medium",
|
||||||
|
"fontSize": 48,
|
||||||
|
"color": "rgba(45, 49, 56, 1)",
|
||||||
|
"align": "right",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "l0rcu5zo",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "Box(3)",
|
||||||
|
"y": 200,
|
||||||
|
"width": 800,
|
||||||
|
"height": 100,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "c87ees02",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "left",
|
||||||
|
"width": 400,
|
||||||
|
"height": 100,
|
||||||
|
"text": "Score",
|
||||||
|
"fontSize": 42,
|
||||||
|
"color": "rgba(123, 129, 140, 1)",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "n75ha0o6",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "right",
|
||||||
|
"x": 400,
|
||||||
|
"width": 400,
|
||||||
|
"height": 100,
|
||||||
|
"text": "Medium",
|
||||||
|
"fontSize": 48,
|
||||||
|
"color": "rgba(45, 49, 56, 1)",
|
||||||
|
"align": "right",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "up490p42",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "bottom",
|
||||||
|
"y": 568,
|
||||||
|
"width": 1920,
|
||||||
|
"height": 492,
|
||||||
|
"left": 0,
|
||||||
|
"right": 0,
|
||||||
|
"bottom": 20,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "bqe5ubud",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "btn_new",
|
||||||
|
"x": 564,
|
||||||
|
"y": 80,
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"visible": false,
|
||||||
|
"centerX": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "ve80sg6x",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite",
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 20,
|
||||||
|
"rt": 20,
|
||||||
|
"lb": 20,
|
||||||
|
"rb": 20,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "rgba(29, 92, 220, 1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "3vi0pds4",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "Label",
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"text": "New Game",
|
||||||
|
"fontSize": 60,
|
||||||
|
"color": "rgba(255, 255, 255, 1)",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "4udm9qfw",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "btn_home",
|
||||||
|
"x": 564,
|
||||||
|
"y": 264,
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"visible": false,
|
||||||
|
"centerX": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "dhpbt4ky",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite",
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"alpha": 0.1,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 20,
|
||||||
|
"rt": 20,
|
||||||
|
"lb": 20,
|
||||||
|
"rb": 20,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "rgba(29, 92, 220, 1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "33e9tzad",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "Label",
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"text": "Home",
|
||||||
|
"fontSize": 60,
|
||||||
|
"color": "rgba(29, 92, 220, 1)",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "e9lboae1",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "btn_continue",
|
||||||
|
"x": 564,
|
||||||
|
"y": 264,
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"centerX": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "wepde6tb",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite",
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 20,
|
||||||
|
"rt": 20,
|
||||||
|
"lb": 20,
|
||||||
|
"rb": 20,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "rgba(29, 92, 220, 1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "faczj8th",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "Label",
|
||||||
|
"width": 792,
|
||||||
|
"height": 156,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"text": "Continue",
|
||||||
|
"fontSize": 60,
|
||||||
|
"color": "rgba(255, 255, 255, 1)",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
3
assets/resources/GameDone_H.lh.meta
Normal file
3
assets/resources/GameDone_H.lh.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"uuid": "133cf653-e407-4ea3-a301-6e4c32fa2653"
|
||||||
|
}
|
||||||
@@ -258,227 +258,235 @@
|
|||||||
"width": 468,
|
"width": 468,
|
||||||
"height": 468,
|
"height": 468,
|
||||||
"right": 0,
|
"right": 0,
|
||||||
"skin": "res://bb1fa7d6-3640-46a5-aad3-b8aa0dacdd0e",
|
"skin": "res://7d235ac1-6755-4409-ab86-23aaf41e1537",
|
||||||
"color": "#ffffff"
|
"color": "#ffffff"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_$id": "6irhm6t7",
|
"_$id": "scaq3jc6",
|
||||||
"_$type": "Box",
|
"_$type": "Box",
|
||||||
"name": "btn_new_blue",
|
"name": "bottom",
|
||||||
"x": 144,
|
"y": 1920,
|
||||||
"y": 1532,
|
"width": 1080,
|
||||||
"width": 792,
|
"height": 0,
|
||||||
"height": 168,
|
|
||||||
"visible": false,
|
|
||||||
"centerX": 0,
|
|
||||||
"centerY": 656,
|
|
||||||
"_$child": [
|
|
||||||
{
|
|
||||||
"_$id": "ry13plzy",
|
|
||||||
"_$type": "Sprite",
|
|
||||||
"name": "Sprite",
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"_gcmds": [
|
|
||||||
{
|
|
||||||
"_$type": "DrawRoundRectCmd",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"width": 1,
|
|
||||||
"height": 1,
|
|
||||||
"lt": 20,
|
|
||||||
"rt": 20,
|
|
||||||
"lb": 20,
|
|
||||||
"rb": 20,
|
|
||||||
"percent": true,
|
|
||||||
"lineWidth": 1,
|
|
||||||
"fillColor": "rgba(29, 92, 220, 1)"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_$id": "la3qcz7o",
|
|
||||||
"_$type": "Label",
|
|
||||||
"name": "Label",
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"centerX": 0,
|
|
||||||
"centerY": 0,
|
|
||||||
"text": "New Game",
|
|
||||||
"fontSize": 60,
|
|
||||||
"color": "#FFFFFF",
|
|
||||||
"bold": true,
|
|
||||||
"align": "center",
|
|
||||||
"valign": "middle",
|
|
||||||
"padding": "0,0,0,0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_$id": "9rcb0wtp",
|
|
||||||
"_$type": "Box",
|
|
||||||
"name": "btn_go",
|
|
||||||
"x": 144,
|
|
||||||
"y": 1428,
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"centerX": 0,
|
|
||||||
"centerY": 552,
|
|
||||||
"_$child": [
|
|
||||||
{
|
|
||||||
"_$id": "vfod7fmk",
|
|
||||||
"_$type": "Sprite",
|
|
||||||
"name": "Sprite",
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"_gcmds": [
|
|
||||||
{
|
|
||||||
"_$type": "DrawRoundRectCmd",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"width": 1,
|
|
||||||
"height": 1,
|
|
||||||
"lt": 20,
|
|
||||||
"rt": 20,
|
|
||||||
"lb": 20,
|
|
||||||
"rb": 20,
|
|
||||||
"percent": true,
|
|
||||||
"lineWidth": 1,
|
|
||||||
"fillColor": "rgba(29, 92, 220, 1)"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_$id": "f8ylua31",
|
|
||||||
"_$type": "Label",
|
|
||||||
"name": "Label",
|
|
||||||
"y": -32,
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"centerX": 0,
|
|
||||||
"centerY": -32,
|
|
||||||
"text": "Continue",
|
|
||||||
"fontSize": 60,
|
|
||||||
"color": "#FFFFFF",
|
|
||||||
"bold": true,
|
|
||||||
"align": "center",
|
|
||||||
"valign": "middle",
|
|
||||||
"padding": "0,0,0,0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_$id": "pr17wcli",
|
|
||||||
"_$type": "Image",
|
|
||||||
"name": "time",
|
|
||||||
"x": 267,
|
|
||||||
"y": 107,
|
|
||||||
"width": 35,
|
|
||||||
"height": 35,
|
|
||||||
"centerX": -112,
|
|
||||||
"centerY": 40,
|
|
||||||
"skin": "res://2b4d26c7-ae87-47a3-8084-29a243441634",
|
|
||||||
"useSourceSize": true,
|
|
||||||
"color": "#ffffff",
|
|
||||||
"_$child": [
|
|
||||||
{
|
|
||||||
"_$id": "2l5pfddm",
|
|
||||||
"_$type": "Label",
|
|
||||||
"name": "label_time",
|
|
||||||
"x": 51,
|
|
||||||
"width": 400,
|
|
||||||
"height": 35,
|
|
||||||
"alpha": 0.6,
|
|
||||||
"text": "00:00-Hard",
|
|
||||||
"fontSize": 36,
|
|
||||||
"color": "rgba(255, 255, 255, 0.6078431372549019)",
|
|
||||||
"bold": true,
|
|
||||||
"valign": "middle",
|
|
||||||
"padding": "0,0,0,0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_$id": "n4ggvqc0",
|
|
||||||
"_$type": "Box",
|
|
||||||
"name": "btn_new_white",
|
|
||||||
"x": 144,
|
|
||||||
"y": 1642,
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"centerX": 0,
|
|
||||||
"centerY": 766,
|
|
||||||
"_$child": [
|
|
||||||
{
|
|
||||||
"_$id": "sez4l9sx",
|
|
||||||
"_$type": "Sprite",
|
|
||||||
"name": "Sprite",
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"_gcmds": [
|
|
||||||
{
|
|
||||||
"_$type": "DrawRoundRectCmd",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"width": 1,
|
|
||||||
"height": 1,
|
|
||||||
"lt": 20,
|
|
||||||
"rt": 20,
|
|
||||||
"lb": 20,
|
|
||||||
"rb": 20,
|
|
||||||
"percent": true,
|
|
||||||
"lineWidth": 1,
|
|
||||||
"fillColor": "rgba(255, 255, 255, 1)"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_$id": "ihe7vkr1",
|
|
||||||
"_$type": "Label",
|
|
||||||
"name": "Label",
|
|
||||||
"width": 792,
|
|
||||||
"height": 168,
|
|
||||||
"centerX": 0,
|
|
||||||
"centerY": 0,
|
|
||||||
"text": "New Game",
|
|
||||||
"fontSize": 60,
|
|
||||||
"color": "rgba(29, 92, 220, 1)",
|
|
||||||
"bold": true,
|
|
||||||
"align": "center",
|
|
||||||
"valign": "middle",
|
|
||||||
"padding": "0,0,0,0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_$id": "mdqfz48j",
|
|
||||||
"_$type": "Box",
|
|
||||||
"name": "btn_clean",
|
|
||||||
"x": 440,
|
|
||||||
"y": 1820,
|
|
||||||
"width": 200,
|
|
||||||
"height": 100,
|
|
||||||
"visible": false,
|
|
||||||
"bottom": 0,
|
"bottom": 0,
|
||||||
"centerX": 0,
|
"centerX": 0,
|
||||||
"_$child": [
|
"_$child": [
|
||||||
{
|
{
|
||||||
"_$id": "yfgx8fq9",
|
"_$id": "6irhm6t7",
|
||||||
"_$type": "Label",
|
"_$type": "Box",
|
||||||
"name": "Label",
|
"name": "btn_new_blue",
|
||||||
|
"x": 144,
|
||||||
|
"y": -388,
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"visible": false,
|
||||||
|
"centerX": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "ry13plzy",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite",
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 20,
|
||||||
|
"rt": 20,
|
||||||
|
"lb": 20,
|
||||||
|
"rb": 20,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "rgba(29, 92, 220, 1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "la3qcz7o",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "Label",
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"text": "New Game",
|
||||||
|
"fontSize": 60,
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "9rcb0wtp",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "btn_go",
|
||||||
|
"x": 144,
|
||||||
|
"y": -492,
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"centerX": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "vfod7fmk",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite",
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 20,
|
||||||
|
"rt": 20,
|
||||||
|
"lb": 20,
|
||||||
|
"rb": 20,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "rgba(29, 92, 220, 1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "f8ylua31",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "Label",
|
||||||
|
"y": -32,
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": -32,
|
||||||
|
"text": "Continue",
|
||||||
|
"fontSize": 60,
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "pr17wcli",
|
||||||
|
"_$type": "Image",
|
||||||
|
"name": "time",
|
||||||
|
"x": 267,
|
||||||
|
"y": 107,
|
||||||
|
"width": 35,
|
||||||
|
"height": 35,
|
||||||
|
"centerX": -112,
|
||||||
|
"centerY": 40,
|
||||||
|
"skin": "res://2b4d26c7-ae87-47a3-8084-29a243441634",
|
||||||
|
"useSourceSize": true,
|
||||||
|
"color": "#ffffff",
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "2l5pfddm",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "label_time",
|
||||||
|
"x": 51,
|
||||||
|
"width": 400,
|
||||||
|
"height": 35,
|
||||||
|
"alpha": 0.6,
|
||||||
|
"text": "00:00-Hard",
|
||||||
|
"fontSize": 36,
|
||||||
|
"color": "rgba(255, 255, 255, 0.6078431372549019)",
|
||||||
|
"bold": true,
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "n4ggvqc0",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "btn_new_white",
|
||||||
|
"x": 144,
|
||||||
|
"y": -278,
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"centerX": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "sez4l9sx",
|
||||||
|
"_$type": "Sprite",
|
||||||
|
"name": "Sprite",
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"_gcmds": [
|
||||||
|
{
|
||||||
|
"_$type": "DrawRoundRectCmd",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"lt": 20,
|
||||||
|
"rt": 20,
|
||||||
|
"lb": 20,
|
||||||
|
"rb": 20,
|
||||||
|
"percent": true,
|
||||||
|
"lineWidth": 1,
|
||||||
|
"fillColor": "rgba(255, 255, 255, 1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "ihe7vkr1",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "Label",
|
||||||
|
"width": 792,
|
||||||
|
"height": 168,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"text": "New Game",
|
||||||
|
"fontSize": 60,
|
||||||
|
"color": "rgba(29, 92, 220, 1)",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "mdqfz48j",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "btn_clean",
|
||||||
|
"x": 440,
|
||||||
|
"y": -100,
|
||||||
"width": 200,
|
"width": 200,
|
||||||
"height": 100,
|
"height": 100,
|
||||||
|
"bottom": 0,
|
||||||
"centerX": 0,
|
"centerX": 0,
|
||||||
"centerY": 0,
|
"_$child": [
|
||||||
"text": "Clean",
|
{
|
||||||
"fontSize": 80,
|
"_$id": "yfgx8fq9",
|
||||||
"color": "rgba(89, 109, 152, 1)",
|
"_$type": "Label",
|
||||||
"bold": true,
|
"name": "Label",
|
||||||
"align": "center",
|
"width": 200,
|
||||||
"valign": "middle",
|
"height": 100,
|
||||||
"padding": "0,0,0,0"
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"text": "Clean",
|
||||||
|
"fontSize": 80,
|
||||||
|
"color": "rgba(89, 109, 152, 1)",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
40554
assets/resources/Stage_H.lh
Normal file
40554
assets/resources/Stage_H.lh
Normal file
File diff suppressed because it is too large
Load Diff
3
assets/resources/Stage_H.lh.meta
Normal file
3
assets/resources/Stage_H.lh.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"uuid": "665f7342-64cb-4801-a000-041575e71bb5"
|
||||||
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
"resolution": {
|
"resolution": {
|
||||||
"designWidth": 1080,
|
"designWidth": 1080,
|
||||||
"designHeight": 1920,
|
"designHeight": 1920
|
||||||
"scaleMode": "fixedauto"
|
|
||||||
},
|
},
|
||||||
"modules": {
|
"modules": {
|
||||||
"laya.ui": true,
|
"laya.ui": true,
|
||||||
|
|||||||
29
src/Entry.ts
29
src/Entry.ts
@@ -1,27 +1,26 @@
|
|||||||
|
|
||||||
import { config } from "./constants/config"
|
import { config } from "./constants/config"
|
||||||
|
|
||||||
Laya.addBeforeInitCallback((stageConfig) => {
|
Laya.addBeforeInitCallback((stageConfig) => {
|
||||||
// const { breakpoint } = config
|
console.log(`window innerWidth=${window.innerWidth} innerHeight=${window.innerHeight}`)
|
||||||
// if (window.innerWidth / window.innerHeight <= breakpoint) {
|
console.log(`stageConfig designWidth=${stageConfig.designWidth} designWidth=${stageConfig.designHeight}`)
|
||||||
// stageConfig.designWidth = 1080
|
// if (window.innerWidth > window.innerHeight) {
|
||||||
// stageConfig.designHeight = 1920
|
|
||||||
// stageConfig.scaleMode = "fixedwidth"
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// stageConfig.designWidth = 1920
|
// stageConfig.designWidth = 1920
|
||||||
// stageConfig.designHeight = 1080
|
// stageConfig.designHeight = 1080
|
||||||
// stageConfig.scaleMode = "fixedauto"
|
// stageConfig.scaleMode = "fixedwidth"
|
||||||
|
// config.H_SCREEN = true
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// stageConfig.designWidth = 1080
|
||||||
|
// stageConfig.designHeight = 1920
|
||||||
|
// stageConfig.scaleMode = "fixedheight"
|
||||||
|
// config.H_SCREEN = false
|
||||||
// }
|
// }
|
||||||
|
// console.log(`横屏=${config.H_SCREEN}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
export async function main() {
|
export async function main() {
|
||||||
console.log("entry")
|
console.log("entry")
|
||||||
const { BREAK_POINT } = config
|
|
||||||
// 加载场景并打开场景
|
// 加载场景并打开场景
|
||||||
if (window.innerWidth / window.innerHeight <= BREAK_POINT) {
|
Laya.Scene.open("Scene.ls")
|
||||||
Laya.Scene.open("Scene.ls")
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Laya.Scene.open("Scene.ls")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
|
|
||||||
BREAK_POINT: 1, // 竖版和横版的分界宽度
|
H_SCREEN: false, // 是否横屏
|
||||||
|
|
||||||
DEBUG: false,
|
DEBUG: false,
|
||||||
OPEN_GUIDE: true,
|
OPEN_GUIDE: true,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { config } from "./config";
|
||||||
|
|
||||||
|
|
||||||
export const respath = {
|
export const respath = {
|
||||||
@@ -8,7 +9,10 @@ export const respath = {
|
|||||||
trophy_ui_res: "resources/TrophyRoom.lh",
|
trophy_ui_res: "resources/TrophyRoom.lh",
|
||||||
trophy_year_ui_res: "resources/TrophyRoomYear.lh",
|
trophy_year_ui_res: "resources/TrophyRoomYear.lh",
|
||||||
trophy_cell_ui_res: "resources/TrophyRoomCell.lh",
|
trophy_cell_ui_res: "resources/TrophyRoomCell.lh",
|
||||||
stage_ui_res: "resources/Stage.lh",
|
stage_ui_res: function func(): string {
|
||||||
|
return config.H_SCREEN ? "resources/Stage_H.lh" : "resources/Stage.lh"
|
||||||
|
},
|
||||||
|
|
||||||
gameover_ui_res: "resources/GameOver.lh",
|
gameover_ui_res: "resources/GameOver.lh",
|
||||||
gamedone_ui_res: "resources/GameDone.lh",
|
gamedone_ui_res: "resources/GameDone.lh",
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ export class DOBlock {
|
|||||||
public set_show(show: number): void {
|
public set_show(show: number): void {
|
||||||
this.data.show = show
|
this.data.show = show
|
||||||
this.checked = show == this.get_correct()
|
this.checked = show == this.get_correct()
|
||||||
if (this.checked == false)
|
|
||||||
this.set_score(0)
|
|
||||||
StorageManager.getInstance().onStageChanged()
|
StorageManager.getInstance().onStageChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,14 @@ export class DOStage {
|
|||||||
StorageManager.getInstance().onStageChanged()
|
StorageManager.getInstance().onStageChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get_last_hit_time(): number {
|
||||||
|
return this.data.last_hit_time
|
||||||
|
}
|
||||||
|
public set_last_hit_time(last_hit_time: number): void {
|
||||||
|
this.data.last_hit_time = last_hit_time
|
||||||
|
StorageManager.getInstance().onStageChanged()
|
||||||
|
}
|
||||||
|
|
||||||
public get_note_open(): boolean {
|
public get_note_open(): boolean {
|
||||||
return this.data.note_open
|
return this.data.note_open
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { DailyChallenge } from "../views/DailyChallenge"
|
|||||||
import { TrophyRecord } from "../types/global"
|
import { TrophyRecord } from "../types/global"
|
||||||
import { TrophyClaim } from "../views/TrophyClaim"
|
import { TrophyClaim } from "../views/TrophyClaim"
|
||||||
import { TrophyShow } from "../views/TrophyShow"
|
import { TrophyShow } from "../views/TrophyShow"
|
||||||
|
import { config } from "../constants/config"
|
||||||
|
|
||||||
|
|
||||||
const { regClass, property } = Laya
|
const { regClass, property } = Laya
|
||||||
@@ -76,7 +77,7 @@ export class UIManager extends Laya.Script {
|
|||||||
this.stage.onLoadStage(StorageManager.getInstance().loadStage(stageID))
|
this.stage.onLoadStage(StorageManager.getInstance().loadStage(stageID))
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Laya.loader.load(respath.stage_ui_res).then((go)=>{
|
Laya.loader.load(respath.stage_ui_res()).then((go)=>{
|
||||||
var prefab = go.create()
|
var prefab = go.create()
|
||||||
this.stage = this.getUIRoot().addChild(prefab).getComponent(Stage)
|
this.stage = this.getUIRoot().addChild(prefab).getComponent(Stage)
|
||||||
this.stage.onLoadStage(StorageManager.getInstance().loadStage(stageID))
|
this.stage.onLoadStage(StorageManager.getInstance().loadStage(stageID))
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export interface DataStage {
|
|||||||
mistake?: number,
|
mistake?: number,
|
||||||
score?: number,
|
score?: number,
|
||||||
duration?: number,
|
duration?: number,
|
||||||
|
last_hit_time?: number,//上一次填对计时
|
||||||
note_open?: boolean,
|
note_open?: boolean,
|
||||||
hint?: number,
|
hint?: number,
|
||||||
select_index?: number,
|
select_index?: number,
|
||||||
@@ -36,6 +37,7 @@ export function createDataStage(id: string, type: number, name: string, difficul
|
|||||||
data.mistake = 0
|
data.mistake = 0
|
||||||
data.score = 0
|
data.score = 0
|
||||||
data.duration = 0
|
data.duration = 0
|
||||||
|
data.last_hit_time = 0
|
||||||
data.note_open = false
|
data.note_open = false
|
||||||
data.hint = 2
|
data.hint = 2
|
||||||
data.select_index = 0
|
data.select_index = 0
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { config } from "../constants/config"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -12,4 +13,27 @@ export function Utility_ConvertSecondToString(second: number) {
|
|||||||
return value>=10?value.toString():("0"+value)
|
return value>=10?value.toString():("0"+value)
|
||||||
}
|
}
|
||||||
return `${format(hour)}:${format(minite)}:${format(second)}`
|
return `${format(hour)}:${format(minite)}:${format(second)}`
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算积分
|
||||||
|
export function Utility_CalculateScore(difficulty: string, second: number): number {
|
||||||
|
var score = 0
|
||||||
|
var currentTime = Math.min(120, second)
|
||||||
|
if (difficulty == config.DIFFICULTY_TYPE.Easy) {
|
||||||
|
score = 270 - currentTime
|
||||||
|
}
|
||||||
|
else if (difficulty == config.DIFFICULTY_TYPE.Medium) {
|
||||||
|
score = 420 - currentTime * 2
|
||||||
|
}
|
||||||
|
else if (difficulty == config.DIFFICULTY_TYPE.Hard) {
|
||||||
|
score = 760 - currentTime * 3
|
||||||
|
}
|
||||||
|
else if (difficulty == config.DIFFICULTY_TYPE.Expert) {
|
||||||
|
score = 1120 - currentTime * 3
|
||||||
|
}
|
||||||
|
else if (difficulty == config.DIFFICULTY_TYPE.Extreme) {
|
||||||
|
score = 1320 - currentTime * 4
|
||||||
|
}
|
||||||
|
// console.log("计算积分 >>>>>", difficulty, second, score)
|
||||||
|
return score
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,6 @@ export class Block extends Laya.Script {
|
|||||||
private tips_labels: Array<Laya.Label> = new Array();
|
private tips_labels: Array<Laya.Label> = new Array();
|
||||||
|
|
||||||
private selected: boolean = false
|
private selected: boolean = false
|
||||||
private newSelect: boolean = false
|
|
||||||
|
|
||||||
private data: DOBlock
|
private data: DOBlock
|
||||||
|
|
||||||
@@ -56,8 +55,6 @@ export class Block extends Laya.Script {
|
|||||||
|
|
||||||
public setSelected(selected: boolean): void {
|
public setSelected(selected: boolean): void {
|
||||||
this.selected = selected
|
this.selected = selected
|
||||||
if (selected)
|
|
||||||
this.newSelect = true
|
|
||||||
this.updateBlock()
|
this.updateBlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,15 +115,16 @@ export class Block extends Laya.Script {
|
|||||||
return this.data
|
return this.data
|
||||||
}
|
}
|
||||||
|
|
||||||
public setShowNumber(showNumber: number): boolean {
|
public setShowNumber(showNumber: number, score: number): boolean {
|
||||||
this.data.set_show(showNumber)
|
this.data.set_show(showNumber)
|
||||||
if (this.newSelect) {
|
if (this.data.get_checked()) {
|
||||||
this.newSelect = false
|
this.data.set_score(score)
|
||||||
if (this.data.get_checked() && this.data.get_score() <= 0) {
|
if (score > 0)
|
||||||
var score = 150
|
|
||||||
this.data.set_score(score)
|
|
||||||
G_ShowScoreTips(score.toString(), this.label_show)
|
G_ShowScoreTips(score.toString(), this.label_show)
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (this.data.get_score() != 0)
|
||||||
|
this.data.set_score(0)
|
||||||
}
|
}
|
||||||
this.data.clean_notes()
|
this.data.clean_notes()
|
||||||
this.updateBlock()
|
this.updateBlock()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Candy } from "./Candy";
|
|||||||
import { DOStage } from "../models/DOStage";
|
import { DOStage } from "../models/DOStage";
|
||||||
import { config } from "../constants/config";
|
import { config } from "../constants/config";
|
||||||
import { StorageManager } from "../models/StorageManager";
|
import { StorageManager } from "../models/StorageManager";
|
||||||
import { Utility_ConvertSecondToString } from "../utils/utility";
|
import { Utility_CalculateScore, Utility_ConvertSecondToString } from "../utils/utility";
|
||||||
import { EVENT_TYPES, EventManager } from "../models/EventManager";
|
import { EVENT_TYPES, EventManager } from "../models/EventManager";
|
||||||
import { G_getMonthInfo } from "../models/DCManager";
|
import { G_getMonthInfo } from "../models/DCManager";
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ export class Stage extends Laya.Script {
|
|||||||
this.selectedBlock.setNotes(undo.notes)
|
this.selectedBlock.setNotes(undo.notes)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.selectedBlock.setShowNumber(undo.show)
|
this.selectedBlock.setShowNumber(undo.show, 0)
|
||||||
}
|
}
|
||||||
// this.onSetBlock(this.selectedBlock)
|
// this.onSetBlock(this.selectedBlock)
|
||||||
this.onUpdateScore()
|
this.onUpdateScore()
|
||||||
@@ -265,7 +265,7 @@ export class Stage extends Laya.Script {
|
|||||||
var notes = this.selectedBlock.getData().get_notes()
|
var notes = this.selectedBlock.getData().get_notes()
|
||||||
if (show > 0 || notes.length > 0) {
|
if (show > 0 || notes.length > 0) {
|
||||||
this.data.add_undo(this.selectedBlock.getData().get_index(), show, notes)
|
this.data.add_undo(this.selectedBlock.getData().get_index(), show, notes)
|
||||||
this.selectedBlock.setShowNumber(0)
|
this.selectedBlock.setShowNumber(0, 0)
|
||||||
this.onUpdateScore()
|
this.onUpdateScore()
|
||||||
this.onSetBlock(this.selectedBlock)
|
this.onSetBlock(this.selectedBlock)
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ export class Stage extends Laya.Script {
|
|||||||
if (hint > 0) {
|
if (hint > 0) {
|
||||||
if (this.selectedBlock.getData().get_checked() == false) {//当前选中的格子没有完成
|
if (this.selectedBlock.getData().get_checked() == false) {//当前选中的格子没有完成
|
||||||
var correct = this.selectedBlock.getData().get_correct()
|
var correct = this.selectedBlock.getData().get_correct()
|
||||||
this.onApplyCandy(correct)
|
this.onApplyCandy(correct, true)
|
||||||
this.data.set_hint(hint-1)
|
this.data.set_hint(hint-1)
|
||||||
this.onUpdateHintStatus()
|
this.onUpdateHintStatus()
|
||||||
}
|
}
|
||||||
@@ -308,7 +308,7 @@ export class Stage extends Laya.Script {
|
|||||||
var block = list[index]
|
var block = list[index]
|
||||||
this.onApplyBlock(block)
|
this.onApplyBlock(block)
|
||||||
var correct = block.getData().get_correct()
|
var correct = block.getData().get_correct()
|
||||||
this.onApplyCandy(correct)
|
this.onApplyCandy(correct, true)
|
||||||
this.data.set_hint(hint-1)
|
this.data.set_hint(hint-1)
|
||||||
this.onUpdateHintStatus()
|
this.onUpdateHintStatus()
|
||||||
}
|
}
|
||||||
@@ -328,7 +328,7 @@ export class Stage extends Laya.Script {
|
|||||||
this.btn_hint_label.text = hint.toString()
|
this.btn_hint_label.text = hint.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
public onApplyCandy(showNumber: number): void {
|
public onApplyCandy(showNumber: number, hint: boolean): void {
|
||||||
var show = this.selectedBlock.getData().get_show()
|
var show = this.selectedBlock.getData().get_show()
|
||||||
var notes = this.selectedBlock.getData().get_notes()
|
var notes = this.selectedBlock.getData().get_notes()
|
||||||
if (this.selectedBlock.getData().get_checked() == false) {
|
if (this.selectedBlock.getData().get_checked() == false) {
|
||||||
@@ -358,14 +358,20 @@ export class Stage extends Laya.Script {
|
|||||||
else {
|
else {
|
||||||
this.data.add_undo(this.selectedBlock.getData().get_index(), show, notes)
|
this.data.add_undo(this.selectedBlock.getData().get_index(), show, notes)
|
||||||
if (this.selectedBlock.getData().get_show() == showNumber) {
|
if (this.selectedBlock.getData().get_show() == showNumber) {
|
||||||
this.selectedBlock.setShowNumber(0);
|
this.selectedBlock.setShowNumber(0, 0);
|
||||||
this.onSetBlock(this.selectedBlock)
|
this.onSetBlock(this.selectedBlock)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var b = this.selectedBlock.setShowNumber(showNumber)
|
var blockScore = 0
|
||||||
|
if (hint == false) {
|
||||||
|
var duration = this.data.get_duration() - this.data.get_last_hit_time()
|
||||||
|
blockScore = Utility_CalculateScore(this.data.get_difficulty(), duration)
|
||||||
|
}
|
||||||
|
var b = this.selectedBlock.setShowNumber(showNumber, blockScore)
|
||||||
var score = this.onUpdateScore()
|
var score = this.onUpdateScore()
|
||||||
this.onSetBlock(this.selectedBlock, true)
|
this.onSetBlock(this.selectedBlock, true)
|
||||||
if (b) {
|
if (b) {
|
||||||
|
this.data.set_last_hit_time(this.data.get_duration())
|
||||||
var user = StorageManager.getInstance().getUser()
|
var user = StorageManager.getInstance().getUser()
|
||||||
var all = 0
|
var all = 0
|
||||||
var finished = 0
|
var finished = 0
|
||||||
@@ -423,13 +429,13 @@ export class Stage extends Laya.Script {
|
|||||||
|
|
||||||
public onClickCandy(evt: Laya.Event): void {
|
public onClickCandy(evt: Laya.Event): void {
|
||||||
var candy = evt.target.getComponent(Candy);
|
var candy = evt.target.getComponent(Candy);
|
||||||
this.onApplyCandy(candy.get_show())
|
this.onApplyCandy(candy.get_show(), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeyUp(evt: Laya.Event): void {
|
onKeyUp(evt: Laya.Event): void {
|
||||||
var n = Number(evt.key)
|
var n = Number(evt.key)
|
||||||
if (n && n > 0) {
|
if (n && n > 0) {
|
||||||
this.onApplyCandy(n)
|
this.onApplyCandy(n, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user