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
2620484c
Commit
2620484c
authored
Aug 24, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
7dab2ecc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
20 deletions
+48
-20
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+36
-9
MainScene.ts
egret/src/mainScene/MainScene.ts
+10
-9
Chapters.ts
egret/src/something/Chapters.ts
+2
-2
No files found.
egret/libs/tw/manager/NetManager.ts
View file @
2620484c
...
...
@@ -430,6 +430,21 @@ export class NetManager extends ABNetManager {
};
this
.
send
(
net
);
}
private
encrypt
(
data
)
{
var
kk
:
string
=
window
[
'CFG'
].
consumerId
;
kk
=
kk
.
substring
(
0
,
16
);
//补0;
var
len
=
kk
.
length
;
while
(
len
<
16
)
{
kk
=
kk
+
"0"
;
len
++
;
}
var
CryptoJS
=
window
[
"CryptoJS"
];
var
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
kk
);
var
iv
=
CryptoJS
.
enc
.
Utf8
.
parse
(
kk
);
return
CryptoJS
.
AES
.
encrypt
(
data
,
key
,
{
iv
:
iv
,
mode
:
CryptoJS
.
mode
.
CBC
,
padding
:
CryptoJS
.
pad
.
ZeroPadding
}).
toString
();
}
/**
*
* @param callback
...
...
@@ -440,21 +455,33 @@ export class NetManager extends ABNetManager {
*/
hc_submit
(
callback
:
Function
,
orderId
:
number
,
score
:
number
,
gameData
:
string
,
submitToken
:
string
):
void
{
const
sign
=
this
.
createSgin
(
orderId
,
score
,
gameData
,
submitToken
);
NetName
.
CUSTOM_DO_JOIN
var
data
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
orderId
:
orderId
,
gameData
:
gameData
,
sgin
:
sign
,
dynamicData
:
JSON
.
stringify
([]),
detect
:
window
[
'detect'
],
deviceSessionId
:
window
[
'_device_session_id'
],
score
:
score
,
}
var
sgin
=
this
.
encrypt
(
data
);
const
net
:
INetData
=
{
name
:
'hc_submit'
,
uri
:
'/hdtool/happyclear/submit'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
orderId
:
orderId
,
gameData
:
gameData
,
sgin
:
sign
,
dynamicData
:
JSON
.
stringify
([]),
detect
:
window
[
'detect'
],
deviceSessionId
:
window
[
'_device_session_id'
],
score
:
score
,
// activityId: DataManager.ins.customCfgData.actId,
// orderId: orderId,
// gameData: gameData,
// sgin: sign,
// dynamicData: JSON.stringify([]),
// detect: window['detect'],
// deviceSessionId: window['_device_session_id'],
// score: score,
sgin
:
sgin
},
hideMsg
:
true
,
callback
:
callback
...
...
egret/src/mainScene/MainScene.ts
View file @
2620484c
...
...
@@ -198,8 +198,8 @@ export default class MainScene extends Scene {
//初始化索引信息
Tool
.
init
();
//第几关
this
.
chapter
=
(
data
&&
data
.
chapter
)
?
data
.
chapter
:
1
;
// this.chapter = 33
;
//
this.chapter = (data && data.chapter) ? data.chapter : 1;
this
.
chapter
=
70
;
this
.
chapterTxt
.
text
=
"第"
+
this
.
chapter
+
"关"
;
//关卡数据,1期定制,70,后面35关地图一致,步数减少
this
.
chapterData
=
Chapters
[
this
.
chapter
%
35
||
35
];
...
...
@@ -479,6 +479,13 @@ export default class MainScene extends Scene {
this
.
lattices
[
connectedLat
[
0
]].
down
=
connectedLat
[
1
];
this
.
lattices
[
connectedLat
[
1
]].
up
=
connectedLat
[
0
];
}
//第35和70,要枷锁元素,定制,2期去掉
if
(
this
.
chapter
==
35
||
this
.
chapter
==
70
)
{
var
locks
=
[
4
,
13
,
22
,
31
,
40
,
49
,
57
,
58
,
59
,
66
,
67
,
68
,
75
,
76
,
77
,
63
,
64
,
72
,
73
,
70
,
71
,
79
,
80
];
for
(
var
aaa
=
0
;
aaa
<
locks
.
length
;
aaa
++
)
{
this
.
lattices
[
locks
[
aaa
]].
element
.
isLock
=
true
;
}
}
//初始化完先检测死图
this
.
warningCop
=
Tool
.
dieMapCheck
(
this
.
lattices
);
if
(
!
this
.
warningCop
)
{
...
...
@@ -488,13 +495,7 @@ export default class MainScene extends Scene {
else
{
this
.
enableMouseEvt
(
true
);
}
//第35和70,要枷锁元素,定制,2期去掉
if
(
this
.
chapter
==
35
||
this
.
chapter
==
70
)
{
var
locks
=
[
4
,
13
,
22
,
31
,
40
,
49
,
57
,
58
,
59
,
66
,
67
,
68
,
75
,
76
,
77
,
63
,
64
,
72
,
73
,
70
,
71
,
79
,
80
];
for
(
var
aaa
=
0
;
aaa
<
locks
.
length
;
aaa
++
)
{
this
.
lattices
[
locks
[
aaa
]].
element
.
isLock
=
true
;
}
}
}
/**
...
...
egret/src/something/Chapters.ts
View file @
2620484c
...
...
@@ -1030,7 +1030,7 @@ export const Chapters: ChapterData[] = [
0
,
1
,
3
,
3
,
0
,
3
,
3
,
1
,
0
,
1
,
1
,
3
,
3
,
3
,
3
,
3
,
1
,
1
,
],
generateLats
:
[
0
,
1
,
2
,
3
,
5
,
6
,
7
,
8
],
generateLats
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
],
},
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
effectInitProbability
:
0.05
,
...
...
@@ -1064,7 +1064,7 @@ export const Chapters: ChapterData[] = [
3
,
3
,
5
,
3
,
3
,
3
,
5
,
3
,
3
,
3
,
3
,
5
,
3
,
3
,
3
,
5
,
3
,
3
,
],
generateLats
:
[
0
,
1
,
2
,
3
,
5
,
6
,
7
,
8
],
generateLats
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
],
},
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
effectInitProbability
:
0.05
,
...
...
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