Commit 352a73b1 authored by 李维's avatar 李维

dev done

parent 0012ea38
...@@ -224,7 +224,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -224,7 +224,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this.initCamera(); this.initCamera();
this.initCards(); this.initCards();
this.m_enableAutoRunFocus = true; this.m_enableAutoRunFocus = true;
console.log("Init auto")
this.autoRunFocus() this.autoRunFocus()
this.initShowCard(); this.initShowCard();
this.g_cartoon.playAudio("sm-run", false ,null, true, (audio)=>{ this.g_cartoon.playAudio("sm-run", false ,null, true, (audio)=>{
...@@ -303,7 +302,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -303,7 +302,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this.subscribeMapDownEvent(element.id, ()=>{ this.subscribeMapDownEvent(element.id, ()=>{
if(this.m_enableCamera){ if(this.m_enableCamera){
console.log("Enable camera -> 1 false")
this.m_enableCamera = false; this.m_enableCamera = false;
this.g_cartoon.stopAudio("sm-run") this.g_cartoon.stopAudio("sm-run")
clearTimeout(this.m_autoFocusID) clearTimeout(this.m_autoFocusID)
...@@ -497,7 +495,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -497,7 +495,6 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
if(this.g_cartoon.getCartoonElement(this.m_allCardIds[next]).ref.x>=this.g_canvasWidth-300*this.g_mapScale){ if(this.g_cartoon.getCartoonElement(this.m_allCardIds[next]).ref.x>=this.g_canvasWidth-300*this.g_mapScale){
console.log("Enable camera -> 2 false")
this.m_enableCamera = false; this.m_enableCamera = false;
this.g_enableMapDown = false; this.g_enableMapDown = false;
let distance = this.g_cartoon.getCartoonElement(this.m_allCardIds[current]).ref.x / 2 let distance = this.g_cartoon.getCartoonElement(this.m_allCardIds[current]).ref.x / 2
...@@ -506,7 +503,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -506,7 +503,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this.g_cartoon.getCartoonElement(this.m_allCardIds[current]).hideHighlight() this.g_cartoon.getCartoonElement(this.m_allCardIds[current]).hideHighlight()
} }
this.g_cartoon.getCartoonElement(this.m_allCardIds[next]).showHighlight(()=>{ this.g_cartoon.getCartoonElement(this.m_allCardIds[next]).showHighlight(()=>{
console.log("Enable camera -> 3 true")
this.m_enableCamera = true; this.m_enableCamera = true;
this.g_enableMapDown = true; this.g_enableMapDown = true;
callback && callback() callback && callback()
...@@ -530,7 +526,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -530,7 +526,6 @@ export class PlayComponent implements OnInit, OnDestroy {
if(this.m_enableAutoRunFocus){ if(this.m_enableAutoRunFocus){
this.m_autoFocusID = setTimeout(()=>{ this.m_autoFocusID = setTimeout(()=>{
if(this.m_enableAutoRunFocus){ if(this.m_enableAutoRunFocus){
console.log("Set timeout auto")
this.autoRunFocus() this.autoRunFocus()
} }
},3000) },3000)
...@@ -614,7 +609,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -614,7 +609,6 @@ export class PlayComponent implements OnInit, OnDestroy {
let text = this.g_cartoon.createLabel(data.text, "BerlinSansFBDemi-Bold", null, 50) let text = this.g_cartoon.createLabel(data.text, "BerlinSansFBDemi-Bold", null, 50)
let lineNum = data.text.split(" ").length let lineNum = data.text.split(" ").length
console.log(lineNum)
text.maxSingalLineWidth = 165 text.maxSingalLineWidth = 165
text.fontColor = "#e05e14"; text.fontColor = "#e05e14";
if(lineNum>1){ if(lineNum>1){
...@@ -644,7 +638,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -644,7 +638,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this.m_enableAutoRunFocus = true; this.m_enableAutoRunFocus = true;
element.audio_url = null; element.audio_url = null;
this.g_cartoon.stopAudio(element.audio_url) this.g_cartoon.stopAudio(element.audio_url)
console.log("Close auto")
this.autoRunFocus() this.autoRunFocus()
tweenChange(element.ref, {scaleX: 0, scaleY: 0}, 0.3, ()=>{ tweenChange(element.ref, {scaleX: 0, scaleY: 0}, 0.3, ()=>{
element.ref.visible = false; element.ref.visible = false;
...@@ -671,8 +664,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -671,8 +664,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}) })
this.subscribeMapDownEvent(closeBntton.id, ()=>{ this.subscribeMapDownEvent(closeBntton.id, ()=>{
this.g_cartoon.playAudio("sm-camera") this.g_cartoon.stopAudio(element.audio_url)
console.log("Enable camera -> 4 true")
this.m_enableCamera = true; this.m_enableCamera = true;
element.hide(()=>{ element.hide(()=>{
this.g_enableMapDown = true this.g_enableMapDown = true
......
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