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
3f8c001b
Commit
3f8c001b
authored
Oct 12, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0912c937
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
12 deletions
+10
-12
.DS_Store
egret/.DS_Store
+0
-0
index.html
egret/index.html
+4
-2
config.d.ts
egret/libs/config.d.ts
+1
-0
BoxListCtrl.ts
egret/src/startScene/BoxListCtrl.ts
+1
-2
GuideCtrl.ts
egret/src/startScene/GuideCtrl.ts
+2
-2
StartScene.ts
egret/src/startScene/StartScene.ts
+2
-6
No files found.
egret/.DS_Store
View file @
3f8c001b
No preview for this file type
egret/index.html
View file @
3f8c001b
...
...
@@ -41,10 +41,12 @@
<!-- <script src="default.thm.js"></script> -->
<script
src=
"output.js"
></script>
<script>
localStorage
.
clear
();
var
__t0__
=
Date
.
now
();
var
__debug__
=
1
;
var
__monkeyHandSize__
=
50
;
var
__boxMoveSpeed__
=
6
;
var
__monkeyHandSize__
=
30
;
var
__boxMoveSpeed__
=
1
;
var
__BOX_CREATE_INTERVAL__
=
60
*
4
;
var
__boxOpenState__
=
'resource/assets/startScene/openstate.json'
;
var
__boxmap__
=
{
coin
:{
award
:
0
,
skin
:
'resource/assets/startScene/coin.json'
,
offset
:
[
117
,
68
]
},
...
...
egret/libs/config.d.ts
View file @
3f8c001b
...
...
@@ -15,4 +15,5 @@ declare var __boxmap__: { [key: string]: IBoxItem };
declare
var
__bgUrl__
:
string
;
declare
var
__monkeyHandSize__
:
number
;
declare
var
__boxMoveSpeed__
:
number
;
declare
var
__BOX_CREATE_INTERVAL__
:
number
;
declare
var
__boxOpenState__
:
string
;
\ No newline at end of file
egret/src/startScene/BoxListCtrl.ts
View file @
3f8c001b
...
...
@@ -18,7 +18,6 @@ export default class BoxListCtrl {
this
.
_boxKeys
=
getBoxKeyList
();
}
private
BOX_CREATE_INTERVAL
=
60
*
1.2
;
private
_timer
:
number
;
private
_currentBoxIndex
=
0
;
private
_frameCounter
=
0
;
...
...
@@ -35,7 +34,7 @@ export default class BoxListCtrl {
onEnterFrame
()
{
this
.
_frameCounter
++
;
if
(
this
.
_frameCounter
>
this
.
BOX_CREATE_INTERVAL
)
{
if
(
this
.
_frameCounter
>
__BOX_CREATE_INTERVAL__
)
{
this
.
_frameCounter
=
0
;
this
.
createBox
();
this
.
_currentBoxIndex
++
;
...
...
egret/src/startScene/GuideCtrl.ts
View file @
3f8c001b
...
...
@@ -25,7 +25,6 @@ export default class GuideCtrl {
onPassMiddle
()
{
this
.
_main
.
boxListCtrl
.
pause
();
this
.
addGuide
();
this
.
_main
.
once
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onTouch
,
this
);
}
tips
;
...
...
@@ -38,6 +37,7 @@ export default class GuideCtrl {
await
this
.
showtipsAni
(
tips
);
await
this
.
showhandAni
(
hand
);
await
this
.
showguideAni
(
guide_dialog
);
this
.
_main
.
once
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onTouch
,
this
);
}
async
showtipsAni
(
texture
)
{
...
...
@@ -83,7 +83,7 @@ export default class GuideCtrl {
this
.
_main
.
topLay
.
removeChild
(
this
.
_guideTop
);
this
.
_guideTop
=
null
;
},
this
);
this
.
_main
.
doAction
();
this
.
_main
.
onTouch
();
this
.
_main
.
addTouchEvent
();
}
...
...
egret/src/startScene/StartScene.ts
View file @
3f8c001b
...
...
@@ -79,19 +79,15 @@ export default class StartScene extends Scene {
this
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onTouch
,
this
);
}
onTouch
()
{
this
.
_boxListCtrl
.
pause
();
this
.
doAction
();
}
private
_catchedBox
:
Box
;
private
_cathchedBoxOpenState
:
BoxOpenState
;
doAction
()
{
onTouch
()
{
this
.
_net
.
doAction
();
const
catchedBoxs
=
this
.
_boxListCtrl
.
boxs
.
filter
(
box
=>
Math
.
abs
(
box
.
y
-
Box
.
MIDDLE_Y
)
<
StartScene
.
NET_RANGE
);
const
catchedBox
=
catchedBoxs
[
0
];
if
(
catchedBox
)
{
//抓住了,box没有办法再过线消失
this
.
_boxListCtrl
.
pause
();
//先从boxlist中移除,使之不再受到boxlistCtrl的控制
this
.
_boxListCtrl
.
removeBoxFromList
(
catchedBox
);
this
.
_catchedBox
=
catchedBox
;
...
...
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