Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
extreme_skiing
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
extreme_skiing
Commits
ae298c79
Commit
ae298c79
authored
Aug 15, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
撒花
parent
c5999e5c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1254 additions
and
9 deletions
+1254
-9
extreme_skiing.fire
assets/extreme_skiing/scene/extreme_skiing.fire
+1170
-3
extreme_skiing.ts
assets/extreme_skiing/scene/extreme_skiing.ts
+78
-4
layout_game.ts
assets/extreme_skiing/scene/game/layout_game.ts
+6
-2
No files found.
assets/extreme_skiing/scene/extreme_skiing.fire
View file @
ae298c79
...
@@ -94,18 +94,21 @@
...
@@ -94,18 +94,21 @@
},
},
{
{
"__id__": 56
"__id__": 56
},
{
"__id__": 84
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
84
"__id__":
105
},
},
{
{
"__id__":
85
"__id__":
106
},
},
{
{
"__id__":
86
"__id__":
107
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4120,6 +4123,1170 @@
...
@@ -4120,6 +4123,1170 @@
"_N$target": null,
"_N$target": null,
"_id": "c7FCLzlDxDqo7EMpGcppDr"
"_id": "c7FCLzlDxDqo7EMpGcppDr"
},
},
{
"__type__": "cc.Node",
"_name": "paperBase",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 85
},
{
"__id__": 89
},
{
"__id__": 93
},
{
"__id__": 97
},
{
"__id__": 101
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1861.265,
-1216.272,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "c0AJtKmbJPoaV+YMlWup+a"
},
{
"__type__": "cc.Node",
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 84
},
"_children": [
{
"__id__": 86
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b76ApfMh9JPJV2TMbdyRQR"
},
{
"__type__": "cc.Node",
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 85
},
"_children": [
{
"__id__": 87
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "fftQ61WL1L/o1SgcbO5K7Y"
},
{
"__type__": "cc.Node",
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 86
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 88
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 17
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f8gVVWIadLCZJtl847Dru+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "87d63e6a-17a8-4ee2-b9f5-2fa9f0d744bc"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "c38SnmLG9BIpkqPUo30IOL"
},
{
"__type__": "cc.Node",
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 84
},
"_children": [
{
"__id__": 90
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "7c62mZKkpMdqTNChlbaKEU"
},
{
"__type__": "cc.Node",
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 89
},
"_children": [
{
"__id__": 91
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b506sHR1xKJ6+zbDx/4LKl"
},
{
"__type__": "cc.Node",
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 90
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 92
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 17
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "ca27f+JIpGX6aroZLVvPMX"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "2c001aba-acde-4b94-8ada-3678f5b27d61"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a8/rSqhKJEnq4wtbtcvpyH"
},
{
"__type__": "cc.Node",
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 84
},
"_children": [
{
"__id__": 94
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "7fxJAc2wNE/ZWpPoboXr/p"
},
{
"__type__": "cc.Node",
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 93
},
"_children": [
{
"__id__": 95
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "97OEGrYEpEo6D2heF50LEl"
},
{
"__type__": "cc.Node",
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 94
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 96
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 17
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d7NjaubJJNaaRcwoYNdpMX"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "eb09a891-e055-462a-ade6-c5e08dc6f24c"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "25axBgTi1KH6nkVIE4VNtP"
},
{
"__type__": "cc.Node",
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 84
},
"_children": [
{
"__id__": 98
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "adrnKhVxNLBI5I0S7xnu0B"
},
{
"__type__": "cc.Node",
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 97
},
"_children": [
{
"__id__": 99
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "38sKI4WlNCk5gDhCCbfwFs"
},
{
"__type__": "cc.Node",
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 98
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 100
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 17
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "1fgVx0wpBN5bNR9JXXOnJv"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4b8ee07a-3d5f-48b4-aa9a-9432c370dde3"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "0e8YzlYVRIbbkLfsbJtapt"
},
{
"__type__": "cc.Node",
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 84
},
"_children": [
{
"__id__": 102
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "09Ff0wc7FJ4at4UytlF57t"
},
{
"__type__": "cc.Node",
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 101
},
"_children": [
{
"__id__": 103
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8aR3CJxMJKMIihkv10Qx/1"
},
{
"__type__": "cc.Node",
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 102
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 104
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 17
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "61AMj8DblLxLzX8L9MokqO"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 103
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "aab1076f-cb07-452e-a50e-858fb0e940b0"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "61zGt0crNLCaphU32lgTTA"
},
{
{
"__type__": "cc.Canvas",
"__type__": "cc.Canvas",
"_name": "",
"_name": "",
...
...
assets/extreme_skiing/scene/extreme_skiing.ts
View file @
ae298c79
import
{
asyncDelay
,
onHomeworkFinish
}
from
"
../script/util
"
;
import
{
asyncDelay
,
onHomeworkFinish
,
RandomInt
}
from
"
../script/util
"
;
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
Game
,
{
FISH_OUT
,
GAME_STATE
,
Option
}
from
"
./tool/Game
"
;
import
Game
,
{
FISH_OUT
,
GAME_STATE
,
Option
}
from
"
./tool/Game
"
;
import
pg
from
"
./tool/pg
"
;
import
pg
from
"
./tool/pg
"
;
...
@@ -88,9 +88,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -88,9 +88,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
layout_start
:
cc
.
Node
;
private
layout_start
:
cc
.
Node
;
private
audioId
:
any
;
private
audioId
:
any
;
private
countDown
:
number
=
999999
;
private
timeCount
:
number
;
private
startCount
=
15
;
async
initView
()
{
async
initView
()
{
cc
.
audioEngine
.
stopAllEffects
();
cc
.
audioEngine
.
stopAllEffects
();
this
.
layout_start
=
pg
.
view
.
find
(
this
,
"
layout_start
"
);
this
.
layout_start
=
pg
.
view
.
find
(
this
,
"
layout_start
"
);
...
@@ -126,6 +123,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -126,6 +123,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
event
.
on
(
"
play_laba_audio
"
,
()
=>
{
pg
.
event
.
on
(
"
play_laba_audio
"
,
()
=>
{
this
.
playLaba
();
this
.
playLaba
();
});
});
pg
.
event
.
on
(
"
skiing_show_firework
"
,
()
=>
{
this
.
playLocalAudio
(
"
sahua
"
);
let
endPos
=
cc
.
find
(
"
Canvas/bg/bg_could/endPos
"
);
this
.
showOneFirework
(
endPos
.
getPosition
(),
endPos
.
parent
,
cc
.
find
(
'
paperBase
'
,
this
.
node
).
children
);
});
pg
.
event
.
on
(
"
game_time_over
"
,
()
=>
{
pg
.
event
.
on
(
"
game_time_over
"
,
()
=>
{
// alert("game_time_over")
// alert("game_time_over")
//这里的事件会发送的很早。但是我们需要等待动画执行完了之后再开始后续的内容
//这里的事件会发送的很早。但是我们需要等待动画执行完了之后再开始后续的内容
...
@@ -216,6 +218,78 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -216,6 +218,78 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
getCurrentPage
().
audio
).
then
(()
=>
{
stop
=
true
;
})
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
getCurrentPage
().
audio
).
then
(()
=>
{
stop
=
true
;
})
}
}
async
showOneFirework
(
pos
,
parentNode
,
nodeList
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
this
.
showFirework
(
pos
,
parentNode
,
nodeList
,
200
,
200
,
25
);
await
asyncDelay
(
0.1
);
}
}
showFirework
(
pos
,
parentNode
,
nodeList
,
width
=
200
,
height
=
500
,
number
=
30
)
{
for
(
let
i
=
0
;
i
<
number
;
i
++
)
{
const
quad
=
this
.
createQuads
(
pos
,
parentNode
,
nodeList
);
const
targetX
=
RandomInt
(
width
/
2
,
-
width
/
2
);
const
targetY
=
RandomInt
(
height
);
cc
.
tween
(
quad
)
.
by
(
0.5
,
{
x
:
targetX
})
.
by
(
3
,
{
x
:
targetX
*
2
})
.
start
();
cc
.
tween
(
quad
)
.
by
(
0.5
,
{
y
:
targetY
},
{
easing
:
'
quadOut
'
})
.
to
(
4
,
{
y
:
-
parentNode
.
height
*
2
},
{
easing
:
'
quadIn
'
})
.
removeSelf
()
.
start
();
cc
.
tween
(
quad
)
.
delay
(
1
)
.
to
(
0.5
+
1
*
Math
.
random
(),
{
opacity
:
0
})
.
start
();
}
}
createQuads
(
pos
,
parentNode
,
nodeList
)
{
const
quadBase
=
cc
.
instantiate
(
nodeList
[
RandomInt
(
nodeList
.
length
)]);
// console.log('nodeList', nodeList);
// console.log('quadBase', quadBase);
quadBase
.
x
=
pos
.
x
;
quadBase
.
y
=
pos
.
y
+
30
;
quadBase
.
z
=
pos
.
z
;
quadBase
.
angle
=
RandomInt
(
180
);
quadBase
.
parent
=
parentNode
;
const
quad
=
quadBase
.
getChildByName
(
'
quad
'
);
quad
.
x
=
0
;
quad
.
y
=
0
;
quad
.
angle
=
RandomInt
(
180
);
const
paper
=
quad
.
getChildByName
(
'
paper
'
);
paper
.
scaleX
=
Math
.
random
()
*
0.8
+
0.2
;
paper
.
scaleY
=
Math
.
random
()
*
0.8
+
0.2
;
quadBase
.
scaleX
=
Math
.
random
();
cc
.
tween
(
quadBase
)
.
to
((
1
-
quadBase
.
scaleX
)
*
0.3
,
{
scaleX
:
1
})
.
call
(()
=>
{
const
time
=
Math
.
random
()
*
0.2
;
cc
.
tween
(
quadBase
)
.
to
(
0.1
+
time
,
{
scaleX
:
-
1
})
.
to
(
0.1
+
time
,
{
scaleX
:
1
})
.
union
()
.
repeatForever
()
.
start
();
})
.
start
();
return
quadBase
;
}
}
}
assets/extreme_skiing/scene/game/layout_game.ts
View file @
ae298c79
...
@@ -107,7 +107,6 @@ export default class layout_game extends cc.Component {
...
@@ -107,7 +107,6 @@ export default class layout_game extends cc.Component {
this
.
touch
=
true
;
this
.
touch
=
true
;
if
(
data
.
right
)
{
if
(
data
.
right
)
{
data
.
touchRight
=
true
;
data
.
touchRight
=
true
;
//爆炸效果
this
.
rightNum
++
;
this
.
rightNum
++
;
item
.
opacity
=
0
;
item
.
opacity
=
0
;
Game
.
getIns
().
player
.
addRight
();
Game
.
getIns
().
player
.
addRight
();
...
@@ -155,7 +154,12 @@ export default class layout_game extends cc.Component {
...
@@ -155,7 +154,12 @@ export default class layout_game extends cc.Component {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
img_player
=
cc
.
find
(
"
Canvas/bg/bg_could/img_player
"
);
let
img_player
=
cc
.
find
(
"
Canvas/bg/bg_could/img_player
"
);
let
endPos
=
cc
.
find
(
"
Canvas/bg/bg_could/endPos
"
);
let
endPos
=
cc
.
find
(
"
Canvas/bg/bg_could/endPos
"
);
cc
.
tween
(
img_player
).
to
(
1
,
{
x
:
img_player
.
x
,
y
:
endPos
.
y
,
scale
:
0.16
})
cc
.
tween
(
img_player
)
.
delay
(
0.1
)
.
call
(()
=>
{
this
.
playLocalAudio
(
"
huaxue
"
);
})
.
to
(
1
,
{
x
:
img_player
.
x
,
y
:
endPos
.
y
,
scale
:
0.16
})
.
call
(()
=>
{
pg
.
event
.
emit
(
"
skiing_show_firework
"
)
})
.
delay
(
1
)
.
call
(()
=>
{
return
resolve
(
''
)
})
.
call
(()
=>
{
return
resolve
(
''
)
})
.
start
();
.
start
();
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment