Commit 80fa00a4 authored by zjz1994's avatar zjz1994

优化炮台

parent 251bce34
This diff is collapsed.
......@@ -563,6 +563,7 @@ export class Element extends eui.Component {
// }
return true;
}
//此处回收
addDisable(){
if(this.inPongoPart&&this.inPongoPart=="tl"){
if(this.pongoMoveClip&&this.pongoMoveClip.parent){
......@@ -576,6 +577,15 @@ export class Element extends eui.Component {
}
egret.ticker.$stopTick(this.update,this);
}
if(this.cannoMoveClip){
if(this.cannoMoveClip.parent){
this.cannoMoveClip.parent.removeChild(this.cannoMoveClip);
}
this.cannoMoveClip.removeEventListener(egret.Event.ENTER_FRAME,this.toFrameAni,this);
Pool.recover(RecoverName.CANNO,this.cannoMoveClip);
this.cannoMoveClip = null;
}
}
......@@ -883,18 +893,16 @@ export class Element extends eui.Component {
this.addChild(this.festivalEle)
}
}
//大炮编号
cannobianhao:number;
//添加炮台
createCanno(videoItem:any){
createCanno(videoItem:any,cannobianhao:number){
this.cannobianhao = cannobianhao;
if(this.type==ElementType.CANNO&&videoItem){
this.cannoMoveClip = Pool.takeOut(RecoverName.CANNO);
if(this.cannoMoveClip){
if(this.cannoMoveClip.parent){
this.cannoMoveClip.parent.removeChild(this.cannoMoveClip);
}
this.initCannoMoveClidp();
return;
}
else{
}else{
this.cannoMoveClip = new window["SVGA"].EgretMovieClip(videoItem);
this.initCannoMoveClidp();
}
......
......@@ -84,4 +84,10 @@ export enum RecoverName {
ICE_BLOCK = 'ICE_BLOCK',
DARK_ICE_BLOCK = 'DARK_ICE_BLOCK',
//部分动画的
CANNOBLOCKANI = 'CANNOBLOCKANI',//炮台石头破碎
CANNO = 'CANNO',//炮台
CANNOFIRE = 'CANNOFIRE',//炮台发射
CANNOLIGHT = 'CANNOLIGHT'//炮台聚能
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment