pai addPai() { pai tempPai = new pai(width); GameObject temp = tempPai.show(); temp.transform.position = new Vector3(0, 0, each_Size * num); temp.transform.parent = gameObject.transform; num++; paiQueue.Enqueue(temp); return(tempPai); }
pai fallPai() { pai tempPai = new pai(width); GameObject temp = tempPai.show(); Vector3 tragetPosition = new Vector3(0, 0, each_Size * num); Vector3 startPosition = tragetPosition + new Vector3(0, 3, 0); temp.transform.position = Vector3.Lerp(startPosition, tragetPosition, 0.1f); temp.transform.parent = gameObject.transform; num++; paiQueue.Enqueue(temp); return(tempPai); }