Commit 0012ea38 authored by 李维's avatar 李维

dev commit

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