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
0f73eef7
Commit
0f73eef7
authored
Sep 03, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
459fa35e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
22 deletions
+27
-22
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-0
box.svga
egret/resource/assets/svgas/box.svga
+0
-0
MapSkin.exml
egret/resource/skins/MapSkin.exml
+1
-5
MapScene.ts
egret/src/mapScene/MapScene.ts
+24
-16
home.json
mock/happyclear/home.json
+1
-1
No files found.
egret/libs/new_wx/MainBase.ts
View file @
0f73eef7
...
@@ -226,6 +226,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -226,6 +226,7 @@ export default class MainBase extends eui.UILayer {
loadSvga
(
getResPath
()
+
'resource/assets/svgas/loading_animals.svga'
),
loadSvga
(
getResPath
()
+
'resource/assets/svgas/loading_animals.svga'
),
loadSvga
(
getResPath
()
+
'resource/assets/svgas/loading_title.svga'
)
loadSvga
(
getResPath
()
+
'resource/assets/svgas/loading_title.svga'
)
]);
]);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/box.svga'
);
}
}
catch
(
e
)
{
catch
(
e
)
{
console
.
error
(
e
);
console
.
error
(
e
);
...
...
egret/resource/assets/svgas/box.svga
0 → 100644
View file @
0f73eef7
File added
egret/resource/skins/MapSkin.exml
View file @
0f73eef7
...
@@ -112,11 +112,7 @@
...
@@ -112,11 +112,7 @@
</e:Group>
</e:Group>
<e:Group
id=
"boxLayer"
x=
"0"
y=
"0"
visible=
"false"
>
<e:Group
id=
"boxLayer"
x=
"0"
y=
"0"
visible=
"false"
>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
x=
"0"
y=
"0"
/>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
x=
"0"
y=
"0"
/>
<e:Group
id=
"boxani"
x=
"19"
y=
"251"
>
<e:Group
id=
"boxani"
>
<e:Image
id=
"lightbg"
source=
"光 副本 4_png"
y=
"0"
x=
"0"
/>
<e:Image
id=
"boxFrame1"
source=
"宝箱1_png"
x=
"156"
y=
"95"
/>
<e:Image
id=
"boxFrame2"
source=
"宝箱2_png"
x=
"69.06"
y=
"32.7"
/>
<e:Image
id=
"boxFrame3"
source=
"宝箱3_png"
x=
"68.78"
y=
"-30.72"
/>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
<w:Config
id=
"16c89f4ae1a"
/>
<w:Config
id=
"16c89f4ae1a"
/>
...
...
egret/src/mapScene/MapScene.ts
View file @
0f73eef7
...
@@ -15,6 +15,8 @@ import MapTopPart from "./MapTopPart";
...
@@ -15,6 +15,8 @@ import MapTopPart from "./MapTopPart";
import
{
readCache
,
GuideCon
}
from
"./GuideCon"
;
import
{
readCache
,
GuideCon
}
from
"./GuideCon"
;
import
{
stopGamebg
}
from
"../soundCtrl2"
;
import
{
stopGamebg
}
from
"../soundCtrl2"
;
import
setGray
from
"../setGray"
;
import
setGray
from
"../setGray"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
export
default
class
MapScene
extends
Scene
{
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
scrollGroup
:
eui
.
Group
;
...
@@ -30,6 +32,7 @@ export default class MapScene extends Scene {
...
@@ -30,6 +32,7 @@ export default class MapScene extends Scene {
if
(
getBgOn
()
&&
MapScene
[
'firstPlayBgTag'
]
==
true
)
{
if
(
getBgOn
()
&&
MapScene
[
'firstPlayBgTag'
]
==
true
)
{
playBg
();
playBg
();
}
}
stopGamebg
();
stopGamebg
();
if
(
!
readCache
())
{
if
(
!
readCache
())
{
var
guide
=
new
GuideCon
();
var
guide
=
new
GuideCon
();
...
@@ -289,33 +292,38 @@ export default class MapScene extends Scene {
...
@@ -289,33 +292,38 @@ export default class MapScene extends Scene {
toggleBg
();
toggleBg
();
}
}
onTap_boxLayer
()
{
private
_mc
;
async
onTap_boxLayer
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
1
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
1
));
const
data
=
getHomeData
();
const
data
=
getHomeData
();
if
(
data
.
canReceiveTreasureBoxNum
>
0
)
{
if
(
data
.
canReceiveTreasureBoxNum
>
0
)
{
this
[
'boxLayer'
].
visible
=
true
;
this
[
'boxLayer'
].
visible
=
true
;
this
[
'boxFrame1'
].
visible
=
true
;
this
.
_mc
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/box.svga'
,
this
[
'boxani'
]);
this
[
'boxFrame2'
].
visible
=
false
;
this
.
_mc
.
stop
();
this
[
'boxFrame3'
].
visible
=
false
;
this
.
_mc
.
visible
=
false
;
await
wait
(
50
);
this
.
_mc
.
visible
=
true
;
}
}
}
}
async
playAni
()
{
async
playAni
()
{
this
[
'boxFrame1'
].
visible
=
true
;
if
(
this
.
_mc
)
{
this
[
'boxFrame2'
].
visible
=
false
;
this
.
_mc
.
gotoAndPlay
(
1
,
true
);
this
[
'boxFrame3'
].
visible
=
false
;
await
this
.
onPlaySTOP
();
await
wait
(
1000
/
10
);
}
this
[
'boxFrame1'
].
visible
=
false
;
this
[
'boxFrame2'
].
visible
=
true
;
this
[
'boxFrame3'
].
visible
=
false
;
await
wait
(
1000
/
10
);
this
[
'boxFrame1'
].
visible
=
false
;
this
[
'boxFrame2'
].
visible
=
false
;
this
[
'boxFrame3'
].
visible
=
true
;
await
wait
(
300
);
this
[
'boxLayer'
].
visible
=
false
;
this
[
'boxLayer'
].
visible
=
false
;
}
}
async
onPlaySTOP
()
{
return
new
Promise
((
r
)
=>
{
this
.
_mc
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
this
.
_mc
.
stop
();
r
();
},
this
);
});
}
async
onTap_box
()
{
async
onTap_box
()
{
console
.
log
(
1
)
console
.
log
(
1
)
// const data = getHomeData();
// const data = getHomeData();
...
...
mock/happyclear/home.json
View file @
0f73eef7
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
],
],
"remainEnargy"
:
10
,
"remainEnargy"
:
10
,
"askForEnergy"
:
false
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
0
,
"canReceiveTreasureBoxNum"
:
1
0
,
"nextRangeStarsNum"
:
150
"nextRangeStarsNum"
:
150
}
}
}
}
\ 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