Esempio n. 1
0
 // 移动到开始位置
 public void moveToStart()
 {
     m_curPt = m_wayPtList.getPosInfo(PosType.eHandDown);
     UtilApi.setPos(m_card.transform(), m_curPt.pos);
     UtilApi.setRot(m_card.transform(), m_curPt.rot);
     UtilApi.setScale(m_card.transform(), m_curPt.scale);
 }
Esempio n. 2
0
        virtual protected void updateSceneCardPosInternal(CardArea area, bool bUpdateIdx = true)
        {
            int           idx      = 0;
            SceneCardBase cardItem = null;
            WayPtItem     pt       = null;
            PosType       posType  = PosType.eHandDown;

            if (CardArea.CARDCELLTYPE_HAND == area)
            {
                posType = PosType.eHandDown;
            }
            else if (CardArea.CARDCELLTYPE_COMMON == area)
            {
                posType = PosType.eOutDown;
            }

            getCardPos();

            while (idx < m_sceneCardList.Count())
            {
                cardItem = m_sceneCardList[idx];
                if (bUpdateIdx)
                {
                    cardItem.curIndex = (ushort)idx;
                }

                pt     = cardItem.trackAniControl.wayPtList.getAndAddPosInfo(posType);
                pt.pos = m_posList[idx];
                cardItem.trackAniControl.moveToDestPos(posType);

                ++idx;
            }
        }
Esempio n. 3
0
        // 卡牌从已经出牌区域返回到手里的卡牌位置
        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();
        }
Esempio n. 4
0
 // 移动到开始位置
 public void moveToStart()
 {
     m_curPt = m_wayPtList.getPosInfo(PosType.eHandDown);
     UtilApi.setPos(m_card.transform(), m_curPt.pos);
     UtilApi.setRot(m_card.transform(), m_curPt.rot);
     UtilApi.setScale(m_card.transform(), m_curPt.scale);
 }
Esempio n. 5
0
 // 开始拖动自动动画
 public void startDragAni()
 {
     m_curPt = m_wayPtList.getAndAddPosInfo(PosType.eHandUp);
     // 位置直接到达位置
     m_curPt.pos = new Vector3(m_card.transform().localPosition.x, m_card.m_sceneDZData.getDragCardHeight(), m_card.transform().localPosition.z);
     UtilApi.setPos(m_card.transform(), m_curPt.pos);
     moveToDestPos(PosType.eHandUp);
 }
Esempio n. 6
0
        public WayPtItem getAndAddPosInfo(PosType wherePos)
        {
            if (m_ptList[(int)wherePos] == null)
            {
                m_ptList[(int)wherePos] = new WayPtItem();
            }

            return m_ptList[(int)wherePos];
        }
Esempio n. 7
0
        public WayPtItem getAndAddPosInfo(PosType wherePos)
        {
            if (m_ptList[(int)wherePos] == null)
            {
                m_ptList[(int)wherePos] = new WayPtItem();
            }

            return(m_ptList[(int)wherePos]);
        }
Esempio n. 8
0
        //// 到目标位置,移动、旋转、缩放
        //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();
        }
Esempio n. 9
0
 public void updateOutCardScaleInfo(Transform trans)
 {
     m_curPt = m_wayPtList.getAndAddPosInfo(PosType.eOutDown);
     m_curPt.scale = trans.localScale;
 }
Esempio n. 10
0
        // 卡牌从已经出牌区域返回到手里的卡牌位置
        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();
        }
Esempio n. 11
0
 // 开始拖动自动动画
 public void startDragAni()
 {
     m_curPt = m_wayPtList.getAndAddPosInfo(PosType.eHandUp);
     // 位置直接到达位置
     m_curPt.pos = new Vector3(m_card.transform().localPosition.x, m_card.m_sceneDZData.getDragCardHeight(), m_card.transform().localPosition.z);
     UtilApi.setPos(m_card.transform(), m_curPt.pos);
     moveToDestPos(PosType.eHandUp);
 }
Esempio n. 12
0
        //// 到目标位置,移动、旋转、缩放
        //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();
        }
Esempio n. 13
0
 public void updateOutCardScaleInfo(Transform trans)
 {
     m_curPt       = m_wayPtList.getAndAddPosInfo(PosType.eOutDown);
     m_curPt.scale = trans.localScale;
 }
Esempio n. 14
0
 public void setPosInfo(PosType wherePos, WayPtItem pos)
 {
     m_ptList.Add(pos);
 }
Esempio n. 15
0
 public void setPosInfo(PosType wherePos, WayPtItem pos)
 {
     m_ptList.Add(pos);
 }