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
6ef16c25
Commit
6ef16c25
authored
Aug 22, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
56aea6af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
43 deletions
+59
-43
MainScene.ts
egret/src/mainScene/MainScene.ts
+56
-40
StartPanel.ts
egret/src/panels/StartPanel.ts
+2
-2
config.js
mock/config.js
+1
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
6ef16c25
...
...
@@ -533,6 +533,9 @@ export default class MainScene extends Scene {
this
.
boomBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_boomBtn
,
this
)
this
.
hammerBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_hammerBtn
,
this
)
this
.
stepBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_stepBtn
,
this
)
this
.
elementContainer
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
mouseDownE
,
this
);
this
.
elementContainer
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_MOVE
,
this
.
mouseMoveE
,
this
);
}
onEnterFrame
()
{
if
(
this
.
enableTouch
)
{
...
...
@@ -549,43 +552,43 @@ export default class MainScene extends Scene {
}
//出现交换提示
warningAni
()
{
if
(
this
.
isShowWarning
)
{
var
a
=
this
.
warningCop
[
0
];
var
b
=
this
.
warningCop
[
1
]
;
var
ax
=
a
.
x
;
var
ay
=
a
.
y
;
var
bx
=
b
.
x
;
var
by
=
b
.
y
;
egret
.
Tween
.
get
(
a
,
{
loop
:
true
}
)
.
to
({
x
:
(
bx
-
ax
)
/
10
+
ax
,
y
:
(
by
-
ay
)
/
10
+
ay
},
100
)
.
to
({
x
:
ax
,
y
:
ay
},
1
00
)
.
wait
(
2
00
)
.
to
({
x
:
(
bx
-
ax
)
/
10
+
ax
,
y
:
(
by
-
ay
)
/
10
+
ay
},
100
)
.
to
({
x
:
ax
,
y
:
ay
},
1
00
)
.
wait
(
400
)
egret
.
Tween
.
get
(
b
,
{
loop
:
true
}
)
.
to
({
x
:
(
ax
-
bx
)
/
10
+
bx
,
y
:
(
ay
-
by
)
/
10
+
by
},
100
)
.
to
({
x
:
bx
,
y
:
by
},
1
00
)
.
wait
(
2
00
)
.
to
({
x
:
(
ax
-
bx
)
/
10
+
bx
,
y
:
(
ay
-
by
)
/
10
+
by
},
100
)
.
to
({
x
:
bx
,
y
:
by
},
1
00
)
.
wait
(
400
)
}
else
{
egret
.
Tween
.
removeTweens
(
this
.
warningCop
[
0
]);
egret
.
Tween
.
removeTweens
(
this
.
warningCop
[
1
]);
//还原位置
var
a
=
this
.
warningCop
[
0
]
;
var
b
=
this
.
warningCop
[
1
];
var
aIndex
=
a
.
index
;
var
bIndex
=
b
.
index
;
var
ap
=
Tool
.
getPositionByIndex
(
aIndex
)
;
var
bp
=
Tool
.
getPositionByIndex
(
bIndex
)
;
a
.
x
=
ap
[
0
]
;
a
.
y
=
ap
[
1
]
;
b
.
x
=
b
p
[
0
];
b
.
y
=
b
p
[
1
];
}
var
a
=
this
.
warningCop
[
0
];
var
b
=
this
.
warningCop
[
1
];
var
ax
=
a
.
x
;
var
ay
=
a
.
y
;
var
bx
=
b
.
x
;
var
by
=
b
.
y
;
egret
.
Tween
.
get
(
a
,
{
loop
:
true
})
.
to
({
x
:
(
bx
-
ax
)
/
10
+
ax
,
y
:
(
by
-
ay
)
/
10
+
ay
},
100
)
.
to
({
x
:
ax
,
y
:
ay
},
100
)
.
wait
(
2
00
)
.
to
({
x
:
(
bx
-
ax
)
/
10
+
ax
,
y
:
(
by
-
ay
)
/
10
+
ay
},
1
00
)
.
to
({
x
:
ax
,
y
:
ay
},
100
)
.
wait
(
4
00
)
egret
.
Tween
.
get
(
b
,
{
loop
:
true
}
)
.
to
({
x
:
(
ax
-
bx
)
/
10
+
bx
,
y
:
(
ay
-
by
)
/
10
+
by
},
100
)
.
to
({
x
:
bx
,
y
:
by
},
100
)
.
wait
(
2
00
)
.
to
({
x
:
(
ax
-
bx
)
/
10
+
bx
,
y
:
(
ay
-
by
)
/
10
+
by
},
1
00
)
.
to
({
x
:
bx
,
y
:
by
},
100
)
.
wait
(
4
00
)
}
//重置移动提示
resetWarning
()
{
if
(
!
this
.
warningCop
)
return
egret
.
Tween
.
removeTweens
(
this
.
warningCop
[
0
]);
egret
.
Tween
.
removeTweens
(
this
.
warningCop
[
1
])
;
//还原位置
var
a
=
this
.
warningCop
[
0
]
;
var
b
=
this
.
warningCop
[
1
]
;
var
aIndex
=
a
.
index
;
var
bIndex
=
b
.
index
;
var
ap
=
Tool
.
getPositionByIndex
(
aIndex
)
;
var
bp
=
Tool
.
getPositionByIndex
(
bIndex
)
;
a
.
x
=
a
p
[
0
];
a
.
y
=
a
p
[
1
];
b
.
x
=
bp
[
0
];
b
.
y
=
bp
[
1
];
}
onTap_settingBtn
()
{
this
.
settingGroup
.
visible
=
!
this
.
settingGroup
.
visible
;
...
...
@@ -619,7 +622,7 @@ export default class MainScene extends Scene {
//购买弹框
PanelCtrl
.
instance
.
show
(
"Buy1"
)
}
else
{
//弹出蒙层,点蒙层关闭,点击任意元素,去掉容器的事件
}
}
onTap_hammerBtn
()
{
...
...
@@ -645,6 +648,19 @@ export default class MainScene extends Scene {
}
}
//使用道具逻辑
useProp
()
{
//去掉移动提示侦听
this
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
//去掉如果正在提示着的话
if
(
this
.
isShowWarning
)
{
this
.
isShowWarning
=
false
;
this
.
resetWarning
();
}
//
}
mouseDownE
(
e
:
egret
.
TextEvent
)
{
// if (!this.enableTouch) return
var
self
=
this
;
...
...
@@ -652,7 +668,7 @@ export default class MainScene extends Scene {
//去掉提示动画
this
.
isShowWarning
=
false
;
this
.
noActionCount
=
0
;
this
.
warningAni
();
this
.
resetWarning
();
// e.target.parent.isLock = true;
// e.target.parent.lockAni.play()
// var a=new ThreeCrossAni();
...
...
@@ -2039,7 +2055,7 @@ export default class MainScene extends Scene {
}
}
else
{
//失败直接显示未中奖
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_PRIZE_PANEL
,
{
starCount
:
this
.
scoreProgress
.
starCount
});
}
},
DataManager
.
ins
.
getData
(
"hc_doJoin"
).
data
,
...
...
egret/src/panels/StartPanel.ts
View file @
6ef16c25
...
...
@@ -51,13 +51,13 @@ export default class StartPanel extends Panel {
onTap_startBtn
()
{
this
.
hidePanel
();
this
[
'startBtn'
].
enabled
=
false
;
window
[
'getRST'
]();
if
(
window
[
'getRST'
])
window
[
'getRST'
]();
hdGameDoDojoin
((
success
)
=>
{
this
[
'startBtn'
].
enabled
=
true
;
if
(
success
)
{
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAIN_SCENE
,
{
chapter
:
this
.
_level
});
}
},
this
.
_level
)
},
this
.
_level
)
}
onTap_buy1btn
()
{
PanelCtrl
.
instance
.
show
(
'Buy1'
);
...
...
mock/config.js
View file @
6ef16c25
...
...
@@ -24,7 +24,7 @@ const config = {
'/hdtool/happyclear/submit'
:
{
data
:
'./happyclear/submit.json'
},
'/hdtool/happyclear/
submit
'
:
{
'/hdtool/happyclear/
doJoin
'
:
{
data
:
'./happyclear/doJoin.json'
},
'/aaw/music/category'
:
{
...
...
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