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
99c18372
Commit
99c18372
authored
Aug 21, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d9bf161c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+14
-1
BloodPanel.ts
egret/src/panels/BloodPanel.ts
+9
-0
ShopPanel.ts
egret/src/panels/ShopPanel.ts
+8
-0
No files found.
egret/src/mapScene/MapScene.ts
View file @
99c18372
...
...
@@ -8,6 +8,8 @@ import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import
getHomeData
from
"../getHomeData"
;
import
getShowOffPic
from
"../getShowOffPic"
;
import
getSharePic
from
"../getSharePic"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
...
...
@@ -57,7 +59,16 @@ export default class MapScene extends Scene {
// }, 2000);
this
.
updateHomeData
();
this
.
showLog
();
}
showLog
(){
NetManager
.
ins
.
showLog
(
getlogItem
(
1
));
NetManager
.
ins
.
showLog
(
getlogItem
(
2
));
NetManager
.
ins
.
showLog
(
getlogItem
(
5
));
}
updateScene
()
{
this
.
updateHomeData
();
}
...
...
@@ -87,7 +98,8 @@ export default class MapScene extends Scene {
this
.
toggleSettings
();
}
onTap_shopBtn
()
{
PanelCtrl
.
instance
.
show
(
'Shop'
)
PanelCtrl
.
instance
.
show
(
'Shop'
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
5
));
}
toggleSettings
()
{
...
...
@@ -99,6 +111,7 @@ export default class MapScene extends Scene {
// }
onTap_bloodBtn
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
2
));
PanelCtrl
.
instance
.
show
(
'bloodPanel'
)
}
...
...
egret/src/panels/BloodPanel.ts
View file @
99c18372
...
...
@@ -3,11 +3,18 @@ import getHomeData from "../getHomeData";
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
export
default
class
BloodPanel
extends
Panel
{
start
(
data
)
{
super
.
start
();
this
.
updateData
();
this
.
showlog
();
}
showlog
(){
NetManager
.
ins
.
showLog
(
getlogItem
(
3
));
NetManager
.
ins
.
showLog
(
getlogItem
(
4
));
}
private
updateData
()
{
...
...
@@ -26,6 +33,7 @@ export default class BloodPanel extends Panel {
}
onTapBuy
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
3
));
this
[
'buyBtn'
].
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
[
'buyBtn'
].
enabled
=
true
;
...
...
@@ -39,6 +47,7 @@ export default class BloodPanel extends Panel {
}
onTapInvite
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
));
const
data
=
getHomeData
();
if
(
data
.
shared
)
{
showToast
(
'今日已经分享过了.'
);
...
...
egret/src/panels/ShopPanel.ts
View file @
99c18372
...
...
@@ -2,6 +2,7 @@ import Panel from "../../libs/new_wx/components/Panel";
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
PropType
from
"../PropType"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
export
default
class
ShopPanel
extends
Panel
{
buyBtn1
:
eui
.
Button
;
...
...
@@ -12,6 +13,13 @@ export default class ShopPanel extends Panel {
this
[
'buyBtn1'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onBuy1
,
this
);
this
[
'buyBtn2'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onBuy2
,
this
);
this
[
'buyBtn3'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onBuy3
,
this
);
this
.
showLog
();
}
showLog
(){
NetManager
.
ins
.
showLog
(
getlogItem
(
6
));
NetManager
.
ins
.
showLog
(
getlogItem
(
9
));
NetManager
.
ins
.
showLog
(
getlogItem
(
12
));
}
onBuy1
(){
...
...
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