Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douyin_xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
douyin_xiaoxiaole
Commits
cac65637
Commit
cac65637
authored
Jul 12, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
1d38a7a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
douyin_xiaoxiaole.js
assets/douyin_xiaoxiaole/scene/douyin_xiaoxiaole.js
+9
-9
No files found.
assets/douyin_xiaoxiaole/scene/douyin_xiaoxiaole.js
View file @
cac65637
...
@@ -117,8 +117,7 @@ cc.Class({
...
@@ -117,8 +117,7 @@ cc.Class({
if
(
this
.
isGameStart
!==
true
)
{
if
(
this
.
isGameStart
!==
true
)
{
const
res
=
await
asyncCallNetworkApiGet
(
'
/api/douyin/v1/getwords
'
,
{
roomid
:
this
.
roomId
,
uid
:
this
.
uid
});
const
res
=
await
asyncCallNetworkApiGet
(
'
/api/douyin/v1/getwords
'
,
{
roomid
:
this
.
roomId
,
uid
:
this
.
uid
});
this
.
data
=
JSON
.
parse
(
res
);
this
.
data
=
JSON
.
parse
(
res
);
this
.
preloadItem
()
this
.
preloadItem
();
cc
.
find
(
`Canvas/ready`
).
active
=
false
;
this
.
isGameStart
=
true
;
this
.
isGameStart
=
true
;
}
}
}
else
{
}
else
{
...
@@ -558,6 +557,8 @@ cc.Class({
...
@@ -558,6 +557,8 @@ cc.Class({
loadEnd
()
{
loadEnd
()
{
this
.
initData
();
this
.
initData
();
this
.
initView
();
this
.
initView
();
cc
.
find
(
`Canvas/ready`
).
active
=
false
;
},
},
...
@@ -1064,7 +1065,6 @@ cc.Class({
...
@@ -1064,7 +1065,6 @@ cc.Class({
return
return
}
}
console
.
log
(
'
item.letter:
'
,
item
.
letter
);
this
.
canTouch
=
false
;
this
.
canTouch
=
false
;
const
isRightLetter
=
this
.
checkLetterIsRight
(
item
.
letter
);
const
isRightLetter
=
this
.
checkLetterIsRight
(
item
.
letter
);
...
@@ -1084,12 +1084,17 @@ cc.Class({
...
@@ -1084,12 +1084,17 @@ cc.Class({
const
popDisTime
=
0.03
;
const
popDisTime
=
0.03
;
let
popTime
=
(
this
.
curPopArr
.
length
)
*
popDisTime
;
let
popTime
=
(
this
.
curPopArr
.
length
)
*
popDisTime
;
let
tempScore
=
0
;
for
(
let
i
=
0
;
i
<
this
.
curPopArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
curPopArr
.
length
;
i
++
)
{
tempScore
+=
(
i
+
1
);
this
.
delayCall
(
i
*
popDisTime
,
()
=>
{
this
.
delayCall
(
i
*
popDisTime
,
()
=>
{
this
.
itemPop
(
this
.
curPopArr
[
i
],
i
+
1
);
this
.
itemPop
(
this
.
curPopArr
[
i
],
i
+
1
);
})
})
}
}
if
(
tempScore
)
{
// 上报成绩
asyncCallNetworkApiGet
(
'
/api/douyin/v1/score
'
,
{
roomid
:
this
.
roomId
,
uid
:
this
.
uid
,
score
:
tempScore
}).
then
(()
=>
{});
}
this
.
canTouch
=
false
;
this
.
canTouch
=
false
;
this
.
delayCall
(
popTime
,
()
=>
{
this
.
delayCall
(
popTime
,
()
=>
{
...
@@ -1285,7 +1290,6 @@ cc.Class({
...
@@ -1285,7 +1290,6 @@ cc.Class({
fillEmptyItem
()
{
fillEmptyItem
()
{
console
.
log
(
'
in fillEmptyItem
'
)
this
.
fillItemObj
=
{};
this
.
fillItemObj
=
{};
this
.
moveItemArr
=
[];
this
.
moveItemArr
=
[];
...
@@ -1309,22 +1313,18 @@ cc.Class({
...
@@ -1309,22 +1313,18 @@ cc.Class({
}
else
{
}
else
{
console
.
log
(
'
tileObj[X][Y].item:
'
,
tileObj
[
X
][
Y
].
item
);
if
(
moveCount
>
0
)
{
if
(
moveCount
>
0
)
{
this
.
moveItemArr
.
push
({
item
:
tileObj
[
X
][
Y
].
item
,
moveCount
});
this
.
moveItemArr
.
push
({
item
:
tileObj
[
X
][
Y
].
item
,
moveCount
});
}
}
}
}
}
}
console
.
log
(
'
moveCount:
'
,
moveCount
);
if
(
moveCount
>
0
)
{
if
(
moveCount
>
0
)
{
this
.
needCreateArr
.
push
({
X
,
count
:
moveCount
})
this
.
needCreateArr
.
push
({
X
,
count
:
moveCount
})
}
}
}
}
console
.
log
(
"
this.moveItemArr:
"
,
this
.
moveItemArr
);
this
.
moveItem
();
this
.
moveItem
();
this
.
fillItem
();
this
.
fillItem
();
},
},
...
...
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