Commit 767893a3 authored by 李维's avatar 李维

dev commit

parent dfce2cec
...@@ -51,7 +51,8 @@ const zIndexMap = { ...@@ -51,7 +51,8 @@ const zIndexMap = {
cardUp: 110, cardUp: 110,
cardBorder: 111, cardBorder: 111,
lianzi: 100, lianzi: 100,
window: 50 window: 50,
animation: 9999
} }
@Component({ @Component({
...@@ -656,6 +657,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -656,6 +657,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let A2 = [] let A2 = []
let A3 = [] let A3 = []
let A4 = [] let A4 = []
let A5 = []
cardAll.forEach((card, index)=>{ cardAll.forEach((card, index)=>{
let pos = {x:0, y:0} let pos = {x:0, y:0}
if(index!=0){ if(index!=0){
...@@ -675,6 +677,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -675,6 +677,7 @@ export class PlayComponent implements OnInit, OnDestroy {
A2.push(temp.e2) A2.push(temp.e2)
A3.push(temp.e3) A3.push(temp.e3)
A4.push(temp.e4) A4.push(temp.e4)
A5.push(temp.e5)
}) })
let movedDis =this.alignCenter(A1) let movedDis =this.alignCenter(A1)
A2.forEach(item=>{ A2.forEach(item=>{
...@@ -686,6 +689,9 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -686,6 +689,9 @@ export class PlayComponent implements OnInit, OnDestroy {
A4.forEach(item=>{ A4.forEach(item=>{
item.x = item.x + movedDis item.x = item.x + movedDis
}) })
A5.forEach(item=>{
item.x = item.x + movedDis
})
} }
createCardUp(index, label, pos){ createCardUp(index, label, pos){
...@@ -747,6 +753,21 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -747,6 +753,21 @@ export class PlayComponent implements OnInit, OnDestroy {
card.lined = false; card.lined = false;
card.startAni = this.g_cartoon.createAnimation("bg_star", 11, 500)
card.startAni.visible = false
card.startAni.x = card.ref.x
card.startAni.y = card.ref.y
this.render(card.startAni, zIndexMap.animation)
card.showStart = (callback?)=>{
card.startAni.visible = true
card.startAni.playEndFunc = ()=>{
card.startAni.visible = false;
callback && callback()
}
card.startAni.play()
}
this.subscribeMapDownEvent(card.id, ()=>{ this.subscribeMapDownEvent(card.id, ()=>{
if(this.m_currentSelectedCard == card.id){ if(this.m_currentSelectedCard == card.id){
this.g_enableMapDown = true; this.g_enableMapDown = true;
...@@ -755,11 +776,11 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -755,11 +776,11 @@ export class PlayComponent implements OnInit, OnDestroy {
card.showHideDoc(true) card.showHideDoc(true)
if(this.m_currentSelectedCard){ if(this.m_currentSelectedCard){
if(this.m_currentSelectedCard.indexOf("down")!=-1){ if(this.m_currentSelectedCard.indexOf("down")!=-1){
this.lineTo(this.m_currentSelectedCard, card.id, false, ()=>{ this.lineTo(this.m_currentSelectedCard, card.id, true, ()=>{
this.g_cartoon.getCartoonElement(this.m_currentSelectedCard).showHideDoc(false) card.showStart(()=>{
card.showHideDoc(false) this.m_currentSelectedCard = null
this.m_currentSelectedCard = null this.g_enableMapDown = true;
this.g_enableMapDown = true; })
}) })
}else{ }else{
this.g_cartoon.getCartoonElement(this.m_currentSelectedCard).showHideDoc(false) this.g_cartoon.getCartoonElement(this.m_currentSelectedCard).showHideDoc(false)
...@@ -779,7 +800,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -779,7 +800,8 @@ export class PlayComponent implements OnInit, OnDestroy {
e1: card.ref, e1: card.ref,
e2: panzi, e2: panzi,
e3: label, e3: label,
e4: dot e4: dot,
e5: card.startAni
} }
} }
......
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