Commit c22de964 authored by 李维's avatar 李维

dev commit

parent 5f1054f1
...@@ -108,14 +108,10 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -108,14 +108,10 @@ export class PlayComponent implements OnInit, OnDestroy {
m_runStatus = false; m_runStatus = false;
m_mouseInRunway = false; m_mouseInRunway = false;
m_leftBuffer = []
m_rightBuffer = [] m_rightBuffer = []
m_lineIndex = 0;
m_requestAfterCard = false; m_requestAfterCard = false;
m_requestID = null; m_requestID = null;
m_enableRunway = false; m_enableRunway = false;
m_lastCard_x = null;
m_lastCard_id = null;
// ------------------------------------ // ------------------------------------
...@@ -188,14 +184,10 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -188,14 +184,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this.m_allCardIds = [] this.m_allCardIds = []
this.cardRunControl(false) this.cardRunControl(false)
this.m_leftBuffer = []
this.m_rightBuffer = [] this.m_rightBuffer = []
this.m_lineIndex = 0;
this.m_requestAfterCard = false; this.m_requestAfterCard = false;
this.m_requestID = null; this.m_requestID = null;
this.m_enableRunway = false; this.m_enableRunway = false;
this.m_lastCard_x = null;
this.m_lastCard_id = null;
} }
endGame(){ endGame(){
...@@ -288,9 +280,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -288,9 +280,6 @@ export class PlayComponent implements OnInit, OnDestroy {
let cardNumber = Math.ceil(this.g_canvasWidth/cardWidth); let cardNumber = Math.ceil(this.g_canvasWidth/cardWidth);
for(let index=0; index<6; index++){ for(let index=0; index<6; index++){
let newCard = this.createCard(index,index*cardWidth,boundingBox.y); let newCard = this.createCard(index,index*cardWidth,boundingBox.y);
if(index+1 == cardNumber){
this.m_lastCard_x = index*cardWidth
}
if(index>=cardNumber){ if(index>=cardNumber){
newCard.ref.x = -999 newCard.ref.x = -999
newCard.waiting = true; newCard.waiting = true;
...@@ -316,7 +305,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -316,7 +305,6 @@ export class PlayComponent implements OnInit, OnDestroy {
y: y + 150*this.g_mapScale y: y + 150*this.g_mapScale
} }
}) })
element.lineIndex = this.m_lineIndex++;
let imageContainer= new MySprite() let imageContainer= new MySprite()
imageContainer.init(this.g_cartoon.images.get("card")) imageContainer.init(this.g_cartoon.images.get("card"))
...@@ -384,8 +372,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -384,8 +372,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let width = 230*this.g_mapScale; let width = 230*this.g_mapScale;
if( (x + width*0.5) < this.g_canvasWidth && ( (x+ width*0.5) > this.g_canvasWidth-21*this.g_mapScale) && !this.m_requestAfterCard ){ if( (x + width*0.5) < this.g_canvasWidth && ( (x+ width*0.5) > this.g_canvasWidth-21*this.g_mapScale) && !this.m_requestAfterCard ){
this.m_requestAfterCard = true; this.m_requestAfterCard = true;
console.log("Request: id=" + id) this.m_requestID = id
this.m_requestID = id// + 115*this.g_mapScale;
} }
if(this.m_rightBuffer[0] && this.m_requestAfterCard){ if(this.m_rightBuffer[0] && this.m_requestAfterCard){
...@@ -398,16 +385,11 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -398,16 +385,11 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
if( x < -0.5*width && !this.g_cartoon.getCartoonElement(id).waiting){ if( x < -0.5*width && !this.g_cartoon.getCartoonElement(id).waiting){
console.log("回收:" + id)
this.g_cartoon.getCartoonElement(id).waiting = true; this.g_cartoon.getCartoonElement(id).waiting = true;
this.m_rightBuffer.push(id) this.m_rightBuffer.push(id)
} }
} }
duplicateCard(){
}
......
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