Skip to content

Commit

Permalink
2018.7.8.13.02
Browse files Browse the repository at this point in the history
  • Loading branch information
esslssui committed Jul 8, 2018
1 parent ed20c86 commit e2357fc
Show file tree
Hide file tree
Showing 27 changed files with 805 additions and 335 deletions.
53 changes: 53 additions & 0 deletions CIGA_2018/assets/module/audio.js
Original file line number Diff line number Diff line change
@@ -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) {},
});

9 changes: 9 additions & 0 deletions CIGA_2018/assets/module/audio.js.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "8cfa7f26-3730-4386-83b7-adb7bcaa5343",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
2 changes: 1 addition & 1 deletion CIGA_2018/assets/module/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
75 changes: 75 additions & 0 deletions CIGA_2018/assets/resource/animation/loop.anim
Original file line number Diff line number Diff line change
@@ -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": []
}
5 changes: 5 additions & 0 deletions CIGA_2018/assets/resource/animation/loop.anim.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "f0322748-84f4-4b0c-a2fc-2a09245fd56a",
"subMetas": {}
}
43 changes: 43 additions & 0 deletions CIGA_2018/assets/resource/animation/loop_2.anim
Original file line number Diff line number Diff line change
@@ -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": []
}
5 changes: 5 additions & 0 deletions CIGA_2018/assets/resource/animation/loop_2.anim.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "a1245423-1078-4b7d-82fb-3c39701634c2",
"subMetas": {}
}
Binary file added CIGA_2018/assets/resource/audio/bg.wav
Binary file not shown.
6 changes: 6 additions & 0 deletions CIGA_2018/assets/resource/audio/bg.wav.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "f519f0e7-561e-46e4-be3c-52106e1ff7f9",
"downloadMode": 0,
"subMetas": {}
}
Binary file added CIGA_2018/assets/resource/audio/eat.mp3
Binary file not shown.
6 changes: 6 additions & 0 deletions CIGA_2018/assets/resource/audio/eat.mp3.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "a2e2db48-870c-4ac6-94f5-fc68f50c4aa4",
"downloadMode": 0,
"subMetas": {}
}
Binary file added CIGA_2018/assets/resource/audio/over.mp3
Binary file not shown.
6 changes: 6 additions & 0 deletions CIGA_2018/assets/resource/audio/over.mp3.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "05acaf81-d2be-42bf-a2df-1e22fdba1818",
"downloadMode": 0,
"subMetas": {}
}
Binary file added CIGA_2018/assets/resource/audio/start.mp3
Binary file not shown.
6 changes: 6 additions & 0 deletions CIGA_2018/assets/resource/audio/start.mp3.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "f52e4420-691b-4899-b431-6c5cac24c9b7",
"downloadMode": 0,
"subMetas": {}
}
82 changes: 80 additions & 2 deletions CIGA_2018/assets/resource/scene/game.fire
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,19 @@
},
{
"__id__": 317
},
{
"__id__": 319
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 319
"__id__": 321
},
{
"__id__": 320
"__id__": 322
}
],
"_prefab": null,
Expand Down Expand Up @@ -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": "",
Expand Down
Loading

0 comments on commit e2357fc

Please sign in to comment.