Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
wildfirecode13
xiaoxiaole
Commits
f6ecede4
Commit
f6ecede4
authored
Aug 30, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7dce9413
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
4 deletions
+34
-4
StartPanelSkin.exml
egret/resource/skins/StartPanelSkin.exml
+1
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+4
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+16
-2
soundCtrl.ts
egret/src/soundCtrl.ts
+7
-0
soundCtrl2.ts
egret/src/soundCtrl2.ts
+6
-0
No files found.
egret/resource/skins/StartPanelSkin.exml
View file @
f6ecede4
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<e:Label
id=
"nums2Txt"
text=
"888"
size=
"26"
bold=
"true"
x=
"189.03"
y=
"728.04"
width=
"52"
textAlign=
"center"
textColor=
"0xc33700"
verticalAlign=
"middle"
/>
<e:Label
id=
"nums2Txt"
text=
"888"
size=
"26"
bold=
"true"
x=
"189.03"
y=
"728.04"
width=
"52"
textAlign=
"center"
textColor=
"0xc33700"
verticalAlign=
"middle"
/>
<e:Label
id=
"nums1Txt"
text=
"888"
size=
"26"
bold=
"true"
x=
"358.99"
y=
"728.04"
width=
"52"
textAlign=
"center"
textColor=
"0xc33700"
verticalAlign=
"middle"
/>
<e:Label
id=
"nums1Txt"
text=
"888"
size=
"26"
bold=
"true"
x=
"358.99"
y=
"728.04"
width=
"52"
textAlign=
"center"
textColor=
"0xc33700"
verticalAlign=
"middle"
/>
<e:Label
id=
"nums3Txt"
text=
"888"
size=
"26"
bold=
"true"
x=
"518.15"
y=
"728.04"
textAlign=
"center"
width=
"52"
textColor=
"0xc33700"
verticalAlign=
"middle"
/>
<e:Label
id=
"nums3Txt"
text=
"888"
size=
"26"
bold=
"true"
x=
"518.15"
y=
"728.04"
textAlign=
"center"
width=
"52"
textColor=
"0xc33700"
verticalAlign=
"middle"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"61
6"
y=
"230
"
>
<e:Button
id=
"closeBtn"
label=
""
x=
"61
4"
y=
"252
"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
...
...
egret/src/mainScene/MainScene.ts
View file @
f6ecede4
...
@@ -27,7 +27,7 @@ import { PassType } from '../something/enum/PassType';
...
@@ -27,7 +27,7 @@ import { PassType } from '../something/enum/PassType';
import
{
ElementTargetData
}
from
'../something/interface/ElementTargetData'
;
import
{
ElementTargetData
}
from
'../something/interface/ElementTargetData'
;
import
{
ScoreAni
}
from
'../something/anis/ScoreAni'
;
import
{
ScoreAni
}
from
'../something/anis/ScoreAni'
;
import
{
ScoreProgress
}
from
'../something/uis/ScoreProgress'
;
import
{
ScoreProgress
}
from
'../something/uis/ScoreProgress'
;
import
{
playSound
,
SoundType
,
toggleSound
,
toggleBg
,
getSoundOn
,
getBgOn
}
from
'../soundCtrl'
;
import
{
playSound
,
SoundType
,
toggleSound
,
toggleBg
,
getSoundOn
,
getBgOn
,
stopBg
}
from
'../soundCtrl'
;
import
Scene
from
'../../libs/new_wx/components/Scene'
;
import
Scene
from
'../../libs/new_wx/components/Scene'
;
import
{
showToast
}
from
'../../libs/new_wx/ctrls/toastCtrl'
;
import
{
showToast
}
from
'../../libs/new_wx/ctrls/toastCtrl'
;
import
getResPath
from
'../../libs/new_tc/getResPath'
;
import
getResPath
from
'../../libs/new_tc/getResPath'
;
...
@@ -48,6 +48,7 @@ import { createData } from '../startScene/StartScene';
...
@@ -48,6 +48,7 @@ import { createData } from '../startScene/StartScene';
import
{
Loading2
}
from
'../something/uis/Loading2'
;
import
{
Loading2
}
from
'../something/uis/Loading2'
;
import
{
BonusTime
}
from
'../something/uis/BonusTime'
;
import
{
BonusTime
}
from
'../something/uis/BonusTime'
;
import
{
NetName
}
from
'../../libs/tw/enum/NetName'
;
import
{
NetName
}
from
'../../libs/tw/enum/NetName'
;
import
{
playGameBg
}
from
'../soundCtrl2'
;
const
aniClass
=
{
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
"BoomAni"
:
BoomAni
,
...
@@ -197,6 +198,8 @@ export default class MainScene extends Scene {
...
@@ -197,6 +198,8 @@ export default class MainScene extends Scene {
bonusTime
:
BonusTime
;
bonusTime
:
BonusTime
;
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
stopBg
();
playGameBg
();
//初始化索引信息
//初始化索引信息
Tool
.
init
();
Tool
.
init
();
//第几关
//第几关
...
...
egret/src/mapScene/MapScene.ts
View file @
f6ecede4
...
@@ -8,11 +8,12 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
...
@@ -8,11 +8,12 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
getHomeData
from
"../getHomeData"
;
import
getHomeData
from
"../getHomeData"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
import
setGlow
from
"../setGlow"
;
import
setGlow
from
"../setGlow"
;
import
{
playBg
,
toggleBg
,
toggleSound
}
from
"../soundCtrl"
;
import
{
playBg
,
toggleBg
,
toggleSound
,
getBgOn
,
getSoundOn
}
from
"../soundCtrl"
;
import
MapBottomPart
from
"./MapBottomPart"
;
import
MapBottomPart
from
"./MapBottomPart"
;
import
MapRpeatPart
from
"./MapRpeatPart"
;
import
MapRpeatPart
from
"./MapRpeatPart"
;
import
MapTopPart
from
"./MapTopPart"
;
import
MapTopPart
from
"./MapTopPart"
;
import
{
readCache
,
GuideCon
}
from
"./GuideCon"
;
import
{
readCache
,
GuideCon
}
from
"./GuideCon"
;
import
{
stopGamebg
}
from
"../soundCtrl2"
;
export
default
class
MapScene
extends
Scene
{
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
scrollGroup
:
eui
.
Group
;
...
@@ -25,7 +26,10 @@ export default class MapScene extends Scene {
...
@@ -25,7 +26,10 @@ export default class MapScene extends Scene {
_data
;
_data
;
async
start
(
data
?)
{
async
start
(
data
?)
{
super
.
start
();
super
.
start
();
if
(
getBgOn
()
&&
MapScene
[
'firstPlayBgTag'
]
==
true
)
{
playBg
();
}
stopGamebg
();
if
(
!
readCache
())
{
if
(
!
readCache
())
{
var
guide
=
new
GuideCon
();
var
guide
=
new
GuideCon
();
this
.
addChild
(
guide
);
this
.
addChild
(
guide
);
...
@@ -33,6 +37,8 @@ export default class MapScene extends Scene {
...
@@ -33,6 +37,8 @@ export default class MapScene extends Scene {
console
.
log
(
guide
)
console
.
log
(
guide
)
}
}
this
.
initSound
();
// window['gameover'] = ()=>{
// window['gameover'] = ()=>{
// NetManager.ins.hc_submit(() => { }, 1, 1, null, '');
// NetManager.ins.hc_submit(() => { }, 1, 1, null, '');
// NetManager.ins.getPlugOrderStatus(() => { }, 1, () => { return false })
// NetManager.ins.getPlugOrderStatus(() => { }, 1, () => { return false })
...
@@ -251,6 +257,14 @@ export default class MapScene extends Scene {
...
@@ -251,6 +257,14 @@ export default class MapScene extends Scene {
window
.
location
.
href
=
window
[
'__link__'
]
window
.
location
.
href
=
window
[
'__link__'
]
},
this
);
},
this
);
}
}
initSound
(){
this
[
'soundBtn'
].
visible
=
getSoundOn
();
this
[
'soundOffBtn'
].
visible
=
!
getSoundOn
();
this
[
'musicBtn'
].
visible
=
getBgOn
();
this
[
'musicOffBtn'
].
visible
=
!
getBgOn
();
}
onTap_sound
()
{
onTap_sound
()
{
this
[
'soundBtn'
].
visible
=
!
this
[
'soundBtn'
].
visible
;
this
[
'soundBtn'
].
visible
=
!
this
[
'soundBtn'
].
visible
;
this
[
'soundOffBtn'
].
visible
=
!
this
[
'soundOffBtn'
].
visible
;
this
[
'soundOffBtn'
].
visible
=
!
this
[
'soundOffBtn'
].
visible
;
...
...
egret/src/soundCtrl.ts
View file @
f6ecede4
...
@@ -26,6 +26,13 @@ export const toggleBg = () => {
...
@@ -26,6 +26,13 @@ export const toggleBg = () => {
}
}
}
}
export
const
stopBg
=
()
=>
{
if
(
bgChannel
)
{
bgChannel
.
stop
();
bgChannel
=
null
;
}
};
export
const
playBg
=
async
()
=>
{
export
const
playBg
=
async
()
=>
{
if
(
bgChannel
)
return
;
if
(
bgChannel
)
return
;
if
(
loading
)
return
;
if
(
loading
)
return
;
...
...
egret/src/soundCtrl2.ts
View file @
f6ecede4
...
@@ -16,6 +16,12 @@ export const toggleGameBg = () => {
...
@@ -16,6 +16,12 @@ export const toggleGameBg = () => {
}
}
}
}
export
const
stopGamebg
=
()
=>
{
if
(
!
bgChannel
)
return
;
bgChannel
.
stop
();
bgChannel
=
null
;
}
export
const
playGameBg
=
async
()
=>
{
export
const
playGameBg
=
async
()
=>
{
if
(
bgChannel
)
return
;
if
(
bgChannel
)
return
;
if
(
loading
)
return
;
if
(
loading
)
return
;
...
...
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