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
863ee601
Commit
863ee601
authored
Mar 30, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整炮台特效
parent
59ee086e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
16 deletions
+34
-16
canno1.svga
egret/resource/assets/svgas/canno1.svga
+0
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+8
-2
Element.ts
egret/src/something/class/Element.ts
+26
-14
No files found.
egret/resource/assets/svgas/canno1.svga
0 → 100644
View file @
863ee601
File added
egret/src/mainScene/MainScene.ts
View file @
863ee601
...
@@ -1299,7 +1299,13 @@ export default class MainScene extends Scene {
...
@@ -1299,7 +1299,13 @@ export default class MainScene extends Scene {
onTap_quitBtn
()
{
onTap_quitBtn
()
{
PanelCtrl
.
instance
.
show
(
"quit"
,
{
level
:
this
.
chapter
});
PanelCtrl
.
instance
.
show
(
"quit"
,
{
level
:
this
.
chapter
});
}
}
// testchangeShow(num:number){
// var cannoele = this.cannoArr[0].ele;
// var cur = cannoele.cannoMoveClip.currentFrame;
// cur += num*10;
// cannoele.cannoMoveClip.gotoAndStop(cur);
// console.log(cannoele.cannoMoveClip.currentFrame);
// }
onTap_boomBtn
()
{
onTap_boomBtn
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
7
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
7
));
if
(
this
.
propBtnCon
.
boomBtn
.
propNumShow
.
count
<=
0
)
{
if
(
this
.
propBtnCon
.
boomBtn
.
propNumShow
.
count
<=
0
)
{
...
@@ -2564,7 +2570,7 @@ export default class MainScene extends Scene {
...
@@ -2564,7 +2570,7 @@ export default class MainScene extends Scene {
canno
.
fireCanno
();
canno
.
fireCanno
();
var
cannoidx
=
canno
.
index
;
var
cannoidx
=
canno
.
index
;
var
cannoarridx
=
this
.
getCannoArrByIdx
(
cannoidx
);
var
cannoarridx
=
this
.
getCannoArrByIdx
(
cannoidx
);
this
.
selectPlayCannoEffect
(
cannoarridx
,
"cannoparticle"
);
//
this.selectPlayCannoEffect(cannoarridx,"cannoparticle");
// setTimeout(()=>{
// setTimeout(()=>{
// this.eliminate();
// this.eliminate();
...
...
egret/src/something/class/Element.ts
View file @
863ee601
...
@@ -47,8 +47,16 @@ export class Element extends eui.Component {
...
@@ -47,8 +47,16 @@ export class Element extends eui.Component {
cannoMoveClip
:
any
;
cannoMoveClip
:
any
;
// cannoCnClip:any;
// cannoCnClip:any;
cannoStat
:
number
[]
=
[
1
,
61
,
121
,
181
,
241
,
361
];
// cannoStat:number[] = [1,71,131,191,241,361];
/**
* 1--初始
* 71--一格能量
* 131--两格
* 191--三格
* 351--开始蓄力
* 441--开始发射,
* 481--结束
*/
//尝试设置碰撞状态,如果之前被特效集中,那么可以设置碰撞状态。碰撞状态之后可以准备消除。
//尝试设置碰撞状态,如果之前被特效集中,那么可以设置碰撞状态。碰撞状态之后可以准备消除。
setFishNebFlag
()
{
setFishNebFlag
()
{
if
(
this
.
_fishState
>
0
)
{
if
(
this
.
_fishState
>
0
)
{
...
@@ -216,7 +224,7 @@ export class Element extends eui.Component {
...
@@ -216,7 +224,7 @@ export class Element extends eui.Component {
if
(
this
.
cannoMoveClip
){
if
(
this
.
cannoMoveClip
){
var
endframe
:
number
;
var
endframe
:
number
;
var
curframe
:
number
=
this
.
cannoMoveClip
.
currentFrame
;
var
curframe
:
number
=
this
.
cannoMoveClip
.
currentFrame
;
if
(
curframe
>=
24
1
){
if
(
curframe
>=
35
1
){
if
(
_stat
==
3
||
_stat
==
2
){
if
(
_stat
==
3
||
_stat
==
2
){
return
;
return
;
}
}
...
@@ -226,16 +234,16 @@ export class Element extends eui.Component {
...
@@ -226,16 +234,16 @@ export class Element extends eui.Component {
endframe
=
1
;
endframe
=
1
;
}
else
if
(
_stat
==
1
){
}
else
if
(
_stat
==
1
){
curframe
=
61
;
curframe
=
61
;
endframe
=
12
1
;
endframe
=
7
1
;
}
else
if
(
_stat
==
2
){
}
else
if
(
_stat
==
2
){
curframe
=
121
curframe
=
121
endframe
=
1
8
1
;
endframe
=
1
3
1
;
}
else
if
(
_stat
==
3
){
}
else
if
(
_stat
==
3
){
curframe
=
181
;
curframe
=
181
;
endframe
=
24
1
;
endframe
=
19
1
;
}
else
if
(
_stat
==
4
){
}
else
if
(
_stat
==
4
){
curframe
=
24
1
;
curframe
=
35
1
;
endframe
=
36
1
;
endframe
=
48
1
;
}
}
// console.log("ele播放大炮动画",curframe,endframe,_stat);
// console.log("ele播放大炮动画",curframe,endframe,_stat);
// this.cannoMoveClip.gotoAndPlay(curframe,true);
// this.cannoMoveClip.gotoAndPlay(curframe,true);
...
@@ -513,17 +521,18 @@ export class Element extends eui.Component {
...
@@ -513,17 +521,18 @@ export class Element extends eui.Component {
return
;
return
;
}
}
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
var
svgas
=
[
"canno"
]
//,"cannofire","cannoparticle","cannolight"];
var
svgas
=
[
"canno
1
"
]
//,"cannofire","cannoparticle","cannolight"];
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
){
let
mvname
=
svgas
[
i
];
let
mvname
=
svgas
[
i
];
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
mvname
+
'.svga'
,(
videoItem
)
=>
{
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
mvname
+
'.svga'
,(
videoItem
)
=>
{
if
(
mvname
==
"canno"
){
if
(
mvname
==
"canno
1
"
){
this
.
cannoMoveClip
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
this
.
cannoMoveClip
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
// this.cannoMoveClip.lockStep = true;
// this.cannoMoveClip.lockStep = true;
var
mvwidth
=
10
2
;
var
mvwidth
=
8
2
;
var
mvheight
=
1
16
;
var
mvheight
=
1
32
;
this
.
cannoMoveClip
.
x
=
(
this
.
cannoboxwid
-
mvwidth
)
/
2
;
this
.
cannoMoveClip
.
x
=
(
this
.
cannoboxwid
-
mvwidth
)
/
2
;
this
.
cannoMoveClip
.
y
=
0
;
this
.
cannoMoveClip
.
y
=
-
mvheight
/
4
;
this
.
cannobox
.
addChild
(
this
.
cannoMoveClip
);
this
.
cannobox
.
addChild
(
this
.
cannoMoveClip
);
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
this
.
cannoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
this
.
cannoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
...
@@ -538,8 +547,11 @@ export class Element extends eui.Component {
...
@@ -538,8 +547,11 @@ export class Element extends eui.Component {
*/
*/
toFrameAni
(){
toFrameAni
(){
var
curframe
=
this
.
cannoMoveClip
.
currentFrame
;
var
curframe
=
this
.
cannoMoveClip
.
currentFrame
;
if
(
curframe
==
441
){
//发射光柱
this
.
mainScene
.
selectPlayCannoFire
(
this
.
index
);
}
if
(
curframe
>=
this
.
stopFrame
){
if
(
curframe
>=
this
.
stopFrame
){
if
(
this
.
stopFrame
==
36
1
){
if
(
this
.
stopFrame
==
48
1
){
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
return
;
return
;
// console.log("炮台发射完毕");
// console.log("炮台发射完毕");
...
...
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