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
1eb5c963
Commit
1eb5c963
authored
Mar 27, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix20200330_' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into hotfix20200330_
parents
ace8917c
f8f6bc52
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
8 deletions
+38
-8
MainScene.ts
egret/src/mainScene/MainScene.ts
+0
-2
Element.ts
egret/src/something/class/Element.ts
+38
-6
No files found.
egret/src/mainScene/MainScene.ts
View file @
1eb5c963
...
@@ -1057,8 +1057,6 @@ export default class MainScene extends Scene {
...
@@ -1057,8 +1057,6 @@ export default class MainScene extends Scene {
this
.
soundBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_soundBtnn
,
this
)
this
.
soundBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_soundBtnn
,
this
)
this
.
musicBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_musicBtn
,
this
)
this
.
musicBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_musicBtn
,
this
)
this
.
quitBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_quitBtn
,
this
)
this
.
quitBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_quitBtn
,
this
)
}
}
removeEvents
()
{
removeEvents
()
{
...
...
egret/src/something/class/Element.ts
View file @
1eb5c963
...
@@ -45,6 +45,7 @@ export class Element extends eui.Component {
...
@@ -45,6 +45,7 @@ export class Element extends eui.Component {
fishCanEliFlag
:
boolean
;
fishCanEliFlag
:
boolean
;
cannoMoveClip
:
any
;
cannoMoveClip
:
any
;
cannoStat
:
number
[]
=
[
1
,
61
,
121
,
181
,
241
,
361
];
//尝试设置碰撞状态,如果之前被特效集中,那么可以设置碰撞状态。碰撞状态之后可以准备消除。
//尝试设置碰撞状态,如果之前被特效集中,那么可以设置碰撞状态。碰撞状态之后可以准备消除。
setFishNebFlag
()
{
setFishNebFlag
()
{
...
@@ -200,10 +201,10 @@ export class Element extends eui.Component {
...
@@ -200,10 +201,10 @@ export class Element extends eui.Component {
this
.
_cannoDir
=
cannodir
;
this
.
_cannoDir
=
cannodir
;
this
.
resetCannoStat
();
this
.
resetCannoStat
();
this
.
showImage
.
x
=
0
;
//
this.showImage.x = 0;
this
.
showImage
.
y
=
0
;
//
this.showImage.y = 0;
this
.
showImage
.
anchorOffsetX
=
this
.
showImage
.
width
/
2
;
//
this.showImage.anchorOffsetX = this.showImage.width / 2;
this
.
showImage
.
anchorOffsetY
=
this
.
showImage
.
height
/
2
;
//
this.showImage.anchorOffsetY = this.showImage.height / 2;
var
roaidx
:
number
;
var
roaidx
:
number
;
if
(
cannodir
==
forwardDirection
.
left
){
if
(
cannodir
==
forwardDirection
.
left
){
roaidx
=
0
;
roaidx
=
0
;
...
@@ -214,10 +215,11 @@ export class Element extends eui.Component {
...
@@ -214,10 +215,11 @@ export class Element extends eui.Component {
}
else
if
(
cannodir
==
forwardDirection
.
down
){
}
else
if
(
cannodir
==
forwardDirection
.
down
){
roaidx
=
3
;
roaidx
=
3
;
}
}
this
.
showImage
.
rotation
=
[
-
90
,
0
,
90
,
180
][
roaidx
];
this
.
cannobox
.
rotation
=
[
-
90
,
0
,
90
,
180
][
roaidx
];
}
}
changeShowCannoStat
(){
changeShowCannoStat
(){
this
.
cannolab
.
text
=
this
.
_cannoStat
+
""
;
this
.
cannolab
.
text
=
this
.
_cannoStat
+
""
;
this
.
cannoMoveClip
.
gotoAndPlay
(
this
.
cannoStat
[
this
.
_cannoStat
]);
}
}
checkCannoStat
(){
checkCannoStat
(){
if
(
this
.
_cannoStat
==
3
){
if
(
this
.
_cannoStat
==
3
){
...
@@ -441,6 +443,7 @@ export class Element extends eui.Component {
...
@@ -441,6 +443,7 @@ export class Element extends eui.Component {
this
.
cannobox
.
visible
=
this
.
cannolab
.
visible
=
type
==
ElementType
.
CANNO
;
this
.
cannobox
.
visible
=
this
.
cannolab
.
visible
=
type
==
ElementType
.
CANNO
;
this
.
showImage
.
visible
=
type
!=
ElementType
.
CANNO
;
this
.
showImage
.
visible
=
type
!=
ElementType
.
CANNO
;
this
.
cannolab
.
visible
=
false
;
//鸡蛋
//鸡蛋
if
(
type
==
ElementType
.
CHICKEN_EGG
)
{
if
(
type
==
ElementType
.
CHICKEN_EGG
)
{
this
.
chickenEgg
=
Pool
.
takeOut
(
RecoverName
.
CHICKEN_EGG
)
this
.
chickenEgg
=
Pool
.
takeOut
(
RecoverName
.
CHICKEN_EGG
)
...
@@ -485,10 +488,39 @@ export class Element extends eui.Component {
...
@@ -485,10 +488,39 @@ export class Element extends eui.Component {
console
.
log
(
"paotai"
,
this
.
cannoMoveClip
);
console
.
log
(
"paotai"
,
this
.
cannoMoveClip
);
//1空,121,181,241,361
// this.cannoMoveClip.gotoAndStop(1);
// this.cannoMoveClip.gotoAndStop(120);
// this.cannoMoveClip.gotoAndStop(120);
// this.cannoMoveClip.gotoAndStop(180);
this
.
cannoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
listenCn
,
this
);
this
.
cannoMoveClip
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
playComplete
,
this
);
});
});
}
}
}
}
// curframeidx:number = 1;
// testChangeMoveClip(num:number){
// this.curframeidx += num;
// this.cannoMoveClip.gotoAndStop(this.curframeidx);
// }
/**
* 炮台充能
* @param source
*/
listenCn
(){
var
statend
=
this
.
cannoStat
[
this
.
_cannoStat
+
1
];
if
(
this
.
cannoMoveClip
.
currentFrame
>=
statend
){
console
.
log
(
"炮台阶段动画播放完毕"
,
this
.
cannoMoveClip
.
currentFrame
);
this
.
cannoMoveClip
.
stop
();
}
}
/**
* 炮台动画播放一次完毕
*/
playComplete
(){
this
.
cannoMoveClip
.
stop
();
}
/**
/**
* 替换资源时,同时修改
* 替换资源时,同时修改
...
...
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