Commit 2d021c88 authored by 李维's avatar 李维

dev commit

parent 2453fe55
......@@ -513,6 +513,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.g_cartoon.getCartoonElement(card.parentID).content = null;
}
element.setContent(this.g_cartoon.getCartoonElement(this.m_currentPickupCardID))
this.g_cartoon.getCartoonElement("start-button").showHideCheck()
this.m_currentPickupCardID = null;
}
}
......@@ -728,6 +729,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.g_cartoon.getCartoonElement(card.parentID).content = null;
}
element.setContent(this.g_cartoon.getCartoonElement(this.m_currentPickupCardID))
this.g_cartoon.getCartoonElement("start-button").showHideCheck()
this.m_currentPickupCardID = null;
}
}
......@@ -751,6 +753,46 @@ export class PlayComponent implements OnInit, OnDestroy {
y: 554*this.g_mapScale + (h/2)*this.g_mapScale
}
})
element.ref.scaleX = 0;
element.ref.scaleY = 0;
element.showStatus = false;
element.getAllCards = ()=>{
let allSelectedCards = []
this.m_allSelectedHotZone.forEach(id=>{
let content_id = this.g_cartoon.getCartoonElement(id).content?this.g_cartoon.getCartoonElement(id).content.id:null
if(content_id){
allSelectedCards.push(content_id)
}
})
return allSelectedCards
}
element.click = ()=>{
tweenChange(element.ref, {scaleX:element.ref.initScaleX*0.9, scaleY:element.ref.initScaleY*0.9}, 0.2, ()=>{
tweenChange(element.ref, {scaleX:element.ref.initScaleX, scaleY:element.ref.initScaleY}, 0.2)
})
element.getAllCards()
}
element.showHideCheck = ()=>{
console.log("showHideCheck",element.getAllCards())
if( element.getAllCards().length>0 && !element.showStatus ){
tweenChange(element.ref, {scaleX:element.ref.initScaleX, scaleY: element.ref.initScaleY}, 0.1, ()=>{
jelly(element.ref, 0.5)
})
element.showStatus = true;
}else if( element.getAllCards().length==0 && element.showStatus ){
element.showStatus = false
tweenChange(element.ref, {scaleX:0, scaleY: 0}, 0.1)
}
}
this.subscribeMapDownEvent("start-button", ()=>{
element.click()
this.g_enableMapDown = true;
})
this.render(element.ref)
}
......
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