Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NGT_02
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
NGT_02
Commits
50583886
Commit
50583886
authored
Feb 24, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: global变量问题
parent
d51018ee
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
506 additions
and
340 deletions
+506
-340
NGT_02.js
assets/NGT_02/scene/NGT_02.js
+1
-0
_preDefine.js
assets/NGT_02/script/common/_preDefine.js
+9
-3
data_mgr.js
assets/NGT_02/script/manager/data_mgr.js
+264
-121
event_mgr.js
assets/NGT_02/script/manager/event_mgr.js
+41
-39
local_storage.js
assets/NGT_02/script/manager/local_storage.js
+11
-9
res_mgr.js
assets/NGT_02/script/manager/res_mgr.js
+93
-87
snd_mgr.js
assets/NGT_02/script/manager/snd_mgr.js
+87
-81
No files found.
assets/NGT_02/scene/NGT_02.js
View file @
50583886
...
...
@@ -13,6 +13,7 @@ var game = cc.Class({
},
ctor
:
function
()
{
initGlobal_NGT_02
();
game
.
inst
=
this
;
g
.
game
=
game
;
},
...
...
assets/NGT_02/script/common/_preDefine.js
View file @
50583886
// 全局环境预声明
window
.
g
=
window
.
g
||
{};
// 全局
console
.
log
(
'
window.g init
'
);
\ No newline at end of file
function
initGlobal_NGT_02
()
{
console
.
log
(
'
window.g init
'
);
window
.
g
=
{};
initDataMgr_NGT_02
();
initEventMgr_NGT_02
();
initStorageMgr_NGT_02
();
initResMgr_NGT_02
();
initSndMgr_NGT_02
();
}
\ No newline at end of file
assets/NGT_02/script/manager/data_mgr.js
View file @
50583886
/**
* 数据管理器
*/
g
.
data_mgr
=
{
data
:
null
,
//表所有数据
function
initDataMgr_NGT_02
()
{
g
.
data_mgr
=
{
data
:
null
,
//表所有数据
nowNum
:
null
,
//剩余个数
nowNum
:
null
,
//剩余个数
ansId
:
null
,
//问题ID
startId
:
null
,
//星星id
ansId
:
null
,
//问题ID
startId
:
null
,
//星星id
nowAnsId
:
null
,
//当前星星的问题
nowAnsId
:
null
,
//当前星星的问题
gameState
:
2
,
//游戏状态1可操作 2不可操作
gameState
:
2
,
//游戏状态1可操作 2不可操作
nodPlayer
:
null
,
//当前播放节点
nodPlayer
:
null
,
//当前播放节点
//获得默认数据
getDefaultData
()
{
//http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
const
dataJson
=
{
"
starArr
"
:
[{
"
queArr
"
:
[{
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/bb4244d166b6d077617ff089f7fd46c4.png
"
,
"
rect
"
:
{
"
x
"
:
259.9654545454546
,
"
y
"
:
0
,
"
width
"
:
377.0690909090909
,
"
height
"
:
373
}
},
"
hotZoneItemArr
"
:
[{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
0
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
-
1.97
,
"
y
"
:
112
,
"
width
"
:
95.01
,
"
height
"
:
95.01
}
},
{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
1
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
311.03
,
"
y
"
:
118
,
"
width
"
:
77.01
,
"
height
"
:
77.01
}
}],
"
title
"
:
"
3434
"
,
"
title_audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
},
{
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/685ead5fe409d20412a38aae23c75ad0.png
"
,
"
rect
"
:
{
"
x
"
:
116.9444444444444
,
"
y
"
:
-
2.842170943040401
e
-
14
,
"
width
"
:
663.1111111111112
,
"
height
"
:
373.00000000000006
}
},
"
hotZoneItemArr
"
:
[{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
0
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
72.06
,
"
y
"
:
52
,
"
width
"
:
133
,
"
height
"
:
49
}
},
{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
1
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
475.06
,
"
y
"
:
30
,
"
width
"
:
159
,
"
height
"
:
67
}
}],
"
title
"
:
"
666
"
,
"
title_audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
}]
},
{
"
queArr
"
:
[{
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/6326a8bc4896aaa1834bd35f2dac9fee.png
"
,
"
rect
"
:
{
"
x
"
:
273.3030303030303
,
"
y
"
:
0
,
"
width
"
:
350.3939393939394
,
"
height
"
:
373
}
},
"
hotZoneItemArr
"
:
[{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
0
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
-
5.3
,
"
y
"
:
214
,
"
width
"
:
65
,
"
height
"
:
65
}
},
{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
1
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
294.7
,
"
y
"
:
148
,
"
width
"
:
71
,
"
height
"
:
71
}
}],
"
title
"
:
"
455
"
,
"
title_audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
},
{
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/942fb8d28620d46d6c77d18909e86806.png
"
,
"
rect
"
:
{
"
x
"
:
116.9444444444444
,
"
y
"
:
-
2.842170943040401
e
-
14
,
"
width
"
:
663.1111111111112
,
"
height
"
:
373.00000000000006
}
},
"
hotZoneItemArr
"
:
[{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
0
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
247.06
,
"
y
"
:
217
,
"
width
"
:
97
,
"
height
"
:
97
}
},
{
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
index
"
:
1
,
"
itemType
"
:
"
rect
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.70078125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.70078125
,
"
rect
"
:
{
"
x
"
:
515.06
,
"
y
"
:
108
,
"
width
"
:
57
,
"
height
"
:
57
}
}],
"
title
"
:
"
7777
"
,
"
title_audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
}]
}]
}
starArr
:
[
{
queArr
:
[
{
bgItem
:
{
url
:
"
http://staging-teach.cdn.ireadabc.com/bb4244d166b6d077617ff089f7fd46c4.png
"
,
rect
:
{
x
:
259.9654545454546
,
y
:
0
,
width
:
377.0690909090909
,
height
:
373
,
},
},
hotZoneItemArr
:
[
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
0
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
-
1.97
,
y
:
112
,
width
:
95.01
,
height
:
95.01
},
},
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
1
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
311.03
,
y
:
118
,
width
:
77.01
,
height
:
77.01
},
},
],
title
:
"
3434
"
,
title_audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
},
{
bgItem
:
{
url
:
"
http://staging-teach.cdn.ireadabc.com/685ead5fe409d20412a38aae23c75ad0.png
"
,
rect
:
{
x
:
116.9444444444444
,
y
:
-
2.842170943040401
e
-
14
,
width
:
663.1111111111112
,
height
:
373.00000000000006
,
},
},
hotZoneItemArr
:
[
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
0
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
72.06
,
y
:
52
,
width
:
133
,
height
:
49
},
},
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
1
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
475.06
,
y
:
30
,
width
:
159
,
height
:
67
},
},
],
title
:
"
666
"
,
title_audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
},
],
},
{
queArr
:
[
{
bgItem
:
{
url
:
"
http://staging-teach.cdn.ireadabc.com/6326a8bc4896aaa1834bd35f2dac9fee.png
"
,
rect
:
{
x
:
273.3030303030303
,
y
:
0
,
width
:
350.3939393939394
,
height
:
373
,
},
},
hotZoneItemArr
:
[
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
0
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
-
5.3
,
y
:
214
,
width
:
65
,
height
:
65
},
},
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
1
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
294.7
,
y
:
148
,
width
:
71
,
height
:
71
},
},
],
title
:
"
455
"
,
title_audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
},
{
bgItem
:
{
url
:
"
http://staging-teach.cdn.ireadabc.com/942fb8d28620d46d6c77d18909e86806.png
"
,
rect
:
{
x
:
116.9444444444444
,
y
:
-
2.842170943040401
e
-
14
,
width
:
663.1111111111112
,
height
:
373.00000000000006
,
},
},
hotZoneItemArr
:
[
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
0
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
247.06
,
y
:
217
,
width
:
97
,
height
:
97
},
},
{
audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
index
:
1
,
itemType
:
"
rect
"
,
fontSize
:
50
,
fontName
:
"
BRLNSR_1
"
,
fontColor
:
"
#8f3758
"
,
fontScale
:
0.70078125
,
imgScale
:
1
,
mapScale
:
0.70078125
,
rect
:
{
x
:
515.06
,
y
:
108
,
width
:
57
,
height
:
57
},
},
],
title
:
"
7777
"
,
title_audio_url
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
},
],
},
],
};
const
data
=
dataJson
;
// const data = JSON.parse(dataJson);
// const data = [];
...
...
@@ -121,4 +263,5 @@ g.data_mgr = {
g
.
game
.
inst
.
isLoadEnd
=
true
;
},
};
}
assets/NGT_02/script/manager/event_mgr.js
View file @
50583886
// 事件汞
let
eventList
=
{};
// 响应列表(元素结构:eventName,[[target:cb]])
g
.
event_mgr
=
{
function
initEventMgr_NGT_02
()
{
// 事件汞
let
eventList
=
{};
// 响应列表(元素结构:eventName,[[target:cb]])
g
.
event_mgr
=
{
// 注册事件-响应 入参:事件名、响应、目标名
reg
:
function
(
eventName
,
cb
,
target
)
{
var
event
=
eventList
[
eventName
];
...
...
@@ -35,5 +36,6 @@ g.event_mgr = {
},
getReglist
:
function
()
{
return
eventList
;
}
};
\ No newline at end of file
},
};
}
assets/NGT_02/script/manager/local_storage.js
View file @
50583886
// localStorage封装
g
.
local_storage
=
{
function
initStorageMgr_NGT_02
()
{
// localStorage封装
g
.
local_storage
=
{
// 背景音乐音量
getMusicVolume
:
function
()
{
var
vol
=
cc
.
sys
.
localStorage
.
getItem
(
"
music
"
);
return
vol
;
},
setMusicVolume
:
function
(
vol
)
{
cc
.
sys
.
localStorage
.
setItem
(
'
music
'
,
vol
)
cc
.
sys
.
localStorage
.
setItem
(
"
music
"
,
vol
);
},
// 音效音量
...
...
@@ -15,6 +16,7 @@ g.local_storage = {
return
vol
;
},
setEffectsVolume
:
function
(
vol
)
{
cc
.
sys
.
localStorage
.
setItem
(
'
effect
'
,
vol
);
cc
.
sys
.
localStorage
.
setItem
(
"
effect
"
,
vol
);
},
};
};
}
assets/NGT_02/script/manager/res_mgr.js
View file @
50583886
/**
function
initResMgr_NGT_02
()
{
/**
* 资源管理器
*/
g
.
res_mgr
=
{
g
.
res_mgr
=
{
//获得表数据数据
getFormData
()
{
console
.
log
(
'
初始化数据
'
);
console
.
log
(
"
初始化数据
"
);
if
(
window
&&
window
.
courseware
)
{
window
.
courseware
.
getData
((
res
)
=>
{
...
...
@@ -17,9 +18,9 @@ g.res_mgr = {
return
;
}
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
const
middleLayer
=
cc
.
find
(
"
middleLayer
"
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
const
middleLayerComponent
=
middleLayer
.
getComponent
(
"
middleLayer
"
);
middleLayerComponent
.
getData
((
res
)
=>
{
//存入数据管理器
g
.
data_mgr
.
data
=
res
;
...
...
@@ -40,7 +41,7 @@ g.res_mgr = {
//得到图片资源
getSpriteFrimeByUrl
(
url
,
cb
)
{
cc
.
assetManager
.
loadRemote
(
url
,
cc
.
SpriteFrame
,
(
e
,
sp
)
=>
{
const
spriteFrame
=
new
cc
.
SpriteFrame
(
sp
)
const
spriteFrame
=
new
cc
.
SpriteFrame
(
sp
);
cb
&&
cb
(
spriteFrame
);
});
},
...
...
@@ -55,19 +56,22 @@ g.res_mgr = {
//加载龙骨
loadSpine
(
animationDisplay
,
Info
)
{
if
(
Info
.
type
==
'
Image
'
)
{
if
(
Info
.
type
==
"
Image
"
)
{
return
;
}
cc
.
assetManager
.
loadAny
([{
url
:
Info
.
tex_json
,
ext
:
'
.txt
'
},
{
url
:
Info
.
ske_json
,
ext
:
'
.txt
'
}],
(
error
,
assets
)
=>
{
cc
.
assetManager
.
loadAny
(
[
{
url
:
Info
.
tex_json
,
ext
:
"
.txt
"
},
{
url
:
Info
.
ske_json
,
ext
:
"
.txt
"
},
],
(
error
,
assets
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
}
else
{
console
.
log
(
error
);
}
else
{
cc
.
assetManager
.
loadRemote
(
Info
.
tex_png
,
(
error
,
texture
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
}
else
{
console
.
log
(
error
);
}
else
{
var
atlas
=
new
dragonBones
.
DragonBonesAtlasAsset
();
atlas
.
_uuid
=
Info
.
tex_json
;
atlas
.
atlasJson
=
assets
[
0
];
...
...
@@ -90,6 +94,8 @@ g.res_mgr = {
}
});
}
});
}
);
},
};
}
assets/NGT_02/script/manager/snd_mgr.js
View file @
50583886
// 声音管理器
g
.
snd_mgr
=
{
function
initSndMgr_NGT_02
()
{
// 声音管理器
g
.
snd_mgr
=
{
bgmId
:
-
1
,
// 背景音乐的音频ID
effIds
:
[],
// 音效的音频ID列表(由cc.audioEngine保证音频ID不重复)
bgmVol
:
1
,
// 背景音乐音量
...
...
@@ -13,8 +14,12 @@ g.snd_mgr = {
var
local_storage
=
g
.
local_storage
;
var
music_vol
=
local_storage
.
getMusicVolume
();
var
effect_vol
=
local_storage
.
getEffectsVolume
();
music_vol
!=
undefined
&&
music_vol
+
""
!=
""
&&
this
.
setMusicVolume
(
music_vol
);
effect_vol
!=
undefined
&&
effect_vol
+
""
!=
""
&&
this
.
setEffectsVolume
(
effect_vol
);
music_vol
!=
undefined
&&
music_vol
+
""
!=
""
&&
this
.
setMusicVolume
(
music_vol
);
effect_vol
!=
undefined
&&
effect_vol
+
""
!=
""
&&
this
.
setEffectsVolume
(
effect_vol
);
},
delAudId
:
function
(
id
)
{
if
(
id
==
this
.
bgmId
)
{
...
...
@@ -36,7 +41,7 @@ g.snd_mgr = {
// this.bgmId = cc.audioEngine.play(snd, loop);
// return;
// }
cc
.
audioEngine
.
stop
()
cc
.
audioEngine
.
stop
();
this
.
bgmId
=
cc
.
audioEngine
.
playMusic
(
snd
,
loop
);
// 播放完成回调
if
(
finishCB
)
{
...
...
@@ -66,7 +71,7 @@ g.snd_mgr = {
},
resumeVolume
:
function
()
{
if
(
this
.
newsnd
!=
null
)
{
cc
.
audioEngine
.
playMusic
(
this
.
newsnd
)
cc
.
audioEngine
.
playMusic
(
this
.
newsnd
);
}
},
setMusicVolume
:
function
(
percent
)
{
...
...
@@ -78,4 +83,5 @@ g.snd_mgr = {
cc
.
audioEngine
.
setEffectsVolume
(
~~
percent
);
cc
.
audioEngine
.
setMusicVolume
(
~~
this
.
bgmVol
);
},
};
\ No newline at end of file
};
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment