Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
games
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
熊东起
games
Commits
81154e79
Commit
81154e79
authored
Jan 15, 2021
by
熊东起
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
666
parent
65485d09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
GameIndex.ts
src/GameIndex.ts
+2
-1
App.js
test/src/App.js
+26
-2
No files found.
src/GameIndex.ts
View file @
81154e79
...
@@ -99,6 +99,7 @@ export class GameIndex extends GAME.WidgetBase {
...
@@ -99,6 +99,7 @@ export class GameIndex extends GAME.WidgetBase {
this
.
onMove
();
this
.
onMove
();
break
;
break
;
case
"refresh-data"
:
case
"refresh-data"
:
this
.
_index
=
0
;
GameMgr
.
options
.
curSteps
=
data
.
curSteps
;
GameMgr
.
options
.
curSteps
=
data
.
curSteps
;
GameMgr
.
GAME_STEP
=
data
.
gameSteps
;
GameMgr
.
GAME_STEP
=
data
.
gameSteps
;
GameMgr
.
SITE_NAME
=
data
.
siteName
;
GameMgr
.
SITE_NAME
=
data
.
siteName
;
...
@@ -190,7 +191,7 @@ export class GameIndex extends GAME.WidgetBase {
...
@@ -190,7 +191,7 @@ export class GameIndex extends GAME.WidgetBase {
/** 盖住移动的人物 */
/** 盖住移动的人物 */
private
_index
=
0
;
private
_index
=
0
;
onMaskPlayer
()
{
onMaskPlayer
()
{
if
(
this
.
player
.
y
<=
4
4
89
&&
this
.
_index
==
0
)
{
if
(
this
.
player
.
y
<=
4
5
89
&&
this
.
_index
==
0
)
{
this
.
_index
++
;
this
.
_index
++
;
this
.
gameMask
.
resetLayers
(
this
.
_index
);
this
.
gameMask
.
resetLayers
(
this
.
_index
);
}
else
if
(
this
.
player
.
y
<=
4400
&&
this
.
_index
==
1
)
{
}
else
if
(
this
.
player
.
y
<=
4400
&&
this
.
_index
==
1
)
{
...
...
test/src/App.js
View file @
81154e79
...
@@ -45,18 +45,42 @@ function App() {
...
@@ -45,18 +45,42 @@ function App() {
}
}
function
onClickButton
(
type
)
{
function
onClickButton
(
type
)
{
_widget
.
dispatchInEvent
(
type
,{
curSteps
:
220000
,
endSteps
:
350000
})
switch
(
type
)
{
case
"game-start"
:
_widget
.
dispatchInEvent
(
type
,
{
curSteps
:
0
,
endSteps
:
200000
})
break
;
case
"refresh-data"
:
_widget
.
dispatchInEvent
(
type
,
{
curSteps
:
0
,
gameSteps
:
[
0
,
10000
,
30000
,
100000
,
200000
,
350000
],
siteName
:
[
"宝石山"
,
"金猪存钱罐"
,
"断桥残雪"
,
"平湖秋月"
,
"拆红包"
,
"苏堤春晓"
,
"曲苑风荷"
,
"打病毒"
,
"双峰插云"
],
linkList
:
[]
});
break
;
}
}
}
return
(
return
(
<
div
className
=
"App"
>
<
div
className
=
"App"
>
<
div
className
=
"control-bar"
>
<
div
className
=
"control-bar"
>
<
button
onClick
=
{
e
=>
onClickButton
(
'refresh-data'
)}
>
refresh
-
data
<
/button
>
<
button
onClick
=
{
e
=>
onClickButton
(
'game-start'
)}
>
GO
<
/button
>
<
button
onClick
=
{
e
=>
onClickButton
(
'game-start'
)}
>
GO
<
/button
>
<
/div
>
<
/div
>
<
CanvasWidget
className
=
"canvas-widget"
widgetFactory
=
{
WalkCom
}
widgetConfig
=
{
widgetConfig
}
<
CanvasWidget
className
=
"canvas-widget"
widgetFactory
=
{
WalkCom
}
widgetConfig
=
{
widgetConfig
}
onEvent
=
{
onEvent
}
onEvent
=
{
onEvent
}
onReady
=
{
onReady
}
onAssetsProcess
=
{
onAssetsProcess
}
onReady
=
{
onReady
}
onAssetsProcess
=
{
onAssetsProcess
}
onAssetsComplete
=
{
onAssetsComplete
}
/>
onAssetsComplete
=
{
onAssetsComplete
}
/
>
<
/div
>
<
/div
>
);
);
}
}
...
...
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