Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c816cfc01 | |||
| 712814b98e | |||
| 929f165c45 | |||
| f666d01370 | |||
| 8640cca10f |
BIN
assets/Buttons/select.png
Normal file
|
After Width: | Height: | Size: 186 KiB |
34
assets/Buttons/select.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "61ef4b76-ea31-470f-af82-bc4fbee2bf69",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"select": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "19079cc6-f48e-4ef9-bf7c-b53624d3bad6",
|
||||
"rawTextureUuid": "61ef4b76-ea31-470f-af82-bc4fbee2bf69",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -0.5,
|
||||
"offsetY": 0,
|
||||
"trimX": 79,
|
||||
"trimY": 84,
|
||||
"width": 453,
|
||||
"height": 240,
|
||||
"rawWidth": 612,
|
||||
"rawHeight": 408,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
assets/Buttons/selected.png
Normal file
|
After Width: | Height: | Size: 172 KiB |
34
assets/Buttons/selected.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "48aeb9dc-565f-4dff-9ea8-87edec42cd8e",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"selected": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "ff64caa3-19f2-46ca-8c65-ba297df0f85b",
|
||||
"rawTextureUuid": "48aeb9dc-565f-4dff-9ea8-87edec42cd8e",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": -7,
|
||||
"trimX": 57,
|
||||
"trimY": 107,
|
||||
"width": 386,
|
||||
"height": 300,
|
||||
"rawWidth": 500,
|
||||
"rawHeight": 500,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
assets/Buttons/store.png
Normal file
|
After Width: | Height: | Size: 203 KiB |
34
assets/Buttons/store.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "d5a4cceb-814a-4da2-8392-18fa4a00df30",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"store": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "6a617218-3c12-47bf-a1fa-6432bff4391c",
|
||||
"rawTextureUuid": "d5a4cceb-814a-4da2-8392-18fa4a00df30",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": -1,
|
||||
"trimX": 50,
|
||||
"trimY": 74,
|
||||
"width": 400,
|
||||
"height": 354,
|
||||
"rawWidth": 500,
|
||||
"rawHeight": 500,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
268
assets/Game.fire
@ -68,32 +68,32 @@
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 32
|
||||
"__id__": 31
|
||||
},
|
||||
{
|
||||
"__id__": 38
|
||||
"__id__": 37
|
||||
},
|
||||
{
|
||||
"__id__": 43
|
||||
"__id__": 42
|
||||
},
|
||||
{
|
||||
"__id__": 45
|
||||
"__id__": 44
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_level": 1,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 49
|
||||
},
|
||||
{
|
||||
"__id__": 50
|
||||
},
|
||||
{
|
||||
"__id__": 51
|
||||
},
|
||||
{
|
||||
"__id__": 52
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -177,7 +177,7 @@
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 540.3998519614897
|
||||
"z": 769.896583964366
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -417,22 +417,21 @@
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 12
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 31
|
||||
"__id__": 29
|
||||
},
|
||||
{
|
||||
"__id__": 30
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -478,70 +477,12 @@
|
||||
"groupIndex": 3,
|
||||
"_id": "f7jh+kBxhCWakG/dJc/bGy"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "alienship1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 165,
|
||||
"height": 154
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"groupIndex": 0,
|
||||
"_id": "2cghscU9dIH67SGUN2y7/j"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 9
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -566,36 +507,6 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "e3jYYahGtA0r3vMlde8BNs"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "130k9PPWVPubyMVLckxDCJ"
|
||||
},
|
||||
{
|
||||
@ -610,7 +521,7 @@
|
||||
"__uuid__": "9c1eea54-1438-4486-9ff4-c2ba640da280"
|
||||
},
|
||||
"heartContainer": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_id": "15NYjVkItKELZAnW57eLwS"
|
||||
},
|
||||
@ -622,6 +533,9 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 12
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
@ -642,16 +556,13 @@
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 30
|
||||
"__id__": 28
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -702,14 +613,14 @@
|
||||
"_name": "heart1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 15
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -760,7 +671,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 14
|
||||
"__id__": 12
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -792,14 +703,14 @@
|
||||
"_name": "heart2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 17
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -850,7 +761,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 16
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -882,14 +793,14 @@
|
||||
"_name": "heart3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 19
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -940,7 +851,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 18
|
||||
"__id__": 16
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -972,14 +883,14 @@
|
||||
"_name": "heart4",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 21
|
||||
"__id__": 19
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -1030,7 +941,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -1062,14 +973,14 @@
|
||||
"_name": "heart5",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 23
|
||||
"__id__": 21
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -1120,7 +1031,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 22
|
||||
"__id__": 20
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -1152,14 +1063,14 @@
|
||||
"_name": "heart6",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 25
|
||||
"__id__": 23
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -1210,7 +1121,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -1242,14 +1153,14 @@
|
||||
"_name": "heart7",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 27
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -1300,7 +1211,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 26
|
||||
"__id__": 24
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -1332,14 +1243,14 @@
|
||||
"_name": "heart8",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 29
|
||||
"__id__": 27
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -1390,7 +1301,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -1422,7 +1333,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 13
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -2147,6 +2058,25 @@
|
||||
],
|
||||
"_id": "965MCSJRhGs5q7cLGkd0WT"
|
||||
},
|
||||
{
|
||||
"__type__": "ddcfeMbF29P8LR+YmLBmQhL",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"jet1": {
|
||||
"__uuid__": "14cd4280-b3a7-4ac6-858b-63ca8d96ba56"
|
||||
},
|
||||
"jet2": {
|
||||
"__uuid__": "1bd8edbd-4e0b-4241-8c6e-55ca6bdae141"
|
||||
},
|
||||
"jet3": {
|
||||
"__uuid__": "75dcc924-38f8-4a67-8fad-20fab2a34518"
|
||||
},
|
||||
"_id": "1f9O/SPitFcKsCLHV6CCj8"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "ScoreBox",
|
||||
@ -2156,17 +2086,17 @@
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 33
|
||||
"__id__": 32
|
||||
},
|
||||
{
|
||||
"__id__": 35
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 37
|
||||
"__id__": 36
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -2217,14 +2147,14 @@
|
||||
"_name": "Score",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 32
|
||||
"__id__": 31
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 34
|
||||
"__id__": 33
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -2275,7 +2205,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 33
|
||||
"__id__": 32
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -2307,14 +2237,14 @@
|
||||
"_name": "ScoreLabel",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 32
|
||||
"__id__": 31
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 36
|
||||
"__id__": 35
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -2365,7 +2295,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 35
|
||||
"__id__": 34
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -2397,7 +2327,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 32
|
||||
"__id__": 31
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -2435,14 +2365,14 @@
|
||||
"_active": true,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 39
|
||||
},
|
||||
{
|
||||
"__id__": 40
|
||||
},
|
||||
{
|
||||
"__id__": 42
|
||||
"__id__": 41
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -2493,7 +2423,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 38
|
||||
"__id__": 37
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -2525,14 +2455,14 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 38
|
||||
"__id__": 37
|
||||
},
|
||||
"_enabled": true,
|
||||
"duration": 0.1,
|
||||
"zoomScale": 1.2,
|
||||
"clickEvents": [
|
||||
{
|
||||
"__id__": 41
|
||||
"__id__": 40
|
||||
}
|
||||
],
|
||||
"_N$interactable": true,
|
||||
@ -2593,7 +2523,7 @@
|
||||
{
|
||||
"__type__": "cc.ClickEvent",
|
||||
"target": {
|
||||
"__id__": 38
|
||||
"__id__": 37
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "e5d86rh+v5CiLRVDqSVqxtt",
|
||||
@ -2605,12 +2535,12 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 38
|
||||
"__id__": 37
|
||||
},
|
||||
"_enabled": true,
|
||||
"scoreLabel": null,
|
||||
"flashOverlay": {
|
||||
"__id__": 43
|
||||
"__id__": 42
|
||||
},
|
||||
"_id": "51STeOY+lMX6sh3RPWMh9s"
|
||||
},
|
||||
@ -2626,7 +2556,7 @@
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 44
|
||||
"__id__": 43
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -2677,7 +2607,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 43
|
||||
"__id__": 42
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -2715,14 +2645,14 @@
|
||||
"_active": true,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 45
|
||||
},
|
||||
{
|
||||
"__id__": 46
|
||||
},
|
||||
{
|
||||
"__id__": 47
|
||||
},
|
||||
{
|
||||
"__id__": 49
|
||||
"__id__": 48
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -2773,7 +2703,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 45
|
||||
"__id__": 44
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@ -2805,14 +2735,14 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 45
|
||||
"__id__": 44
|
||||
},
|
||||
"_enabled": true,
|
||||
"duration": 0.1,
|
||||
"zoomScale": 1.2,
|
||||
"clickEvents": [
|
||||
{
|
||||
"__id__": 48
|
||||
"__id__": 47
|
||||
}
|
||||
],
|
||||
"_N$interactable": true,
|
||||
@ -2873,19 +2803,19 @@
|
||||
{
|
||||
"__type__": "cc.ClickEvent",
|
||||
"target": {
|
||||
"__id__": 45
|
||||
"__id__": 44
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"handler": "closeGame",
|
||||
"customEventData": ""
|
||||
"handler": "loadScene",
|
||||
"customEventData": "Menu"
|
||||
},
|
||||
{
|
||||
"__type__": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 45
|
||||
"__id__": 44
|
||||
},
|
||||
"_enabled": true,
|
||||
"_id": "38cnqxqqNN3YDl21Wkb0g3"
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 782.0090764356186
|
||||
"z": 782.2999670696379
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -1283,8 +1283,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 50,
|
||||
"height": 50
|
||||
"width": 75,
|
||||
"height": 75
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@ -1293,7 +1293,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -400.979,
|
||||
"x": -385,
|
||||
"y": 495.623,
|
||||
"z": 0
|
||||
},
|
||||
@ -1436,8 +1436,8 @@
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"handler": "backToMenu",
|
||||
"customEventData": ""
|
||||
"handler": "loadScene",
|
||||
"customEventData": "Menu"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Canvas",
|
||||
|
||||
211
assets/Menu.fire
@ -69,19 +69,22 @@
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_level": 1,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 22
|
||||
"__id__": 27
|
||||
},
|
||||
{
|
||||
"__id__": 23
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@ -165,7 +168,7 @@
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 782.0090764356186
|
||||
"z": 781.4336326653525
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -464,8 +467,8 @@
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"handler": "loadLevelsScene",
|
||||
"customEventData": ""
|
||||
"handler": "loadScene",
|
||||
"customEventData": "Level"
|
||||
},
|
||||
{
|
||||
"__type__": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
@ -512,8 +515,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
"width": 150,
|
||||
"height": 150
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@ -522,7 +525,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -380,
|
||||
"x": -360,
|
||||
"y": 500,
|
||||
"z": 0
|
||||
},
|
||||
@ -663,8 +666,8 @@
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"handler": "showSettings",
|
||||
"customEventData": ""
|
||||
"handler": "loadScene",
|
||||
"customEventData": "Settings"
|
||||
},
|
||||
{
|
||||
"__type__": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
@ -862,6 +865,192 @@
|
||||
"_enabled": true,
|
||||
"_id": "51E8zpuHRFWLDHsTbGhIA+"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "store",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 200,
|
||||
"height": 200
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -1,
|
||||
"y": -180,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 0.44,
|
||||
"z": 1
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"groupIndex": 0,
|
||||
"_id": "42YIx2Q65JeY2wwZpRL+KD"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "6a617218-3c12-47bf-a1fa-6432bff4391c"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "9eghOuG3ZJ5LEkvSTze7lr"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Button",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"duration": 0.1,
|
||||
"zoomScale": 1.2,
|
||||
"clickEvents": [
|
||||
{
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_N$interactable": true,
|
||||
"_N$enableAutoGrayEffect": false,
|
||||
"_N$transition": 0,
|
||||
"transition": 0,
|
||||
"_N$normalColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_N$pressedColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 211,
|
||||
"g": 211,
|
||||
"b": 211,
|
||||
"a": 255
|
||||
},
|
||||
"pressedColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 211,
|
||||
"g": 211,
|
||||
"b": 211,
|
||||
"a": 255
|
||||
},
|
||||
"_N$hoverColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"hoverColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_N$disabledColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 124,
|
||||
"g": 124,
|
||||
"b": 124,
|
||||
"a": 255
|
||||
},
|
||||
"_N$normalSprite": null,
|
||||
"_N$pressedSprite": null,
|
||||
"pressedSprite": null,
|
||||
"_N$hoverSprite": null,
|
||||
"hoverSprite": null,
|
||||
"_N$disabledSprite": null,
|
||||
"_N$target": null,
|
||||
"_id": "d262sPCHNCRL0e3yX+sRZ2"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ClickEvent",
|
||||
"target": {
|
||||
"__id__": 22
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"handler": "loadScene",
|
||||
"customEventData": "Store"
|
||||
},
|
||||
{
|
||||
"__type__": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"_id": "91rA30YV5CVojuLNftsAyb"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Canvas",
|
||||
"_name": "",
|
||||
|
||||
@ -165,7 +165,7 @@
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 540.3998519614897
|
||||
"z": 769.896583964366
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -250,7 +250,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 300,
|
||||
"width": 350,
|
||||
"height": 330
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@ -261,7 +261,7 @@
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 174.068,
|
||||
"y": 133.919,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
@ -448,14 +448,14 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -105.207,
|
||||
"x": -1.401,
|
||||
"y": -48.251,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"y": 0.316,
|
||||
"z": 1
|
||||
},
|
||||
"_eulerAngles": {
|
||||
@ -579,8 +579,8 @@
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"handler": "closeGame",
|
||||
"customEventData": ""
|
||||
"handler": "loadScene",
|
||||
"customEventData": "Menu"
|
||||
},
|
||||
{
|
||||
"__type__": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
|
||||
|
||||
import GameData from "./GameData";
|
||||
import SoundManager from "./SoundsManager";
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ -24,6 +25,7 @@ export default class NewClass extends cc.Component {
|
||||
|
||||
onLoad () {
|
||||
this.label.string = GameData.instance.getScore().toString();
|
||||
SoundManager.instance.playMusic('Judgement', true);
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
|
||||
@ -21,19 +21,31 @@ export default class GameData extends cc.Component {
|
||||
public soundEnabled: boolean = true;
|
||||
public musicEnabled: boolean = true;
|
||||
|
||||
public selectedShip: number = 1;
|
||||
|
||||
public static get instance(): GameData {
|
||||
if (!this._instance) {
|
||||
this._instance = new GameData();
|
||||
this._instance.soundEnabled = cc.sys.localStorage.getItem('soundEnabled') !== 'false';
|
||||
this._instance.musicEnabled = cc.sys.localStorage.getItem('musicEnabled') !== 'false';
|
||||
this._instance.selectedShip = Number(cc.sys.localStorage.getItem('selectedShip')) || 1;
|
||||
}
|
||||
return this._instance;
|
||||
}
|
||||
|
||||
public setSelectedShip(ship: number) {
|
||||
this.selectedShip = ship;
|
||||
cc.sys.localStorage.setItem('selectedShip', ship.toString());
|
||||
}
|
||||
|
||||
public setSoundEnabled(enabled: boolean) {
|
||||
this.soundEnabled = enabled;
|
||||
cc.sys.localStorage.setItem('soundEnabled', enabled.toString());
|
||||
}
|
||||
|
||||
public setMusicEnabled(enabled: boolean) {
|
||||
this.musicEnabled = enabled;
|
||||
cc.sys.localStorage.setItem('musicEnabled', enabled.toString());
|
||||
}
|
||||
|
||||
public setScore(score: number) {
|
||||
@ -66,6 +78,4 @@ export default class GameData extends cc.Component {
|
||||
public get enemyMoveTime(): number {
|
||||
return this.levelConfig[this.selectedLevel].playerSpeed;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
54
assets/Scripts/Store.ts
Normal file
@ -0,0 +1,54 @@
|
||||
// Learn TypeScript:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/typescript.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
|
||||
// Learn Attribute:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
|
||||
// Learn life-cycle callbacks:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
import GameData from "./GameData";
|
||||
|
||||
@ccclass
|
||||
export default class NewClass extends cc.Component {
|
||||
|
||||
@property(cc.Node)
|
||||
ship1Selector: cc.Node = null;
|
||||
|
||||
@property(cc.Node)
|
||||
ship2Selector: cc.Node = null;
|
||||
|
||||
@property(cc.Node)
|
||||
ship3Selector: cc.Node = null;
|
||||
|
||||
@property(cc.SpriteFrame)
|
||||
selectFrame: cc.SpriteFrame = null;
|
||||
|
||||
@property(cc.SpriteFrame)
|
||||
selectedFrame: cc.SpriteFrame = null;
|
||||
|
||||
onLoad () {
|
||||
if(GameData.instance.selectedShip === 1) {
|
||||
this.ship1Selector.getComponent(cc.Sprite).spriteFrame = this.selectedFrame;
|
||||
} else if(GameData.instance.selectedShip === 2) {
|
||||
this.ship2Selector.getComponent(cc.Sprite).spriteFrame = this.selectedFrame;
|
||||
} else if(GameData.instance.selectedShip === 3) {
|
||||
this.ship3Selector.getComponent(cc.Sprite).spriteFrame = this.selectedFrame;
|
||||
}
|
||||
}
|
||||
|
||||
update (dt) {
|
||||
this.ship1Selector.getComponent(cc.Sprite).spriteFrame = this.selectFrame;
|
||||
this.ship2Selector.getComponent(cc.Sprite).spriteFrame = this.selectFrame;
|
||||
this.ship3Selector.getComponent(cc.Sprite).spriteFrame = this.selectFrame;
|
||||
if(GameData.instance.selectedShip === 1) {
|
||||
this.ship1Selector.getComponent(cc.Sprite).spriteFrame = this.selectedFrame;
|
||||
} else if(GameData.instance.selectedShip === 2) {
|
||||
this.ship2Selector.getComponent(cc.Sprite).spriteFrame = this.selectedFrame;
|
||||
} else if(GameData.instance.selectedShip === 3) {
|
||||
this.ship3Selector.getComponent(cc.Sprite).spriteFrame = this.selectedFrame;
|
||||
}
|
||||
}
|
||||
}
|
||||
9
assets/Scripts/Store.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "d15cde6d-e9ed-4f7d-805b-966a3dbcf4d8",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
||||
23
assets/Scripts/SwitchPlane.ts
Normal file
@ -0,0 +1,23 @@
|
||||
// Learn TypeScript:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/typescript.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
|
||||
// Learn Attribute:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
|
||||
// Learn life-cycle callbacks:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
|
||||
|
||||
import GameData from "./GameData";
|
||||
import SoundManager from "./SoundsManager";
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class NewClass extends cc.Component {
|
||||
|
||||
switchPlane(event, customData) {
|
||||
SoundManager.instance.playEffect('click');
|
||||
GameData.instance.setSelectedShip(Number(customData));
|
||||
}
|
||||
}
|
||||
9
assets/Scripts/SwitchPlane.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "b56649ef-1bc0-457f-b4d4-e020a7dd0729",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
||||
@ -25,13 +25,6 @@ export default class MenuScreen extends cc.Component {
|
||||
}
|
||||
}
|
||||
|
||||
loadLevelsScene() {
|
||||
SoundManager.instance.playEffect('click');
|
||||
cc.director.preloadScene('Level', () => {
|
||||
cc.director.loadScene('Level');
|
||||
});
|
||||
}
|
||||
|
||||
loadGameScene(event, customData) {
|
||||
SoundManager.instance.playEffect('click');
|
||||
const selectedLevel = Number(customData);
|
||||
@ -42,11 +35,14 @@ export default class MenuScreen extends cc.Component {
|
||||
});
|
||||
}
|
||||
|
||||
closeGame() {
|
||||
GameData.instance.setScore(0);
|
||||
loadScene(event, sceneName) {
|
||||
SoundManager.instance.playEffect('click');
|
||||
SoundManager.instance.stopMusic();
|
||||
cc.director.loadScene('Menu');
|
||||
if(sceneName === 'Menu') {
|
||||
SoundManager.instance.stopMusic();
|
||||
}
|
||||
cc.director.preloadScene(sceneName, () => {
|
||||
cc.director.loadScene(sceneName);
|
||||
});
|
||||
}
|
||||
|
||||
killGame() {
|
||||
@ -57,16 +53,4 @@ export default class MenuScreen extends cc.Component {
|
||||
cc.game.end();
|
||||
}, 0.25);
|
||||
}
|
||||
|
||||
backToMenu() {
|
||||
SoundManager.instance.playEffect('click');
|
||||
cc.director.loadScene('Menu');
|
||||
}
|
||||
|
||||
showSettings() {
|
||||
SoundManager.instance.playEffect('click');
|
||||
cc.director.preloadScene('Settings', () => {
|
||||
cc.director.loadScene('Settings');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
40
assets/Scripts/UsedJet.ts
Normal file
@ -0,0 +1,40 @@
|
||||
// Learn TypeScript:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/typescript.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
|
||||
// Learn Attribute:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
|
||||
// Learn life-cycle callbacks:
|
||||
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
|
||||
|
||||
import GameData from "./GameData";
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class NewClass extends cc.Component {
|
||||
|
||||
@property(cc.SpriteFrame)
|
||||
jet1: cc.SpriteFrame = null;
|
||||
|
||||
@property(cc.SpriteFrame)
|
||||
jet2: cc.SpriteFrame = null;
|
||||
|
||||
@property(cc.SpriteFrame)
|
||||
jet3: cc.SpriteFrame = null;
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
if(GameData.instance.selectedShip === 1) {
|
||||
this.node.getComponent(cc.Sprite).spriteFrame = this.jet1;
|
||||
} else if(GameData.instance.selectedShip === 2) {
|
||||
this.node.getComponent(cc.Sprite).spriteFrame = this.jet2;
|
||||
} else if(GameData.instance.selectedShip === 3) {
|
||||
this.node.getComponent(cc.Sprite).spriteFrame = this.jet3;
|
||||
}
|
||||
}
|
||||
}
|
||||
9
assets/Scripts/UsedJet.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "ddcfe31b-176f-4ff0-b47e-6262c199084b",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
||||
@ -165,7 +165,7 @@
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 782.0090764356186
|
||||
"z": 769.896583964366
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -460,8 +460,8 @@
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
"handler": "closeGame",
|
||||
"customEventData": ""
|
||||
"handler": "loadScene",
|
||||
"customEventData": "Menu"
|
||||
},
|
||||
{
|
||||
"__type__": "3a2abJhRaJFyrM9SBg5rWtB",
|
||||
|
||||
1406
assets/Store.fire
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@ -9,7 +9,7 @@
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"alienship1": {
|
||||
"player1": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "14cd4280-b3a7-4ac6-858b-63ca8d96ba56",
|
||||
"rawTextureUuid": "e8932f3f-2b74-4bb6-8b86-cdb96e6ae25f",
|
||||
BIN
assets/ships/player2.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
34
assets/ships/player2.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "6edf1a67-ee2f-488a-8ad0-8aa805003417",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"player2": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "1bd8edbd-4e0b-4241-8c6e-55ca6bdae141",
|
||||
"rawTextureUuid": "6edf1a67-ee2f-488a-8ad0-8aa805003417",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 2.5,
|
||||
"offsetY": 4,
|
||||
"trimX": 5,
|
||||
"trimY": 3,
|
||||
"width": 159,
|
||||
"height": 150,
|
||||
"rawWidth": 164,
|
||||
"rawHeight": 164,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
assets/ships/player3.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
34
assets/ships/player3.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "0b963317-2ef4-42f4-8bed-713ae721dfbd",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"player3": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "75dcc924-38f8-4a67-8fad-20fab2a34518",
|
||||
"rawTextureUuid": "0b963317-2ef4-42f4-8bed-713ae721dfbd",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 6,
|
||||
"offsetY": 3.5,
|
||||
"trimX": 33,
|
||||
"trimY": 3,
|
||||
"width": 192,
|
||||
"height": 151,
|
||||
"rawWidth": 246,
|
||||
"rawHeight": 164,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
||||