Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
442597b8
Commit
442597b8
authored
Oct 30, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
de0618a7
cecf8f87
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
45 deletions
+18
-45
main2.tmproject
egret/resource/TextureMerger/main2.tmproject
+1
-1
scratch.tmproject
egret/resource/TextureMerger/scratch.tmproject
+1
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+2
-10
MapScene.ts
egret/src/mapScene/MapScene.ts
+3
-2
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+2
-3
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+0
-19
scratchGetTaskInfo.json
mock/happyclear/scratchGetTaskInfo.json
+9
-9
No files found.
egret/resource/TextureMerger/main2.tmproject
View file @
442597b8
This diff is collapsed.
Click to expand it.
egret/resource/TextureMerger/scratch.tmproject
View file @
442597b8
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png","../assets/scratch/scratch_mask.png"]}
\ No newline at end of file
\ No newline at end of file
egret/src/mainScene/MainScene.ts
View file @
442597b8
...
@@ -163,8 +163,6 @@ export default class MainScene extends Scene {
...
@@ -163,8 +163,6 @@ export default class MainScene extends Scene {
oneStepScore
:
number
;
oneStepScore
:
number
;
//果冻有消除的标记;
//果冻有消除的标记;
jellyBrokenMark
:
boolean
;
jellyBrokenMark
:
boolean
;
//有毛球消失的动画时,延迟掉落时间
hairballBrokenMark
:
boolean
;
/**
/**
* 判断连通的状态
* 判断连通的状态
* 1表示存在小列连通到大列,从右往左遍历
* 1表示存在小列连通到大列,从右往左遍历
...
@@ -1710,15 +1708,13 @@ export default class MainScene extends Scene {
...
@@ -1710,15 +1708,13 @@ export default class MainScene extends Scene {
this
.
eliminate
();
this
.
eliminate
();
},
200
)
},
200
)
}
else
{
}
else
{
//没有可消除元素,执行掉落,又加定制,因为毛球的消失动画比较长 650ms,用500
//没有可消除元素,执行掉落,
var
time
=
this
.
hairballBrokenMark
?
500
:
200
;
this
.
hairballBrokenMark
=
false
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
fall
(()
=>
{
this
.
fall
(()
=>
{
//掉落停止回调
//掉落停止回调
this
.
fallCallback
();
this
.
fallCallback
();
});
});
},
time
)
},
200
)
}
}
}
}
/**
/**
...
@@ -2053,8 +2049,6 @@ export default class MainScene extends Scene {
...
@@ -2053,8 +2049,6 @@ export default class MainScene extends Scene {
ele
.
setState
(
StateType
.
HAIRBALLGREY
,
false
)
ele
.
setState
(
StateType
.
HAIRBALLGREY
,
false
)
//算个数
//算个数
this
.
goElementTarget
(
ElementType
.
HAIRBALLGREY
,
[
ele
.
x
,
ele
.
y
]);
this
.
goElementTarget
(
ElementType
.
HAIRBALLGREY
,
[
ele
.
x
,
ele
.
y
]);
//标记有毛球消失
this
.
hairballBrokenMark
=
true
}
}
//有黑色毛球的,一次眩晕,两次消失
//有黑色毛球的,一次眩晕,两次消失
else
if
(
ele
.
hasState
(
StateType
.
HAIRBALLGREY
))
{
else
if
(
ele
.
hasState
(
StateType
.
HAIRBALLGREY
))
{
...
@@ -2071,8 +2065,6 @@ export default class MainScene extends Scene {
...
@@ -2071,8 +2065,6 @@ export default class MainScene extends Scene {
ele
.
setState
(
StateType
.
HAIRBALLBLACK
,
false
)
ele
.
setState
(
StateType
.
HAIRBALLBLACK
,
false
)
//算个数
//算个数
this
.
goElementTarget
(
ElementType
.
HAIRBALLBLACK
,
[
ele
.
x
,
ele
.
y
]);
this
.
goElementTarget
(
ElementType
.
HAIRBALLBLACK
,
[
ele
.
x
,
ele
.
y
]);
//标记有毛球消失
this
.
hairballBrokenMark
=
true
}
}
}
}
//如果有特效,存下
//如果有特效,存下
...
...
egret/src/mapScene/MapScene.ts
View file @
442597b8
...
@@ -26,6 +26,7 @@ import ScratchIcon from "./icon/ScratchIcon";
...
@@ -26,6 +26,7 @@ import ScratchIcon from "./icon/ScratchIcon";
import
TurntableIcon
from
"./icon/TurntableIcon"
;
import
TurntableIcon
from
"./icon/TurntableIcon"
;
let
doHelpFlag
=
false
;
let
doHelpFlag
=
false
;
let
doScratchHelpFlag
=
false
;
// let adTag = false;
// let adTag = false;
export
default
class
MapScene
extends
Scene
{
export
default
class
MapScene
extends
Scene
{
static
adData
;
static
adData
;
...
@@ -43,12 +44,12 @@ export default class MapScene extends Scene {
...
@@ -43,12 +44,12 @@ export default class MapScene extends Scene {
sendInvite
()
{
sendInvite
()
{
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
);
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
);
if
(
!
code
)
return
;
if
(
!
code
)
return
;
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
if
(
!
dojoin
)
return
;
if
(
doHelpFlag
)
{
if
(
doHelpFlag
)
{
return
;
return
;
}
}
if
(
code
.
indexOf
(
"12345678"
)
==
-
1
){
// 邀请有礼
if
(
code
.
indexOf
(
"12345678"
)
==
-
1
){
// 邀请有礼
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
if
(
!
dojoin
)
return
;
NetManager
.
ins
.
doHelp
((
success
,
res
)
=>
{
NetManager
.
ins
.
doHelp
((
success
,
res
)
=>
{
doHelpFlag
=
true
;
doHelpFlag
=
true
;
switch
(
true
)
{
switch
(
true
)
{
...
...
egret/src/mapScene/icon/ScratchIcon.ts
View file @
442597b8
...
@@ -72,17 +72,16 @@ export default class ScratchIcon extends IconBase {
...
@@ -72,17 +72,16 @@ export default class ScratchIcon extends IconBase {
return
;
return
;
}
}
let
status
=
res
.
data
.
taskStatus
;
let
status
=
res
.
data
.
taskStatus
;
let
data
=
Utils
.
deepClone
(
res
.
data
);
switch
(
true
)
{
switch
(
true
)
{
case
(
status
==
0
):
// 当前无任务(一般icon不会出现),拦截
case
(
status
==
0
):
// 当前无任务(一般icon不会出现),拦截
break
;
break
;
case
(
status
==
1
):
// 当前任务进行中 打开任务面板
case
(
status
==
1
):
// 当前任务进行中 打开任务面板
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
// await wait(100);
// await wait(100);
let
data
=
Utils
.
deepClone
(
res
.
data
);
data
.
mv
=
mv
;
data
.
mv
=
mv
;
PanelCtrl
.
instance
.
show
(
'scratch'
,
data
);
PanelCtrl
.
instance
.
show
(
'scratch'
,
data
);
});
});
// PanelCtrl.instance.show('scratch', res.data);
break
;
break
;
case
(
status
==
2
):
// 当前任务完成待领奖 请求领奖接口
case
(
status
==
2
):
// 当前任务完成待领奖 请求领奖接口
NetManager
.
ins
.
scratchTakePrize
((
success
,
res
)
=>
{
NetManager
.
ins
.
scratchTakePrize
((
success
,
res
)
=>
{
...
@@ -92,7 +91,7 @@ export default class ScratchIcon extends IconBase {
...
@@ -92,7 +91,7 @@ export default class ScratchIcon extends IconBase {
}
}
return
;
return
;
}
}
PanelCtrl
.
instance
.
show
(
"scratchPrize"
,
res
.
data
);
PanelCtrl
.
instance
.
show
(
"scratchPrize"
,
data
);
},
res
.
data
.
scratchCardTaskId
);
},
res
.
data
.
scratchCardTaskId
);
break
;
break
;
...
...
egret/src/panels/ScratchPanel.ts
View file @
442597b8
...
@@ -188,25 +188,6 @@ export default class ScratchPanel extends Panel {
...
@@ -188,25 +188,6 @@ export default class ScratchPanel extends Panel {
let
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
let
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
let
_duration
=
1000
*
dProgress
/
100
;
// 算出变化的时间
let
_duration
=
1000
*
dProgress
/
100
;
// 算出变化的时间
egret
.
Tween
.
get
(
this
[
"progress"
]).
to
({
width
:
_width
},
_duration
);
egret
.
Tween
.
get
(
this
[
"progress"
]).
to
({
width
:
_width
},
_duration
);
let
i
=
new
eui
.
Image
();
// if(progress >= 100) {
// this["scratch_progress"].visible = false;
// } else if(progress >= 98 && progress < 100) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_98_png";
// } else if(progress >= 96 && progress < 98) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_96_png";
// } else if(progress >= 94 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_94_png";
// } else if(progress >= 92 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_92_png";
// } else if(progress < 92) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_90_png";
// }
}
}
private
setWXShareTip
()
{
private
setWXShareTip
()
{
...
...
mock/happyclear/scratchGetTaskInfo.json
View file @
442597b8
...
@@ -2,17 +2,17 @@
...
@@ -2,17 +2,17 @@
"success"
:
true
,
"success"
:
true
,
"code"
:
"0000000000"
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"desc"
:
"OK"
,
"timestamp"
:
15724
05066301
,
"timestamp"
:
15724
20059060
,
"data"
:
{
"data"
:
{
"scratchCardTaskId"
:
1
,
"scratchCardTaskId"
:
3
,
"taskStatus"
:
1
,
"taskStatus"
:
2
,
"prizeImage"
:
"//yun.dui88.com/images/201910/9u6nk8sjt8.jpg"
,
"prizeImage"
:
"//yun.dui88.com/images/201910/9u6nk8sjt8.jpg"
,
"currentTime"
:
15724
0506629
0
,
"currentTime"
:
15724
2005906
0
,
"endTime"
:
157249
1337
000
,
"endTime"
:
157249
3282
000
,
"completePercent"
:
"
96
"
,
"completePercent"
:
"
100
"
,
"remainPercent"
:
"
9.
0"
,
"remainPercent"
:
"0"
,
"totalNeedCount"
:
1
,
"totalNeedCount"
:
1
,
"helpedCount"
:
0
,
"helpedCount"
:
1
,
"avatarList"
:
[]
"avatarList"
:
null
}
}
}
}
\ No newline at end of file
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