Commit 0ad405f7 authored by zjz1994's avatar zjz1994

转盘调整

parent d07baf53
...@@ -98,6 +98,10 @@ export default class Turntable extends Panel { ...@@ -98,6 +98,10 @@ export default class Turntable extends Panel {
} }
removeEvents() { removeEvents() {
if(handmoveclip&&handmoveclip.parent){
handmoveclip.parent.removeChild(handmoveclip);
}
super.removeEvents(); super.removeEvents();
this["closeBtn"].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this); this["closeBtn"].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this);
this.start_btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapStart, this); this.start_btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapStart, this);
...@@ -319,11 +323,11 @@ export default class Turntable extends Panel { ...@@ -319,11 +323,11 @@ export default class Turntable extends Panel {
addHandMv(){ addHandMv(){
if(handmoveclip){ if(handmoveclip){
var startpy = this["start_btn"].y; var startpy = this["start_btn"].y;
startpy = 281; startpy = 291;
var whandy = this["start_btn"].parent.localToGlobal(0,startpy).y; var whandy = this["start_btn"].parent.localToGlobal(0,startpy).y;
var handy = this['container2'].globalToLocal(0,whandy).y-1334/2; var handy = this['container2'].globalToLocal(0,whandy).y-1334/2;
this['container2'].addChild(handmoveclip);
handmoveclip.gotoAndPlay(1); handmoveclip.gotoAndPlay(1);
this['container2'].addChild(handmoveclip);
handmoveclip.y = handy; handmoveclip.y = handy;
} }
} }
......
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