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
bf9e686d
Commit
bf9e686d
authored
Mar 30, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix20200330_' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into hotfix20200330_
parents
5ea37125
863ee601
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
35 deletions
+59
-35
ele39.png
egret/resource/assets/mainScene/ele39.png
+0
-0
canno1.svga
egret/resource/assets/svgas/canno1.svga
+0
-0
cannoblock.svga
egret/resource/assets/svgas/cannoblock.svga
+0
-0
cannofire1.svga
egret/resource/assets/svgas/cannofire1.svga
+0
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+33
-21
Element.ts
egret/src/something/class/Element.ts
+26
-14
No files found.
egret/resource/assets/mainScene/ele39.png
View replaced file @
5ea37125
View file @
bf9e686d
2.37 KB
|
W:
|
H:
7.18 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/svgas/canno1.svga
0 → 100644
View file @
bf9e686d
File added
egret/resource/assets/svgas/cannoblock.svga
0 → 100644
View file @
bf9e686d
File added
egret/resource/assets/svgas/cannofire1.svga
0 → 100644
View file @
bf9e686d
File added
egret/src/mainScene/MainScene.ts
View file @
bf9e686d
...
...
@@ -414,7 +414,7 @@ export default class MainScene extends Scene {
//如果有节日的加
if
(
this
.
festivalTarget
)
svgas
.
push
(
"redBombLight"
);
//到时候用炮台石头的替换todo
svgas
.
push
(
"canno"
);
svgas
.
push
(
"canno
block
"
);
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
if
(
movieClips
[
svgas
[
i
]])
continue
;
...
...
@@ -423,15 +423,16 @@ export default class MainScene extends Scene {
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
mv
.
lockStep
=
true
;
if
(
svgas
[
i
]
==
"canno"
){
if
(
svgas
[
i
]
==
"canno
block
"
){
// console.log("石头破裂动画",mv);
}
else
if
(
svgas
[
i
]
!=
"bonusTime"
)
{
if
(
svgas
[
i
]
!=
"bonusTime"
)
{
mv
.
x
=
(
750
-
520
)
/
2
;
mv
.
y
=
500
;
}
mv
.
stop
();
movieClips
[
svgas
[
i
]]
=
mv
;
let
fun
;
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
e
.
target
.
stop
()
...
...
@@ -439,7 +440,6 @@ export default class MainScene extends Scene {
e
.
target
.
parent
.
removeChild
(
e
.
target
)
}
},
this
)
movieClips
[
svgas
[
i
]]
=
mv
;
},
function
(
error
)
{
// alert(error.message);
})
...
...
@@ -452,7 +452,7 @@ export default class MainScene extends Scene {
var
resPath
=
getResPath
();
this
.
cannoEffect
=
new
Array
();
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
var
svgas
=
[
"cannofire"
,
"cannolight"
,
"cannoparticle"
];
//新增大炮的动画
var
svgas
=
[
"cannofire
1
"
,
"cannolight"
,
"cannoparticle"
];
//新增大炮的动画
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
icanno
:
Element
=
arr
[
i
].
ele
;
...
...
@@ -487,12 +487,13 @@ export default class MainScene extends Scene {
// mv.lockStep = true;
mv
.
gotoAndStop
(
1
);
mv
[
"cannoidx"
]
=
i
;
if
(
jsvgname
==
"cannofire"
){
mv
.
x
=
icannoboxwid
-
6
;
mv
.
y
=
-
icannoboxhei
*
3
/
2
+
5
;
if
(
jsvgname
==
"cannofire1"
){
var
mvwidth
=
1009
;
var
mvheight
=
100
;
mv
.
x
=
icannoboxwid
-
8
;
mv
.
y
=
(
icannoboxhei
-
mvwidth
)
+
180
;
mv
.
rotation
=
90
;
// console.log("cannofireTotal-------",mv. totalFrames);
// console.log("cannofireTotal-------",mv,mv.totalFrames);
mv
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
listenCnfire
,
this
);
}
else
if
(
jsvgname
==
"cannolight"
){
var
mvwidth
=
400
;
...
...
@@ -520,7 +521,7 @@ export default class MainScene extends Scene {
listenCnfire
(
e
){
var
target
=
e
.
target
;
var
curframe
=
target
.
currentFrame
;
if
(
curframe
>=
48
){
if
(
curframe
>=
30
){
// console.log("fire播放完成",target["cannoidx"]);
target
.
gotoAndStop
(
1
);
if
(
target
.
parent
){
...
...
@@ -558,12 +559,12 @@ export default class MainScene extends Scene {
}
}
else
if
(
curframe
==
60
){
var
icannoidx
=
target
[
"cannoidx"
];
this
.
selectPlayCannoEffect
(
icannoidx
,
"cannofire"
);
this
.
selectPlayCannoEffect
(
icannoidx
,
"cannofire
1
"
);
}
}
selectPlayCannoFire
(
idx
:
number
){
var
arridx
=
this
.
getCannoArrByIdx
(
idx
);
this
.
selectPlayCannoEffect
(
arridx
,
"cannofire"
);
this
.
selectPlayCannoEffect
(
arridx
,
"cannofire
1
"
);
}
/**
* 播放炮台动画
...
...
@@ -1298,7 +1299,13 @@ export default class MainScene extends Scene {
onTap_quitBtn
()
{
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
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
7
));
if
(
this
.
propBtnCon
.
boomBtn
.
propNumShow
.
count
<=
0
)
{
...
...
@@ -2563,7 +2570,7 @@ export default class MainScene extends Scene {
canno
.
fireCanno
();
var
cannoidx
=
canno
.
index
;
var
cannoarridx
=
this
.
getCannoArrByIdx
(
cannoidx
);
this
.
selectPlayCannoEffect
(
cannoarridx
,
"cannoparticle"
);
//
this.selectPlayCannoEffect(cannoarridx,"cannoparticle");
// setTimeout(()=>{
// this.eliminate();
...
...
@@ -3721,16 +3728,17 @@ export default class MainScene extends Scene {
removeCannoBlock
(
index
:
number
){
this
.
removeOperation
(
index
);
//炮台石头的动效
var
blockmv
=
movieClips
[
"canno"
];
var
blockmv
=
movieClips
[
"canno
block
"
];
if
(
blockmv
){
console
.
log
(
"播放炮台石头的动效"
);
var
blpos
=
Tool
.
getPositionByIndex
(
index
);
var
bwpos
=
this
.
elementContainer
.
localToGlobal
(
blpos
[
0
],
blpos
[
1
]);
var
blockwid
=
11
6
;
var
blockhei
=
116
;
blockmv
.
x
=
bwpos
.
x
-
blockwid
/
2
;
blockmv
.
y
=
bwpos
.
y
-
blockhei
/
2
;
var
blockwid
=
11
2
;
var
blockhei
=
97
;
blockmv
.
x
=
bwpos
.
x
-
blockwid
-
5
;
blockmv
.
y
=
bwpos
.
y
-
35
;
this
.
addChild
(
blockmv
);
// blockmv.gotoAndStop(1);
blockmv
.
gotoAndPlay
(
1
,
1
);
}
}
...
...
@@ -3810,6 +3818,9 @@ export default class MainScene extends Scene {
if
(
!
this
.
lattices
[
index
]
||
!
this
.
lattices
[
index
].
element
)
return
null
//先赋值指向
let
ele
=
this
.
lattices
[
index
].
element
;
let
eletype
=
ele
.
type
;
let
eleffectype
=
ele
.
effectType
;
//添加进emptys
this
.
emptys
.
push
(
index
)
//从容器移除
...
...
@@ -3821,6 +3832,7 @@ export default class MainScene extends Scene {
//返回下,有地方要用
//炮台充能
// console.log("消除元素类型",eletype,eleffectype);
for
(
let
p
=
0
;
p
<
this
.
cannoArr
.
length
;
p
++
){
let
pcannoidx
=
this
.
cannoArr
[
p
].
idx
;
var
isnext
=
Tool
.
checkNebByidx
(
pcannoidx
,
index
);
...
...
egret/src/something/class/Element.ts
View file @
bf9e686d
...
...
@@ -47,8 +47,16 @@ export class Element extends eui.Component {
cannoMoveClip
:
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
()
{
if
(
this
.
_fishState
>
0
)
{
...
...
@@ -216,7 +224,7 @@ export class Element extends eui.Component {
if
(
this
.
cannoMoveClip
){
var
endframe
:
number
;
var
curframe
:
number
=
this
.
cannoMoveClip
.
currentFrame
;
if
(
curframe
>=
24
1
){
if
(
curframe
>=
35
1
){
if
(
_stat
==
3
||
_stat
==
2
){
return
;
}
...
...
@@ -226,16 +234,16 @@ export class Element extends eui.Component {
endframe
=
1
;
}
else
if
(
_stat
==
1
){
curframe
=
61
;
endframe
=
12
1
;
endframe
=
7
1
;
}
else
if
(
_stat
==
2
){
curframe
=
121
endframe
=
1
8
1
;
endframe
=
1
3
1
;
}
else
if
(
_stat
==
3
){
curframe
=
181
;
endframe
=
24
1
;
endframe
=
19
1
;
}
else
if
(
_stat
==
4
){
curframe
=
24
1
;
endframe
=
36
1
;
curframe
=
35
1
;
endframe
=
48
1
;
}
// console.log("ele播放大炮动画",curframe,endframe,_stat);
// this.cannoMoveClip.gotoAndPlay(curframe,true);
...
...
@@ -513,17 +521,18 @@ export class Element extends eui.Component {
return
;
}
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
++
){
let
mvname
=
svgas
[
i
];
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.lockStep = true;
var
mvwidth
=
10
2
;
var
mvheight
=
1
16
;
var
mvwidth
=
8
2
;
var
mvheight
=
1
32
;
this
.
cannoMoveClip
.
x
=
(
this
.
cannoboxwid
-
mvwidth
)
/
2
;
this
.
cannoMoveClip
.
y
=
0
;
this
.
cannoMoveClip
.
y
=
-
mvheight
/
4
;
this
.
cannobox
.
addChild
(
this
.
cannoMoveClip
);
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
this
.
cannoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
...
...
@@ -538,8 +547,11 @@ export class Element extends eui.Component {
*/
toFrameAni
(){
var
curframe
=
this
.
cannoMoveClip
.
currentFrame
;
if
(
curframe
==
441
){
//发射光柱
this
.
mainScene
.
selectPlayCannoFire
(
this
.
index
);
}
if
(
curframe
>=
this
.
stopFrame
){
if
(
this
.
stopFrame
==
36
1
){
if
(
this
.
stopFrame
==
48
1
){
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
return
;
// 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