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
9adc5954
Commit
9adc5954
authored
Aug 23, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
66195db7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
3 deletions
+52
-3
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-0
声音关闭.png
egret/resource/assets/map/声音关闭.png
+0
-0
音乐关闭.png
egret/resource/assets/map/音乐关闭.png
+0
-0
default.res.json
egret/resource/default.res.json
+11
-1
MapSkin.exml
egret/resource/skins/MapSkin.exml
+16
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+20
-0
StartScene.ts
egret/src/startScene/StartScene.ts
+4
-2
No files found.
egret/libs/new_wx/MainBase.ts
View file @
9adc5954
...
@@ -233,6 +233,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -233,6 +233,7 @@ export default class MainBase extends eui.UILayer {
const
check
=
()
=>
{
const
check
=
()
=>
{
if
(
count
<=
0
)
{
if
(
count
<=
0
)
{
Buried
.
init
();
Buried
.
init
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
this
.
svgaList
);
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
this
.
svgaList
);
}
}
}
}
...
...
egret/resource/assets/map/声音关闭.png
0 → 100644
View file @
9adc5954
3.74 KB
egret/resource/assets/map/音乐关闭.png
0 → 100644
View file @
9adc5954
4.84 KB
egret/resource/default.res.json
View file @
9adc5954
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
"name"
:
"failed"
"name"
:
"failed"
},
},
{
{
"keys"
:
"progress2_png,progress1_png,map3_jpg,map2_jpg,map1_jpg,icon_png,animal1_png,元宝bg_png,有星星_png,音乐_png,星星bg_png,星星_png,无星星_png,问题_png,退出_png,狮子_png,声音_png,设置bg_png,设置_png,关闭 拷贝_png,道具_png,宝箱btn_png,宝箱bg_png,宝箱_png,宝箱3_png,宝箱2_png,宝箱1_png,iconbg_png,光 副本 4_png"
,
"keys"
:
"progress2_png,progress1_png,map3_jpg,map2_jpg,map1_jpg,icon_png,animal1_png,元宝bg_png,有星星_png,音乐_png,星星bg_png,星星_png,无星星_png,问题_png,退出_png,狮子_png,声音_png,设置bg_png,设置_png,关闭 拷贝_png,道具_png,宝箱btn_png,宝箱bg_png,宝箱_png,宝箱3_png,宝箱2_png,宝箱1_png,iconbg_png,光 副本 4_png
,音乐关闭_png,声音关闭_png
"
,
"name"
:
"map"
"name"
:
"map"
},
},
{
{
...
@@ -1415,6 +1415,16 @@
...
@@ -1415,6 +1415,16 @@
"url"
:
"assets/blood/blood体力补济站.png"
,
"url"
:
"assets/blood/blood体力补济站.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"blood体力补济站_png"
"name"
:
"blood体力补济站_png"
},
{
"url"
:
"assets/map/音乐关闭.png"
,
"type"
:
"image"
,
"name"
:
"音乐关闭_png"
},
{
"url"
:
"assets/map/声音关闭.png"
,
"type"
:
"image"
,
"name"
:
"声音关闭_png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
9adc5954
...
@@ -76,6 +76,22 @@
...
@@ -76,6 +76,22 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Button
id=
"musicOffBtn"
label=
""
y=
"73.95"
horizontalCenter=
"0.5"
visible=
"false"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"音乐关闭_png"
source.down=
"音乐关闭_png"
source.disabled=
"音乐关闭_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"soundOffBtn"
label=
""
y=
"120.24"
horizontalCenter=
"0.5"
visible=
"false"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"声音关闭_png"
source.down=
"声音关闭_png"
source.disabled=
"声音关闭_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
</e:Group>
<e:Button
id=
"settingBtn"
label=
""
y=
"0"
horizontalCenter=
"0"
>
<e:Button
id=
"settingBtn"
label=
""
y=
"0"
horizontalCenter=
"0"
>
<e:skinName>
<e:skinName>
...
...
egret/src/mapScene/MapScene.ts
View file @
9adc5954
...
@@ -11,6 +11,7 @@ import MapTopPart from "./MapTopPart";
...
@@ -11,6 +11,7 @@ import MapTopPart from "./MapTopPart";
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
toggleSound
,
toggleBg
}
from
"../soundCtrl"
;
export
default
class
MapScene
extends
Scene
{
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
scrollGroup
:
eui
.
Group
;
...
@@ -60,6 +61,10 @@ export default class MapScene extends Scene {
...
@@ -60,6 +61,10 @@ export default class MapScene extends Scene {
this
.
updateHomeData
();
this
.
updateHomeData
();
this
.
showLog
();
this
.
showLog
();
this
.
updateBox
();
this
.
updateBox
();
if
(
data
.
level
)
{
PanelCtrl
.
instance
.
show
(
'StartPanel'
,
data
.
level
)
}
}
}
disableIcon
(
level
)
{
disableIcon
(
level
)
{
...
@@ -116,6 +121,21 @@ export default class MapScene extends Scene {
...
@@ -116,6 +121,21 @@ export default class MapScene extends Scene {
this
[
'questionBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_questionBtn
,
this
);
this
[
'questionBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_questionBtn
,
this
);
this
[
'box'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_boxLayer
,
this
);
this
[
'box'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_boxLayer
,
this
);
this
[
'boxani'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_box
,
this
);
this
[
'boxani'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_box
,
this
);
this
[
'soundBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_sound
,
this
);
this
[
'soundOffBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_sound
,
this
);
this
[
'musicOffBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_music
,
this
);
this
[
'musicBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_music
,
this
);
}
onTap_sound
()
{
this
[
'soundBtn'
].
visible
=
!
this
[
'soundBtn'
].
visible
;
this
[
'soundOffBtn'
].
visible
=
!
this
[
'soundOffBtn'
].
visible
;
toggleSound
();
}
onTap_music
()
{
this
[
'musicBtn'
].
visible
=
!
this
[
'musicBtn'
].
visible
;
this
[
'musicOffBtn'
].
visible
=
!
this
[
'musicOffBtn'
].
visible
;
toggleBg
();
}
}
onTap_boxLayer
()
{
onTap_boxLayer
()
{
...
...
egret/src/startScene/StartScene.ts
View file @
9adc5954
...
@@ -11,9 +11,10 @@ export default class StartScene extends Scene {
...
@@ -11,9 +11,10 @@ export default class StartScene extends Scene {
private
STOP_PERCENT
=
99
;
private
STOP_PERCENT
=
99
;
private
_current
=
0
;
private
_current
=
0
;
private
_timer
;
private
_timer
;
level
;
async
start
(
data
?)
{
async
start
(
data
?)
{
super
.
start
();
super
.
start
();
this
.
level
=
data
.
level
;
this
[
'container1'
].
x
=
20
;
this
[
'container1'
].
x
=
20
;
this
[
'container4'
].
mask
=
this
[
'progressmask'
];
this
[
'container4'
].
mask
=
this
[
'progressmask'
];
this
[
'maskwrapper'
].
mask
=
this
[
'progressmask2'
];
this
[
'maskwrapper'
].
mask
=
this
[
'progressmask2'
];
...
@@ -21,7 +22,7 @@ export default class StartScene extends Scene {
...
@@ -21,7 +22,7 @@ export default class StartScene extends Scene {
this
[
'progressmask2'
].
scaleX
=
0
;
this
[
'progressmask2'
].
scaleX
=
0
;
this
[
'percentTxt'
].
text
=
`0%`
;
this
[
'percentTxt'
].
text
=
`0%`
;
if
(
data
)
{
if
(
data
&&
Array
.
isArray
(
data
))
{
this
[
'container3'
].
addChild
(
data
[
0
]);
this
[
'container3'
].
addChild
(
data
[
0
]);
this
[
'container2'
].
addChild
(
data
[
1
]);
this
[
'container2'
].
addChild
(
data
[
1
]);
this
[
'container1'
].
addChild
(
data
[
2
]);
this
[
'container1'
].
addChild
(
data
[
2
]);
...
@@ -78,6 +79,7 @@ export default class StartScene extends Scene {
...
@@ -78,6 +79,7 @@ export default class StartScene extends Scene {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
egret
.
Tween
.
removeTweens
(
this
[
'progressmask2'
]);
egret
.
Tween
.
removeTweens
(
this
[
'progressmask2'
]);
egret
.
Tween
.
get
(
this
[
'progressmask2'
]).
to
({
scaleX
:
1
},
200
).
wait
(
200
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
[
'progressmask2'
]).
to
({
scaleX
:
1
},
200
).
wait
(
200
).
call
(()
=>
{
d
.
level
=
this
.
level
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAP_SCENE
,
d
);
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAP_SCENE
,
d
);
});
});
this
[
'percentTxt'
].
text
=
`100%`
this
[
'percentTxt'
].
text
=
`100%`
...
...
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