Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game2048
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
熊东起
game2048
Commits
4ea56822
Commit
4ea56822
authored
Apr 24, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
5fd30067
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
TaoBaoNet.ts
src/TaoBaoNet.ts
+1
-1
TaskPanel.ts
src/panels/TaskPanel.ts
+2
-2
PlayScene.ts
src/scenes/playScene/PlayScene.ts
+1
-1
No files found.
src/TaoBaoNet.ts
View file @
4ea56822
...
@@ -264,7 +264,7 @@ const mockData = {
...
@@ -264,7 +264,7 @@ const mockData = {
{
{
"taskName"
:
"doFollowShop"
,
"taskName"
:
"doFollowShop"
,
"isComplete"
:
true
,
"isComplete"
:
true
,
"taskDrawStatus"
:
0
"taskDrawStatus"
:
0
//0未解锁,1待领取,3成功
},
},
{
{
"taskName"
:
"doInvite"
,
"taskName"
:
"doInvite"
,
...
...
src/panels/TaskPanel.ts
View file @
4ea56822
...
@@ -99,7 +99,7 @@ export class TaskPanel extends Panel {
...
@@ -99,7 +99,7 @@ export class TaskPanel extends Panel {
if
(
l
.
taskName
==
TaskType
.
doOrder
)
this
.
toShowMsg
=
1
//标记是没完成的
if
(
l
.
taskName
==
TaskType
.
doOrder
)
this
.
toShowMsg
=
1
//标记是没完成的
}
}
//三个状态,到时确认
//三个状态,到时确认
else
if
(
l
.
taskDrawStatus
==
0
)
{
//待领取状态
else
if
(
l
.
taskDrawStatus
==
1
)
{
//待领取状态
this
[
l
.
taskName
].
canGetStatus
=
true
;
this
[
l
.
taskName
].
canGetStatus
=
true
;
this
[
l
.
taskName
].
enabled
=
true
;
this
[
l
.
taskName
].
enabled
=
true
;
//额外判断下单,原先是1,且待领取状态,
//额外判断下单,原先是1,且待领取状态,
...
@@ -108,7 +108,7 @@ export class TaskPanel extends Panel {
...
@@ -108,7 +108,7 @@ export class TaskPanel extends Panel {
showToast
(
"成功完成下单任务,可领取道具大礼包"
)
showToast
(
"成功完成下单任务,可领取道具大礼包"
)
}
}
}
}
else
if
(
l
.
taskDrawStatus
==
1
)
{
//已领取状态
else
if
(
l
.
taskDrawStatus
==
3
)
{
//已领取状态
this
[
l
.
taskName
].
enabled
=
false
;
this
[
l
.
taskName
].
enabled
=
false
;
}
}
...
...
src/scenes/playScene/PlayScene.ts
View file @
4ea56822
...
@@ -934,7 +934,7 @@ export class PlayScene extends Scene {
...
@@ -934,7 +934,7 @@ export class PlayScene extends Scene {
// 随机生成基础元素
// 随机生成基础元素
generateOneElement
()
{
generateOneElement
()
{
// 随机生成一个数字 2or4
// 随机生成一个数字 2or4
let
randNumber
=
Math
.
random
()
<
0.
5
?
2
:
2048
let
randNumber
=
Math
.
random
()
<
0.
9
?
2
:
4
// 随机生成位置
// 随机生成位置
let
randNumberX
=
Math
.
floor
(
Math
.
random
()
*
4
)
let
randNumberX
=
Math
.
floor
(
Math
.
random
()
*
4
)
let
randNumberY
=
Math
.
floor
(
Math
.
random
()
*
4
)
let
randNumberY
=
Math
.
floor
(
Math
.
random
()
*
4
)
...
...
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