Commit 4aec9032 by william

Merge branch 'flirt-william' into 'master'

feat: init Game.js See merge request !1
parents 5496d095 a456cd7e
......@@ -10,5 +10,4 @@ local/*
build/
*.d.ts
temp/
*.meta
*.fnt
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "0857d5e1-e5b1-48e2-80d6-5059f694276a",
"isGroup": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "55d110b9-bab6-4d9d-9416-03e46904fa35",
"downloadMode": 0,
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_rawFiles": null,
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "50ab4eb6-59df-41ec-9f69-d2b092ec76cc",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0,
"autoReleaseAssets": false
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 9
},
{
"__id__": 14
},
{
"__id__": 16
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 18
},
{
"__id__": 19
}
],
"_prefab": null,
"_id": "e7487n0tpCuZ5mBikHrdpL",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 375,
"height": 750
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 187.5,
"y": 375
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "backgroud",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_id": "6abXX1XJxB/5n4MrVrKGiT",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 247,
"g": 242,
"b": 224,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 450,
"height": 850
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "logo",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": null,
"_id": "d6B3OYIbdA0oKVBARBzlsD",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 332,
"height": 110
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 0.6,
"_scaleY": 0.6,
"_position": {
"__type__": "cc.Vec2",
"x": 2,
"y": 182
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "26869b11-f810-4bbe-994e-793228a11892"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "subtitle",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 8
}
],
"_prefab": null,
"_id": "71kSDoZslK+qnciDr+46zc",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 120
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 2,
"y": 75
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_useOriginalSize": false,
"_actualFontSize": 20,
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_N$string": "点击屏幕开始撩妹\n在下课前快速撩妹\n避免被老师发现",
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0
},
{
"__type__": "cc.Node",
"_name": "start_btn",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 10
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 12
},
{
"__id__": 13
}
],
"_prefab": null,
"_id": "76fnYIsz9C3IspRGkUQPm6",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 180,
"height": 184
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 0.6,
"_scaleY": 0.6,
"_position": {
"__type__": "cc.Vec2",
"x": -2,
"y": -199
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "Start",
"_objFlags": 0,
"_parent": {
"__id__": 9
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 11
}
],
"_prefab": null,
"_id": "f6tbdlSzFHwKHIkKiKfGBl",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "729abdON3JFXqpKBchOOYfX",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"isOpenGame": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "39ffe8bc-c233-4562-94b9-3c2f2c82b452"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "729abdON3JFXqpKBchOOYfX",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"isOpenGame": false
},
{
"__type__": "cc.Node",
"_name": "classroom",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": false,
"_components": [
{
"__id__": 15
}
],
"_prefab": null,
"_id": "09EzHWUxdBmJlkWjuuPfMN",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 375,
"height": 600
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": -75
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "1b29ad23-8777-436b-a7aa-5c7869ce1389"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "hand",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 17
}
],
"_prefab": null,
"_id": "c91SgtpVVI44d283YT+CO9",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 302,
"height": 378
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 0.4,
"_scaleY": 0.4,
"_position": {
"__type__": "cc.Vec2",
"x": 104,
"y": -340
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "b5b26273-de9d-42a1-94c5-7b4839b6e1cf"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 375,
"height": 750
},
"_fitWidth": false,
"_fitHeight": true
},
{
"__type__": "e4c9b01WKRDtYbVX2Ed1Nfl",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"score": 0,
"time": 60,
"leftLife": 3,
"swivelAnimationTime": 0.2,
"flirtAnimationTime": 0.2,
"gameState": "waiting",
"logo": {
"__id__": 5
},
"subtitle": {
"__id__": 7
},
"start_btn": {
"__id__": 9
},
"classroom": {
"__id__": 14
},
"hand": {
"__id__": 16
}
}
]
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "50ab4eb6-59df-41ec-9f69-d2b092ec76cc",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "d6ff10bc-4d58-4d63-8af4-19151a90da2c",
"isGroup": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "74666af9-3b83-4c79-bb74-e64662a7a91c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"classroom": {
"ver": "1.0.3",
"uuid": "1b29ad23-8777-436b-a7aa-5c7869ce1389",
"rawTextureUuid": "74666af9-3b83-4c79-bb74-e64662a7a91c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 750,
"height": 1052,
"rawWidth": 750,
"rawHeight": 1052,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "077d7019-5b69-47fb-b32c-cdef03159619",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"failed": {
"ver": "1.0.3",
"uuid": "e46cef27-8d95-479a-a21f-2c6d3563302a",
"rawTextureUuid": "077d7019-5b69-47fb-b32c-cdef03159619",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1,
"trimX": 0,
"trimY": 3,
"width": 750,
"height": 462,
"rawWidth": 750,
"rawHeight": 466,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "52da3d02-b26d-4a5d-889c-401201634da8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"hand": {
"ver": "1.0.3",
"uuid": "b5b26273-de9d-42a1-94c5-7b4839b6e1cf",
"rawTextureUuid": "52da3d02-b26d-4a5d-889c-401201634da8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 2,
"offsetY": 0,
"trimX": 4,
"trimY": 0,
"width": 302,
"height": 378,
"rawWidth": 306,
"rawHeight": 378,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "d3b617e9-e315-42a7-aaa4-7f1b67e9df35",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"logo": {
"ver": "1.0.3",
"uuid": "26869b11-f810-4bbe-994e-793228a11892",
"rawTextureUuid": "d3b617e9-e315-42a7-aaa4-7f1b67e9df35",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 332,
"height": 110,
"rawWidth": 332,
"rawHeight": 110,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "d6d5a5b2-191a-4c6e-8468-91b458db29ab",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"pic": {
"ver": "1.0.3",
"uuid": "14ce6955-7406-477d-b8bb-f98b662fd140",
"rawTextureUuid": "d6d5a5b2-191a-4c6e-8468-91b458db29ab",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 600,
"height": 400,
"rawWidth": 600,
"rawHeight": 400,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "80c7b1e7-1df7-4fc7-94e5-c530738420ed",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"star": {
"ver": "1.0.3",
"uuid": "8f8ba54f-70f6-4ca1-86d9-dddbd85e769d",
"rawTextureUuid": "80c7b1e7-1df7-4fc7-94e5-c530738420ed",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1.5,
"trimX": 0,
"trimY": 4,
"width": 60,
"height": 66,
"rawWidth": 60,
"rawHeight": 71,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "ac77b207-d6ae-4829-acdc-352b6e8a2153",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"start_btn": {
"ver": "1.0.3",
"uuid": "39ffe8bc-c233-4562-94b9-3c2f2c82b452",
"rawTextureUuid": "ac77b207-d6ae-4829-acdc-352b6e8a2153",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1,
"offsetY": -1,
"trimX": 8,
"trimY": 8,
"width": 180,
"height": 184,
"rawWidth": 198,
"rawHeight": 198,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.1.0",
"uuid": "977cfe9b-21c7-498e-b060-541800511a8b",
"textureUuid": "f3779477-7dbf-4751-902f-985973720152",
"fontSize": 36,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.0",
"uuid": "f3779477-7dbf-4751-902f-985973720152",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"mikado_outline_shadow": {
"ver": "1.0.3",
"uuid": "492c193b-97a4-42f3-b7a9-6a6e4cecc0e9",
"rawTextureUuid": "f3779477-7dbf-4751-902f-985973720152",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -4.5,
"offsetY": 9,
"trimX": 3,
"trimY": 3,
"width": 497,
"height": 232,
"rawWidth": 512,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "e7120552-906b-445a-9762-931fc50bf736",
"subMetas": {}
}
\ No newline at end of file
// Learn cc.Class:
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html
// - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/class.html
// Learn Attribute:
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
// - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
// - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/life-cycle-callbacks.html
cc.Class({
extends: cc.Component,
/** 游戏的全局变量 */
properties: {
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
// // to a node for the first time
// type: cc.SpriteFrame, // optional, default is typeof default
// serializable: true, // optional, default is true
// },
// bar: {
// get () {
// return this._bar;
// },
// set (value) {
// this._bar = value;
// }
// },
/** 游戏节点的注册 */
// logo节点
logo: {
default: null,
type: cc.Node,
},
// subtitle节点
subtitle: {
default: null,
type: cc.Node,
},
// btn_start节点
start_btn: {
default: null,
type: cc.Node,
},
// classroom节点
classroom: {
default: null,
type: cc.Node,
},
// hand节点
hand: {
default: null,
type: cc.Node,
},
},
onLoad: function () {
// 初始化游戏数据
this.score = 0; // 分数
this.timer = 60; // 每一盘游戏的总时间
this.leftLife = 3; // 剩余的命条数
this.gameState = "waitting"; // 游戏的状态 waiting(待开始) action(游戏中) stop(被抓) over(分数总结)
this.swivelAnimationTime = 0.5; //转头动画时间 (单向)
this.flirtAnimationTime = 0.5; //摸的动画时间(单向)
// 奖Game组件的实例传入开始按钮
var startBtn = this.node.getChildByName("start_btn");
startBtn.getComponent('Start').game = this;
},
// 添加分数
gainScore: function() {
this.score += 1;
},
// 游戏帧循环
update: function(dt) {
},
// LIFE-CYCLE CALLBACKS:
// 游戏开始
startGame: function() {
// onLoad () {},
},
start () {
// 游戏暂停
stopGame: function() {
},
// update (dt) {},
// 游戏结束
gameOver: function() {
},
});
{
"ver": "1.0.5",
"uuid": "e4c9bd35-58a4-43b5-86d5-5f611dd4d7e5",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
cc.Class({
extends: cc.Component,
properties: {
isOpenGame: false
},
setTouchBtnListener: function () {
var self = this;
self.node.on(cc.Node.EventType.MOUSE_DOWN, function (event) {
self.game.classroom.active = true
})
},
onLoad: function () {
// 初始化跳跃动作
this.setTouchBtnListener()
},
});
{
"ver": "1.0.5",
"uuid": "729ab74e-3772-455e-aa4a-05c84e3987d7",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment