Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
29d62bbc
Commit
29d62bbc
authored
Oct 23, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5502e65c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
+17
-11
index.html
egret/index.html
+1
-1
ABNetManager.ts
egret/libs/tc/manager/ABNetManager.ts
+2
-2
guide_tips.png
egret/resource/assets/startScene/guide/guide_tips.png
+0
-0
StartScene.ts
egret/src/startScene/StartScene.ts
+9
-8
getBoxKeyList.ts
egret/src/startScene/data/getBoxKeyList.ts
+5
-0
No files found.
egret/index.html
View file @
29d62bbc
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<script
src=
"libs/downloadApp.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<script>
<script>
//
localStorage.clear();
localStorage
.
clear
();
var
__t0__
=
Date
.
now
();
var
__t0__
=
Date
.
now
();
var
__debug__
=
1
;
var
__debug__
=
1
;
var
__mode__
=
2
;
var
__mode__
=
2
;
...
...
egret/libs/tc/manager/ABNetManager.ts
View file @
29d62bbc
...
@@ -31,7 +31,7 @@ export abstract class ABNetManager {
...
@@ -31,7 +31,7 @@ export abstract class ABNetManager {
if
(
net
.
addUrl
)
{
if
(
net
.
addUrl
)
{
realUrl
+=
net
.
addUrl
;
realUrl
+=
net
.
addUrl
;
}
}
console
.
log
(
`[send][
${
net
.
uri
}
]
${
JSON
.
stringify
(
net
.
param
)}
`
)
//
console.log(`[send][${net.uri}]${JSON.stringify(net.param)}`)
window
[
'$'
].
ajax
({
window
[
'$'
].
ajax
({
type
:
net
.
type
,
type
:
net
.
type
,
// url: realUrl + gTime,
// url: realUrl + gTime,
...
@@ -40,7 +40,7 @@ export abstract class ABNetManager {
...
@@ -40,7 +40,7 @@ export abstract class ABNetManager {
data
:
net
.
param
,
data
:
net
.
param
,
async
:
true
,
async
:
true
,
success
:
(
result
)
=>
{
success
:
(
result
)
=>
{
console
.
log
(
`[success][
${
net
.
uri
}
]
${
JSON
.
stringify
(
result
)}
`
)
//
console.log(`[success][${net.uri}]${JSON.stringify(result)}`)
this
.
onResponse
(
net
,
result
);
this
.
onResponse
(
net
,
result
);
},
},
error
:
(
message
)
=>
{
error
:
(
message
)
=>
{
...
...
egret/resource/assets/startScene/guide/guide_tips.png
View replaced file @
5502e65c
View file @
29d62bbc
2.84 KB
|
W:
|
H:
4.49 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/src/startScene/StartScene.ts
View file @
29d62bbc
...
@@ -61,13 +61,7 @@ export default class StartScene extends Scene {
...
@@ -61,13 +61,7 @@ export default class StartScene extends Scene {
this
.
_keyResCounter
++
;
this
.
_keyResCounter
++
;
this
.
_guideCtrl
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
checkKeyResource
,
this
);
this
.
_guideCtrl
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
checkKeyResource
,
this
);
this
.
_guideCtrl
.
start
();
this
.
_guideCtrl
.
start
();
this
.
_guideCtrl
.
enableInteract
();
const
net
=
new
Net
();
this
.
getLayer
(
LayerTypes
.
net
).
addChild
(
net
);
this
.
_net
=
net
;
this
.
_keyResCounter
++
;
net
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
checkKeyResource
,
this
);
if
(
__debug__
)
{
if
(
__debug__
)
{
this
.
_debug
=
new
debug
(
this
.
getLayer
(
LayerTypes
.
top
));
this
.
_debug
=
new
debug
(
this
.
getLayer
(
LayerTypes
.
top
));
...
@@ -83,9 +77,16 @@ export default class StartScene extends Scene {
...
@@ -83,9 +77,16 @@ export default class StartScene extends Scene {
this
.
_keyResCounter
--
;
this
.
_keyResCounter
--
;
if
(
this
.
_keyResCounter
!=
0
)
return
;
if
(
this
.
_keyResCounter
!=
0
)
return
;
const
t
=
Date
.
now
()
-
__t0__
;
console
.
log
(
`关键元素完全时间:
${
t
/
1000
}
s`
);
const
t
=
Date
.
now
()
-
__t0__
;
console
.
log
(
`关键元素完全时间:
${
t
/
1000
}
s`
);
this
.
_guideCtrl
.
enableInteract
();
this
.
_kids
=
new
Kids
();
this
.
_kids
=
new
Kids
();
this
.
getLayer
(
LayerTypes
.
kids
).
addChild
(
this
.
_kids
);
this
.
getLayer
(
LayerTypes
.
kids
).
addChild
(
this
.
_kids
);
this
.
getLayer
(
LayerTypes
.
river
).
addChild
(
new
River
());
this
.
getLayer
(
LayerTypes
.
river
).
addChild
(
new
River
());
const
net
=
new
Net
();
this
.
getLayer
(
LayerTypes
.
net
).
addChild
(
net
);
this
.
_net
=
net
;
}
}
addTouchEvent
()
{
addTouchEvent
()
{
...
@@ -105,7 +106,7 @@ export default class StartScene extends Scene {
...
@@ -105,7 +106,7 @@ export default class StartScene extends Scene {
_isBoxFlying
:
boolean
;
_isBoxFlying
:
boolean
;
doAction
()
{
doAction
()
{
this
.
_net
.
doAction
();
this
.
_net
&&
this
.
_net
.
doAction
();
if
(
this
.
_kids
)
this
.
_kids
.
doAction
();
if
(
this
.
_kids
)
this
.
_kids
.
doAction
();
const
catchedBoxs
=
this
.
_boxListCtrl
.
boxs
.
filter
(
const
catchedBoxs
=
this
.
_boxListCtrl
.
boxs
.
filter
(
box
=>
Math
.
abs
(
box
.
y
-
Box
.
MIDDLE_Y
)
<
StartScene
.
NET_RANGE
);
box
=>
Math
.
abs
(
box
.
y
-
Box
.
MIDDLE_Y
)
<
StartScene
.
NET_RANGE
);
...
...
egret/src/startScene/data/getBoxKeyList.ts
View file @
29d62bbc
...
@@ -5,5 +5,10 @@ export const getBoxKeyList = () => {
...
@@ -5,5 +5,10 @@ export const getBoxKeyList = () => {
list
.
push
(
key
);
list
.
push
(
key
);
}
}
}
}
const
str
=
'goldenbox'
;
const
index
=
list
.
indexOf
(
str
);
if
(
index
!=-
1
)
list
.
splice
(
index
,
1
);
list
.
unshift
(
str
);
return
list
;
return
list
;
}
}
\ 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