// 卡牌从已经出牌区域返回到手里的卡牌位置 public void retFormOutAreaToHandleArea() { m_card.convHandleModel(); m_card.ioControl.enableDrag(); PosAni posAni; posAni = new PosAni(); m_numAniParal.addOneNumAni(posAni); posAni.setGO(m_card.gameObject()); posAni.destPos = new Vector3(m_card.transform().localPosition.x, m_card.m_sceneDZData.getDragCardHeight(), m_card.transform().localPosition.z); m_curPt = m_wayPtList.getPosInfo(PosType.eHandUp); posAni = new PosAni(); m_numAniParal.addOneNumAni(posAni); posAni.setGO(m_card.gameObject()); posAni.destPos = m_curPt.pos; m_curPt = m_wayPtList.getPosInfo(PosType.eHandDown); STAni stAni; stAni = new STAni(); m_numAniParal.addOneNumAni(stAni); stAni.setGO(m_card.gameObject()); stAni.destPos = m_curPt.pos; stAni.destScale = m_curPt.scale; m_numAniParal.play(); }
// 移动动画 public void moveToDestPos() { UtilApi.normalRot(m_mazeRoom.selfGo.transform); PosAni posAni; posAni = new PosAni(); m_numAniParal.addOneNumAni(posAni); posAni.setGO(m_mazeRoom.selfGo); posAni.destPos = m_mazeRoom.origPos; m_numAniParal.play(); }
//// 到目标位置,移动、旋转、缩放 //private void moveToDestRST(PosType type = PosType.eHandDown) //{ // m_curPt = m_wayPtList.getPosInfo(type); // RSTAni rstAni; // rstAni = new RSTAni(); // m_numAniParal.addOneNumAni(rstAni); // rstAni.setGO(m_card.gameObject()); // rstAni.destPos = m_curPt.pos; // rstAni.destRot = m_curPt.rot; // rstAni.destScale = m_curPt.scale; // m_numAniParal.play(); //} //// 到目标位置,移动、缩放 //private void moveToDestST(PosType type = PosType.eHandDown) //{ // m_curPt = m_wayPtList.getPosInfo(type); // STAni stAni; // stAni = new STAni(); // m_numAniParal.addOneNumAni(stAni); // stAni.setGO(m_card.gameObject()); // stAni.destPos = m_curPt.pos; // stAni.destScale = m_curPt.scale; // m_numAniParal.play(); //} //// 到目标位置,移动、旋转 //private void moveToDestRT(PosType type = PosType.eHandDown) //{ // m_curPt = m_wayPtList.getPosInfo(type); // RTAni rtAni; // rtAni = new RTAni(); // m_numAniParal.addOneNumAni(rtAni); // rtAni.setGO(m_card.gameObject()); // rtAni.destPos = m_curPt.pos; // rtAni.destRot = m_curPt.rot; // m_numAniParal.play(); //} //// 移动动画 //private void moveToDestT(PosType type = PosType.eHandDown) //{ // m_curPt = m_wayPtList.getPosInfo(type); // // 旋转和缩放直接设置 // UtilApi.setRot(m_card.transform(), m_curPt.rot); // UtilApi.setScale(m_card.transform(), m_curPt.scale); // PosAni posAni; // posAni = new PosAni(); // m_numAniParal.addOneNumAni(posAni); // posAni.setGO(m_card.gameObject()); // posAni.destPos = m_curPt.pos; // m_numAniParal.play(); //} //// 缩放 //private void moveToDestScale(PosType type) //{ // m_curPt = m_wayPtList.getPosInfo(type); // ScaleAni scaleAni = new ScaleAni(); // m_numAniParal.addOneNumAni(scaleAni); // scaleAni.setGO(m_card.gameObject()); // scaleAni.destScale = m_curPt.scale; // m_numAniParal.play(); //} // 移动动画 public void moveToDestPos(PosType type = PosType.eHandDown) { // 开始做轨迹动画前需要关闭 DopeSheet 动画 Drag Title 动画 // 停止 DopeSheet 动画 if (m_startAni != null) { m_startAni.stop(); m_startAni.disable(); } disableWindowTitle(); m_curPt = m_wayPtList.getPosInfo(type); if (!UtilApi.isVectorEqual(m_card.transform().localEulerAngles, m_curPt.rot)) { RotAni rotAni; rotAni = new RotAni(); m_numAniParal.addOneNumAni(rotAni); rotAni.setGO(m_card.gameObject()); rotAni.destRot = m_curPt.rot; } if (!UtilApi.isVectorEqual(m_card.transform().localScale, m_curPt.scale)) { ScaleAni scaleAni; scaleAni = new ScaleAni(); m_numAniParal.addOneNumAni(scaleAni); scaleAni.setGO(m_card.gameObject()); scaleAni.destScale = m_curPt.scale; } if (!UtilApi.isVectorEqual(m_card.transform().localPosition, m_curPt.pos)) { PosAni posAni; posAni = new PosAni(); m_numAniParal.addOneNumAni(posAni); posAni.setGO(m_card.gameObject()); posAni.destPos = m_curPt.pos; } m_numAniParal.play(); }