Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
eslotsys-game-nuxt
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
毛线
eslotsys-game-nuxt
Commits
cc654f5b
Commit
cc654f5b
authored
Jul 20, 2023
by
毛线
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto bug
parent
25c2d3a6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
keyboard.vue
pages/index/game/components/keyboard.vue
+18
-9
index.vue
pages/index/game/index.vue
+1
-1
No files found.
pages/index/game/components/keyboard.vue
View file @
cc654f5b
...
@@ -135,6 +135,15 @@ export default {
...
@@ -135,6 +135,15 @@ export default {
}
}
return
isAuto
return
isAuto
},
},
// play按钮的value
buttonValue
()
{
return
this
.
playBtn
.
buttonValue
},
},
created
()
{
if
(
this
.
buttonValue
)
{
this
.
network
().
autoPlay
(
'release'
)
// 进入游戏的时候,先暂停之前的auto
}
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
...
@@ -177,23 +186,22 @@ export default {
...
@@ -177,23 +186,22 @@ export default {
this
.
network
().
upPoint
({
type
:
2
})
this
.
network
().
upPoint
({
type
:
2
})
},
},
play
:
()
=>
{
play
:
()
=>
{
const
{
playBtn
}
=
this
const
{
buttonValue
}
=
this
this
.
network
().
button
({
buttonValue
:
playBtn
.
buttonValue
})
this
.
network
().
button
({
buttonValue
})
},
},
player
:
({
x16
,
y16
})
=>
{
player
:
({
x16
,
y16
})
=>
{
this
.
network
().
touch
({
x
:
x16
,
y
:
y16
})
this
.
network
().
touch
({
x
:
x16
,
y
:
y16
})
},
},
// 设置自动play时间
// 设置自动play时间
setAutoPlay
:
(
time
)
=>
{
setAutoPlay
:
(
time
)
=>
{
if
(
time
===
-
1
)
{
if
(
time
===
-
1
)
{
// 无限时间
this
.
autoTime
=
-
1
this
.
autoTime
=
-
1
this
.
network
().
autoPlay
(
'release'
)
}
else
{
// 有限时间
}
else
{
this
.
autoTime
=
time
*
60
this
.
autoTime
=
time
*
60
this
.
init
().
autoTime
()
this
.
init
().
autoTime
()
}
this
.
network
().
autoPlay
(
'press'
)
this
.
network
().
autoPlay
(
'press'
)
this
.
showTime
=
false
this
.
showTime
=
false
}
},
},
cancelAuto
:
()
=>
{
cancelAuto
:
()
=>
{
this
.
cancelAutoClick
++
this
.
cancelAutoClick
++
...
@@ -288,11 +296,12 @@ export default {
...
@@ -288,11 +296,12 @@ export default {
})
})
},
},
autoPlay
:
(
methodName
)
=>
{
autoPlay
:
(
methodName
)
=>
{
const
{
id
,
playBtn
,
}
=
this
const
{
id
,
buttonValue
,
}
=
this
console
.
log
(
'buttonValue'
,
buttonValue
)
const
params
=
{
const
params
=
{
deviceId
:
id
,
deviceId
:
id
,
methodName
,
methodName
,
key
:
playBtn
.
buttonValue
,
key
:
buttonValue
,
}
}
this
.
$request
({
this
.
$request
({
...
...
pages/index/game/index.vue
View file @
cc654f5b
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</div>
</div>
</div>
</div>
<!-- 底部键盘 -->
<!-- 底部键盘 -->
<Keyboard
:id=
"id"
:device-button-panel=
"deviceButtonPanel"
/>
<Keyboard
v-if=
"deviceButtonPanel.id"
:id=
"id"
:device-button-panel=
"deviceButtonPanel"
/>
</div>
</div>
</
template
>
</
template
>
...
...
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