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
5ba6cf22
Commit
5ba6cf22
authored
Aug 22, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
83601044
7508ba81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
13 deletions
+72
-13
MainScene.ts
egret/src/mainScene/MainScene.ts
+71
-12
Chapters.ts
egret/src/something/Chapters.ts
+1
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
5ba6cf22
...
...
@@ -46,6 +46,8 @@ import { getlogItem } from '../Main';
import
getHomeData
,
{
getPropNums
}
from
'../getHomeData'
;
import
PropType
from
'../PropType'
;
import
{
PropNumShow
}
from
'../something/uis/PropNumShow'
;
import
{
NetName
}
from
'../../libs/tw/enum/NetName'
;
import
SceneCtrl
from
'../../libs/new_wx/ctrls/sceneCtrl'
;
// import BridgeFactory from "../../libs/JSBridge/bridge/BridgeFactory";
const
aniClass
=
{
...
...
@@ -190,8 +192,8 @@ export default class MainScene extends Scene {
//初始化索引信息
Tool
.
init
();
//第几关
var
chapter
=
(
data
&&
data
.
chapter
)
?
data
.
chapter
:
1
;
// var chapter = 19
//
var chapter = (data && data.chapter) ? data.chapter : 1;
var
chapter
=
20
this
.
chapterTxt
.
text
=
"第"
+
chapter
+
"关"
;
//关卡数据
this
.
chapterData
=
Chapters
[
chapter
];
...
...
@@ -239,11 +241,29 @@ export default class MainScene extends Scene {
let
g
=
new
GuideMsg
();
g
.
init
(
chapter
,
()
=>
{
Loading
.
instace
.
hide
()
this
.
addChild
(
g
)
this
.
addChild
(
g
);
this
.
enableMouseEvt
(
true
);
})
}
//开启事件,具体不应该放在这里,到时看
this
.
enableMouseEvt
(
true
);
}
else
{
//开启事件,具体不应该放在这里,到时看
this
.
enableMouseEvt
(
true
);
}
//测试代码
var
fail
=
new
eui
.
Image
(
RES
.
getRes
(
"guideKnowBtn_png"
));
fail
.
x
=
10
;
fail
.
y
=
10
;
fail
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
function
()
{
playSound
(
SoundType
.
fail
);
PanelCtrl
.
instance
.
show
(
"failed"
);
},
this
)
this
.
addChild
(
fail
);
var
sucess
=
new
eui
.
Image
(
RES
.
getRes
(
"guideKnowBtn_png"
));
sucess
.
x
=
474
;
sucess
.
y
=
10
;
sucess
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
function
()
{
this
.
submit
(
JSON
.
stringify
({
1
:
0
}))
},
this
)
this
.
addChild
(
sucess
)
}
/**
* 加载所有用到的svga
...
...
@@ -1388,10 +1408,7 @@ export default class MainScene extends Scene {
//通关了
//提交分数等
var
json
=
this
.
getSubmitJson
()
console
.
log
(
json
)
playSound
(
SoundType
.
sucess
);
//区分奖品
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
PRIZE_PANEL
);
this
.
submit
(
json
)
}
return
}
...
...
@@ -1983,7 +2000,7 @@ export default class MainScene extends Scene {
/**
* 获得提交数据的jsob
*/
getSubmitJson
()
{
getSubmitJson
()
:
string
{
var
json
=
{};
//分数
json
[
1
]
=
this
.
score
;
...
...
@@ -1995,7 +2012,49 @@ export default class MainScene extends Scene {
}
}
}
return
json
return
JSON
.
stringify
(
json
)
}
/**
* 包括捞结果
* @param json
* @param callback
*/
submit
(
json
:
string
)
{
Loading
.
instace
.
show
();
NetManager
.
ins
.
hc_submit
((
s
,
data
)
=>
{
if
(
s
)
{
NetManager
.
ins
.
getOrderStatus
((
s
)
=>
{
Loading
.
instace
.
hide
();
playSound
(
SoundType
.
sucess
);
if
(
s
)
{
//区分奖品,待写
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
PRIZE_PANEL
);
}
else
{
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_PRIZE_PANEL
);
}
},
DataManager
.
ins
.
getData
(
NetName
.
CUSTOM_DO_JOIN
).
data
,
()
=>
{
return
DataManager
.
ins
.
getData
(
NetName
.
CUSTOM_ORDER_STATUS
).
code
==
"C000000001"
;
},
10
)
}
else
{
Loading
.
instace
.
hide
();
if
(
!
data
)
{
//错误弹框,网络错误
//提交失败
showToast
(
"网络错误,再次连接中"
)
setTimeout
(()
=>
{
this
.
submit
(
json
);
},
1300
)
}
else
{
//提交失败
showToast
(
"提交失败"
)
setTimeout
(()
=>
{
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAP_SCENE
);
},
1300
)
}
}
},
json
)
}
/**
...
...
egret/src/something/Chapters.ts
View file @
5ba6cf22
...
...
@@ -595,7 +595,7 @@ export const Chapters: ChapterData[] = [
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
,
2
,
5
,
5
,
2
,
2
,
2
,
5
,
5
,
2
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
2
,
5
,
2
,
0
,
1
,
0
,
2
,
5
,
2
,
2
,
5
,
2
,
0
,
2
,
0
,
2
,
5
,
2
,
],
generateLats
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
],
},
...
...
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