diff --git a/CIGA_2018/assets/module/audio.js b/CIGA_2018/assets/module/audio.js new file mode 100644 index 0000000..5715550 --- /dev/null +++ b/CIGA_2018/assets/module/audio.js @@ -0,0 +1,53 @@ +// 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; + // } + // }, + arrClip: [cc.AudioClip] + }, + + // LIFE-CYCLE CALLBACKS: + + onLoad () { + wsat.audio = this; + }, + + start () { + + }, + + play(index, loop, volume){ + this.current = cc.audioEngine.play(this.arrClip[index], loop, volume); + }, + + stop(){ + cc.audioEngine.stop(this.current); + }, + + // update (dt) {}, +}); + diff --git a/CIGA_2018/assets/module/audio.js.meta b/CIGA_2018/assets/module/audio.js.meta new file mode 100644 index 0000000..0249914 --- /dev/null +++ b/CIGA_2018/assets/module/audio.js.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.5", + "uuid": "8cfa7f26-3730-4386-83b7-adb7bcaa5343", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/CIGA_2018/assets/module/net.js b/CIGA_2018/assets/module/net.js index 7552684..1ceb488 100644 --- a/CIGA_2018/assets/module/net.js +++ b/CIGA_2018/assets/module/net.js @@ -3,7 +3,7 @@ var net = {}; module.exports = net; //服务器地址 -const serverAddress = 'ws://localhost:8003' +const serverAddress = 'ws://47.92.101.120:8003' //服务器连接超时时间 const outTime = 1000; diff --git a/CIGA_2018/assets/resource/animation/loop.anim b/CIGA_2018/assets/resource/animation/loop.anim new file mode 100644 index 0000000..ddf7e32 --- /dev/null +++ b/CIGA_2018/assets/resource/animation/loop.anim @@ -0,0 +1,75 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "loop", + "_objFlags": 0, + "_rawFiles": null, + "_duration": 0.83, + "sample": 60, + "speed": 0.2, + "wrapMode": 2, + "curveData": { + "props": { + "position": [ + { + "frame": 0, + "value": [ + -490, + 138 + ] + }, + { + "frame": 0.16666666666666666, + "value": [ + -384, + 104 + ] + }, + { + "frame": 0.3333333333333333, + "value": [ + -297, + 43 + ] + }, + { + "frame": 0.5, + "value": [ + -210, + -50 + ] + }, + { + "frame": 0.6666666666666666, + "value": [ + -66, + -118 + ] + }, + { + "frame": 0.75, + "value": [ + 44.068650000060444, + -176.21408600003195 + ] + }, + { + "frame": 0.8333333333333334, + "value": [ + 159, + -237 + ] + } + ], + "scaleX": [ + { + "frame": 0, + "value": -0.5 + } + ] + }, + "comps": { + "cc.Sprite": {} + } + }, + "events": [] +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/animation/loop.anim.meta b/CIGA_2018/assets/resource/animation/loop.anim.meta new file mode 100644 index 0000000..5ce3745 --- /dev/null +++ b/CIGA_2018/assets/resource/animation/loop.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "1.0.0", + "uuid": "f0322748-84f4-4b0c-a2fc-2a09245fd56a", + "subMetas": {} +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/animation/loop_2.anim b/CIGA_2018/assets/resource/animation/loop_2.anim new file mode 100644 index 0000000..8d7958e --- /dev/null +++ b/CIGA_2018/assets/resource/animation/loop_2.anim @@ -0,0 +1,43 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "loop_2", + "_objFlags": 0, + "_rawFiles": null, + "_duration": 0.06666666666666667, + "sample": 60, + "speed": 0.2, + "wrapMode": 2, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "3a1ed85b-1ec9-4235-b171-f301dee1b757" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "c4a58ea1-696a-4d3b-bd62-c6358a321951" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "2b21f22f-f539-4c4f-9848-c78d9b906f2d" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "de318781-924b-426c-ba1e-2b98091e885b" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/animation/loop_2.anim.meta b/CIGA_2018/assets/resource/animation/loop_2.anim.meta new file mode 100644 index 0000000..9459fab --- /dev/null +++ b/CIGA_2018/assets/resource/animation/loop_2.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "1.0.0", + "uuid": "a1245423-1078-4b7d-82fb-3c39701634c2", + "subMetas": {} +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/audio/bg.wav b/CIGA_2018/assets/resource/audio/bg.wav new file mode 100644 index 0000000..b2ee2dd Binary files /dev/null and b/CIGA_2018/assets/resource/audio/bg.wav differ diff --git a/CIGA_2018/assets/resource/audio/bg.wav.meta b/CIGA_2018/assets/resource/audio/bg.wav.meta new file mode 100644 index 0000000..96c7564 --- /dev/null +++ b/CIGA_2018/assets/resource/audio/bg.wav.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.1", + "uuid": "f519f0e7-561e-46e4-be3c-52106e1ff7f9", + "downloadMode": 0, + "subMetas": {} +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/audio/eat.mp3 b/CIGA_2018/assets/resource/audio/eat.mp3 new file mode 100644 index 0000000..0dd23cf Binary files /dev/null and b/CIGA_2018/assets/resource/audio/eat.mp3 differ diff --git a/CIGA_2018/assets/resource/audio/eat.mp3.meta b/CIGA_2018/assets/resource/audio/eat.mp3.meta new file mode 100644 index 0000000..646936b --- /dev/null +++ b/CIGA_2018/assets/resource/audio/eat.mp3.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.1", + "uuid": "a2e2db48-870c-4ac6-94f5-fc68f50c4aa4", + "downloadMode": 0, + "subMetas": {} +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/audio/over.mp3 b/CIGA_2018/assets/resource/audio/over.mp3 new file mode 100644 index 0000000..82d62bd Binary files /dev/null and b/CIGA_2018/assets/resource/audio/over.mp3 differ diff --git a/CIGA_2018/assets/resource/audio/over.mp3.meta b/CIGA_2018/assets/resource/audio/over.mp3.meta new file mode 100644 index 0000000..edd7d40 --- /dev/null +++ b/CIGA_2018/assets/resource/audio/over.mp3.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.1", + "uuid": "05acaf81-d2be-42bf-a2df-1e22fdba1818", + "downloadMode": 0, + "subMetas": {} +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/audio/start.mp3 b/CIGA_2018/assets/resource/audio/start.mp3 new file mode 100644 index 0000000..77380be Binary files /dev/null and b/CIGA_2018/assets/resource/audio/start.mp3 differ diff --git a/CIGA_2018/assets/resource/audio/start.mp3.meta b/CIGA_2018/assets/resource/audio/start.mp3.meta new file mode 100644 index 0000000..beef947 --- /dev/null +++ b/CIGA_2018/assets/resource/audio/start.mp3.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.1", + "uuid": "f52e4420-691b-4899-b431-6c5cac24c9b7", + "downloadMode": 0, + "subMetas": {} +} \ No newline at end of file diff --git a/CIGA_2018/assets/resource/scene/game.fire b/CIGA_2018/assets/resource/scene/game.fire index 9ffa09f..c0082ee 100644 --- a/CIGA_2018/assets/resource/scene/game.fire +++ b/CIGA_2018/assets/resource/scene/game.fire @@ -69,16 +69,19 @@ }, { "__id__": 317 + }, + { + "__id__": 319 } ], "_tag": -1, "_active": true, "_components": [ { - "__id__": 319 + "__id__": 321 }, { - "__id__": 320 + "__id__": 322 } ], "_prefab": null, @@ -11331,6 +11334,81 @@ "_dstBlendFactor": 771, "_atlas": null }, + { + "__type__": "cc.Node", + "_name": "audio", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_tag": -1, + "_active": true, + "_components": [ + { + "__id__": 320 + } + ], + "_prefab": null, + "_id": "deRPSsBqtCYo4h8fnTmTUn", + "_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": -960, + "y": -540 + }, + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_opacityModifyRGB": false, + "groupIndex": 0 + }, + { + "__type__": "8cfa78mNzBDhoO3rbe8qlND", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 319 + }, + "_enabled": true, + "arrClip": [ + { + "__uuid__": "f519f0e7-561e-46e4-be3c-52106e1ff7f9" + }, + { + "__uuid__": "f52e4420-691b-4899-b431-6c5cac24c9b7" + }, + { + "__uuid__": "a2e2db48-870c-4ac6-94f5-fc68f50c4aa4" + }, + { + "__uuid__": "05acaf81-d2be-42bf-a2df-1e22fdba1818" + } + ] + }, { "__type__": "cc.Canvas", "_name": "", diff --git a/CIGA_2018/assets/resource/scene/start.fire b/CIGA_2018/assets/resource/scene/start.fire index 31ac85a..7f09f2a 100644 --- a/CIGA_2018/assets/resource/scene/start.fire +++ b/CIGA_2018/assets/resource/scene/start.fire @@ -59,26 +59,23 @@ "__id__": 3 }, { - "__id__": 5 - }, - { - "__id__": 8 + "__id__": 15 }, { - "__id__": 29 + "__id__": 18 }, { - "__id__": 31 + "__id__": 39 } ], "_tag": -1, "_active": true, "_components": [ { - "__id__": 33 + "__id__": 41 }, { - "__id__": 34 + "__id__": 42 } ], "_prefab": null, @@ -125,12 +122,22 @@ "_parent": { "__id__": 2 }, - "_children": [], + "_children": [ + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 12 + } + ], "_tag": -1, "_active": true, "_components": [ { - "__id__": 4 + "__id__": 14 } ], "_prefab": null, @@ -170,6 +177,362 @@ "_opacityModifyRGB": false, "groupIndex": 0 }, + { + "__type__": "cc.Node", + "_name": "title", + "_objFlags": 0, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_tag": -1, + "_active": true, + "_components": [ + { + "__id__": 5 + } + ], + "_prefab": null, + "_id": "1cCAg2gEdK15KHYqA248P7", + "_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": 1619, + "height": 158 + }, + "_rotationX": 0, + "_rotationY": 0, + "_scaleX": 1, + "_scaleY": 1, + "_position": { + "__type__": "cc.Vec2", + "x": 0, + "y": 428 + }, + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_opacityModifyRGB": false, + "groupIndex": 0 + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "_spriteFrame": { + "__uuid__": "ca2ad616-1e9c-4f97-b487-4836652e1c43" + }, + "_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.Node", + "_name": "player", + "_objFlags": 0, + "_parent": { + "__id__": 3 + }, + "_children": [ + { + "__id__": 7 + } + ], + "_tag": -1, + "_active": true, + "_components": [ + { + "__id__": 10 + }, + { + "__id__": 11 + } + ], + "_prefab": null, + "_id": "be5wPXhDBMhZTO/NMJZesN", + "_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.2 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 297, + "height": 394 + }, + "_rotationX": 0, + "_rotationY": 0, + "_scaleX": 0.6, + "_scaleY": 0.6, + "_position": { + "__type__": "cc.Vec2", + "x": 193, + "y": -252 + }, + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_opacityModifyRGB": false, + "groupIndex": 2 + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 6 + }, + "_children": [], + "_tag": -1, + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "_prefab": null, + "_id": "8722Qy5dNL76E0iGFbRZDK", + "_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.2 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_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__": 7 + }, + "_enabled": true, + "_spriteFrame": { + "__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061" + }, + "_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.Animation", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_defaultClip": { + "__uuid__": "a1245423-1078-4b7d-82fb-3c39701634c2" + }, + "_clips": [ + { + "__uuid__": "a1245423-1078-4b7d-82fb-3c39701634c2" + } + ], + "playOnLoad": true + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_spriteFrame": null, + "_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.Animation", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_defaultClip": { + "__uuid__": "f0322748-84f4-4b0c-a2fc-2a09245fd56a" + }, + "_clips": [ + { + "__uuid__": "f0322748-84f4-4b0c-a2fc-2a09245fd56a" + } + ], + "playOnLoad": true + }, + { + "__type__": "cc.Node", + "_name": "mountain", + "_objFlags": 0, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_tag": -1, + "_active": true, + "_components": [ + { + "__id__": 13 + } + ], + "_prefab": null, + "_id": "b9mnjtGZREo6NOn6v/e/ZO", + "_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": 711, + "height": 660 + }, + "_rotationX": 0, + "_rotationY": 0, + "_scaleX": 1, + "_scaleY": 1, + "_position": { + "__type__": "cc.Vec2", + "x": 379, + "y": -151 + }, + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_opacityModifyRGB": false, + "groupIndex": 0 + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "_spriteFrame": { + "__uuid__": "1c17eb09-fc8e-4e76-840b-ac5758b0a286" + }, + "_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.Sprite", "_name": "", @@ -208,10 +571,10 @@ "_active": true, "_components": [ { - "__id__": 6 + "__id__": 16 }, { - "__id__": 7 + "__id__": 17 } ], "_prefab": null, @@ -241,8 +604,8 @@ "_scaleY": 2.27, "_position": { "__type__": "cc.Vec2", - "x": 822, - "y": 400 + "x": 836, + "y": -427 }, "_skewX": 0, "_skewY": 0, @@ -256,7 +619,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 5 + "__id__": 15 }, "_enabled": true, "_spriteFrame": { @@ -282,7 +645,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 5 + "__id__": 15 }, "_enabled": true, "transition": 1, @@ -336,7 +699,7 @@ "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" }, "_N$target": { - "__id__": 5 + "__id__": 15 } }, { @@ -348,17 +711,17 @@ }, "_children": [ { - "__id__": 9 + "__id__": 19 } ], "_tag": -1, "_active": true, "_components": [ { - "__id__": 26 + "__id__": 36 }, { - "__id__": 27 + "__id__": 37 } ], "_prefab": null, @@ -403,32 +766,32 @@ "_name": "All", "_objFlags": 0, "_parent": { - "__id__": 8 + "__id__": 18 }, "_children": [ { - "__id__": 10 + "__id__": 20 }, { - "__id__": 12 + "__id__": 22 }, { - "__id__": 14 + "__id__": 24 }, { - "__id__": 16 + "__id__": 26 }, { - "__id__": 18 + "__id__": 28 }, { - "__id__": 20 + "__id__": 30 }, { - "__id__": 22 + "__id__": 32 }, { - "__id__": 24 + "__id__": 34 } ], "_tag": -1, @@ -476,14 +839,14 @@ "_name": "1", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 11 + "__id__": 21 } ], "_prefab": null, @@ -528,7 +891,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 10 + "__id__": 20 }, "_enabled": true, "_spriteFrame": { @@ -554,14 +917,14 @@ "_name": "2", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 13 + "__id__": 23 } ], "_prefab": null, @@ -606,7 +969,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 12 + "__id__": 22 }, "_enabled": true, "_spriteFrame": { @@ -632,14 +995,14 @@ "_name": "3", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 15 + "__id__": 25 } ], "_prefab": null, @@ -684,7 +1047,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 14 + "__id__": 24 }, "_enabled": true, "_spriteFrame": { @@ -710,14 +1073,14 @@ "_name": "3`1", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 17 + "__id__": 27 } ], "_prefab": null, @@ -762,7 +1125,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 26 }, "_enabled": true, "_spriteFrame": { @@ -788,14 +1151,14 @@ "_name": "4", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 19 + "__id__": 29 } ], "_prefab": null, @@ -840,7 +1203,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 18 + "__id__": 28 }, "_enabled": true, "_spriteFrame": { @@ -866,14 +1229,14 @@ "_name": "5", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 21 + "__id__": 31 } ], "_prefab": null, @@ -918,7 +1281,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 20 + "__id__": 30 }, "_enabled": true, "_spriteFrame": { @@ -944,14 +1307,14 @@ "_name": "6", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 23 + "__id__": 33 } ], "_prefab": null, @@ -996,7 +1359,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 22 + "__id__": 32 }, "_enabled": true, "_spriteFrame": { @@ -1022,14 +1385,14 @@ "_name": "6`1", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [], "_tag": -1, "_active": true, "_components": [ { - "__id__": 25 + "__id__": 35 } ], "_prefab": null, @@ -1074,7 +1437,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 24 + "__id__": 34 }, "_enabled": true, "_spriteFrame": { @@ -1100,7 +1463,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 8 + "__id__": 18 }, "_enabled": true, "_defaultClip": { @@ -1118,7 +1481,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 8 + "__id__": 18 }, "_enabled": true, "transition": 0, @@ -1140,7 +1503,7 @@ "zoomScale": 1.2, "clickEvents": [ { - "__id__": 28 + "__id__": 38 } ], "_N$interactable": true, @@ -1166,7 +1529,7 @@ "hoverSprite": null, "_N$disabledSprite": null, "_N$target": { - "__id__": 8 + "__id__": 18 } }, { @@ -1180,7 +1543,7 @@ }, { "__type__": "cc.Node", - "_name": "bg", + "_name": "audio", "_objFlags": 0, "_parent": { "__id__": 2 @@ -1190,11 +1553,11 @@ "_active": true, "_components": [ { - "__id__": 30 + "__id__": 40 } ], "_prefab": null, - "_id": "6c0jBABypJPrzgpo43fnvA", + "_id": "bdrGTGUPpJt5uS5eUdSDWF", "_opacity": 255, "_color": { "__type__": "cc.Color", @@ -1211,8 +1574,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 40, - "height": 36 + "width": 0, + "height": 0 }, "_rotationX": 0, "_rotationY": 0, @@ -1231,108 +1594,27 @@ "groupIndex": 0 }, { - "__type__": "cc.Sprite", + "__type__": "8cfa78mNzBDhoO3rbe8qlND", "_name": "", "_objFlags": 0, "node": { - "__id__": 29 + "__id__": 39 }, "_enabled": true, - "_spriteFrame": { - "__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061" - }, - "_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.Node", - "_name": "fg", - "_objFlags": 0, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_tag": -1, - "_active": true, - "_components": [ + "arrClip": [ { - "__id__": 32 + "__uuid__": "f519f0e7-561e-46e4-be3c-52106e1ff7f9" + }, + { + "__uuid__": "f52e4420-691b-4899-b431-6c5cac24c9b7" + }, + { + "__uuid__": "a2e2db48-870c-4ac6-94f5-fc68f50c4aa4" + }, + { + "__uuid__": "05acaf81-d2be-42bf-a2df-1e22fdba1818" } - ], - "_prefab": null, - "_id": "f54BwOcn9P/4CAV7XQCVQS", - "_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": 40, - "height": 36 - }, - "_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__": 31 - }, - "_enabled": true, - "_spriteFrame": { - "__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061" - }, - "_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", diff --git a/CIGA_2018/assets/resource/script/game.js b/CIGA_2018/assets/resource/script/game.js index 44db6eb..5baef01 100644 --- a/CIGA_2018/assets/resource/script/game.js +++ b/CIGA_2018/assets/resource/script/game.js @@ -256,6 +256,7 @@ cc.Class({ } this.endNode.active = true; this.endNode.setScale(0.5); + wsat.audio.play(3, false, 1); this.endNode.runAction(cc.sequence(cc.scaleTo(2,1.6),cc.callFunc(()=>{ cc.director.loadScene('start'); }))) diff --git a/CIGA_2018/assets/resource/script/player.js b/CIGA_2018/assets/resource/script/player.js index 94f1ba8..8f7736e 100644 --- a/CIGA_2018/assets/resource/script/player.js +++ b/CIGA_2018/assets/resource/script/player.js @@ -266,6 +266,7 @@ cc.Class({ ){ return; } + wsat.audio.play(2, false, 1); var ani = this.getComponent(cc.Animation); if(ani){ var clip = ani.play('walk_' + this.id); @@ -300,6 +301,7 @@ cc.Class({ ) { return; } + wsat.audio.play(2, false, 1); var ani = this.getComponent(cc.Animation); if (ani) { var clip = ani.play('walk_' + this.id); diff --git a/CIGA_2018/assets/resource/script/start.js b/CIGA_2018/assets/resource/script/start.js index 71537ec..4aaa776 100644 --- a/CIGA_2018/assets/resource/script/start.js +++ b/CIGA_2018/assets/resource/script/start.js @@ -34,12 +34,14 @@ cc.Class({ // onLoad () {}, start () { + wsat.audio.play(0, true, 1); wsat.net.start(); }, // update (dt) {}, onStart(e){ + wsat.audio.play(1, false, 1); wsat.net.send('client_login'); var ani = e.target.getComponent(cc.Animation); ani.on('finished',()=>{ diff --git a/CIGA_2018/assets/resource/texture/bg/BG.jpg b/CIGA_2018/assets/resource/texture/bg/BG.jpg deleted file mode 100644 index 2d86e63..0000000 Binary files a/CIGA_2018/assets/resource/texture/bg/BG.jpg and /dev/null differ diff --git a/CIGA_2018/assets/resource/texture/bg/BG.jpg.meta b/CIGA_2018/assets/resource/texture/bg/BG.jpg.meta deleted file mode 100644 index 721fdfb..0000000 --- a/CIGA_2018/assets/resource/texture/bg/BG.jpg.meta +++ /dev/null @@ -1,30 +0,0 @@ -{ - "ver": "1.0.0", - "uuid": "5e9dbec1-a963-480d-ab25-c131961bb884", - "type": "sprite", - "wrapMode": "clamp", - "filterMode": "bilinear", - "subMetas": { - "BG": { - "ver": "1.0.3", - "uuid": "391f9b64-fef1-456b-a94c-79e0c9233444", - "rawTextureUuid": "5e9dbec1-a963-480d-ab25-c131961bb884", - "trimType": "custom", - "trimThreshold": 1, - "rotated": false, - "offsetX": 0, - "offsetY": 0, - "trimX": 0, - "trimY": 0, - "width": 1920, - "height": 1080, - "rawWidth": 1920, - "rawHeight": 1080, - "borderTop": 0, - "borderBottom": 0, - "borderLeft": 0, - "borderRight": 0, - "subMetas": {} - } - } -} \ No newline at end of file diff --git a/CIGA_2018/settings/builder.json b/CIGA_2018/settings/builder.json index 7111a6f..b8c5fb4 100644 --- a/CIGA_2018/settings/builder.json +++ b/CIGA_2018/settings/builder.json @@ -26,7 +26,7 @@ "orientation": "portrait" }, "renderMode": "0", - "startScene": "da1bbc51-a933-4dd5-a5a0-e35562fb7345", + "startScene": "759b67b0-bec7-4e34-8a3f-375c5435dca0", "title": "CIGA_2018", "webOrientation": "auto", "wechatgame": { diff --git a/CIGA_2018_Server/smallGameServer/smallGameServer/app.js b/CIGA_2018_Server/smallGameServer/smallGameServer/app.js index e198844..81a1f23 100644 --- a/CIGA_2018_Server/smallGameServer/smallGameServer/app.js +++ b/CIGA_2018_Server/smallGameServer/smallGameServer/app.js @@ -218,6 +218,7 @@ ws.createServer(function (conn) { switch (context.opt) { case "client_login": mainClient = this; + seats = {}; break; case "controller_login": // onlineControllers.push(this); diff --git a/CIGA_Control/assets/module/net.js b/CIGA_Control/assets/module/net.js index 7552684..1ceb488 100644 --- a/CIGA_Control/assets/module/net.js +++ b/CIGA_Control/assets/module/net.js @@ -3,7 +3,7 @@ var net = {}; module.exports = net; //服务器地址 -const serverAddress = 'ws://localhost:8003' +const serverAddress = 'ws://47.92.101.120:8003' //服务器连接超时时间 const outTime = 1000; diff --git a/CIGA_Control/assets/scene/choose.fire b/CIGA_Control/assets/scene/choose.fire index 42ef69c..f479755 100644 --- a/CIGA_Control/assets/scene/choose.fire +++ b/CIGA_Control/assets/scene/choose.fire @@ -686,7 +686,7 @@ "__id__": 14 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -727,20 +727,12 @@ "_N$normalSprite": { "__uuid__": "bac6a473-5361-451d-854b-5659e698e215" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 14 @@ -844,7 +836,7 @@ "__id__": 18 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -885,20 +877,12 @@ "_N$normalSprite": { "__uuid__": "884c15d7-df5e-425a-ab15-c629ad609d2b" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 18 @@ -1002,7 +986,7 @@ "__id__": 22 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -1043,20 +1027,12 @@ "_N$normalSprite": { "__uuid__": "1c89a348-d6db-4f43-a5fd-2fe05c3330a9" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 22 @@ -1160,7 +1136,7 @@ "__id__": 26 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -1201,20 +1177,12 @@ "_N$normalSprite": { "__uuid__": "4b150469-0efe-4fec-8d14-a3a6672e3394" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 26 @@ -1318,7 +1286,7 @@ "__id__": 30 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -1359,20 +1327,12 @@ "_N$normalSprite": { "__uuid__": "ce2e1762-7e9d-4d7a-baaf-d8746681303b" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 30 @@ -1476,7 +1436,7 @@ "__id__": 34 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -1517,20 +1477,12 @@ "_N$normalSprite": { "__uuid__": "b5a61de8-c19f-4c2d-b17a-0635d9de227a" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 34 @@ -1634,7 +1586,7 @@ "__id__": 38 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -1675,20 +1627,12 @@ "_N$normalSprite": { "__uuid__": "b25e96c7-7610-44ad-b8cd-f8393b682e1e" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 38 @@ -1792,7 +1736,7 @@ "__id__": 42 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -1833,20 +1777,12 @@ "_N$normalSprite": { "__uuid__": "e136ccc4-6fb1-46c8-b530-cfc401b45d90" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 42 @@ -1950,7 +1886,7 @@ "__id__": 46 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -1991,20 +1927,12 @@ "_N$normalSprite": { "__uuid__": "480f0449-ac28-40fe-94cf-bd8019be1507" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 46 @@ -2108,7 +2036,7 @@ "__id__": 50 }, "_enabled": true, - "transition": 3, + "transition": 2, "pressedColor": { "__type__": "cc.Color", "r": 255, @@ -2149,20 +2077,12 @@ "_N$normalSprite": { "__uuid__": "0eebd77e-93b0-4ca0-8f13-e5aa0b399b3c" }, - "_N$pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "pressedSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "_N$hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, - "hoverSprite": { - "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" - }, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, "_N$disabledSprite": { - "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + "__uuid__": "8cca68cf-e350-4f9d-a753-2e205c9275d1" }, "_N$target": { "__id__": 50 @@ -2184,7 +2104,7 @@ "node": { "__id__": 13 }, - "_enabled": true, + "_enabled": false, "_layoutSize": { "__type__": "cc.Size", "width": 1010, diff --git a/CIGA_Control/assets/script/choose.js b/CIGA_Control/assets/script/choose.js index e3af104..93dd5ea 100644 --- a/CIGA_Control/assets/script/choose.js +++ b/CIGA_Control/assets/script/choose.js @@ -51,7 +51,7 @@ cc.Class({ btn.interactable = true; } } - }) + }.bind(this)) wsat.net.addListen('sit_result',function(data){ if(data && data.id){ @@ -62,7 +62,7 @@ cc.Class({ this.nodeLayout.active = false; this.nodeTips.active = true; } - }) + }.bind(this)) this.schedule(function(){ wsat.net.send('controller_login');