wangguan
2020-11-09 2a5e699c58cdcf2374859663204328da6c79a859
移动宝石直接到手指位置
1 files modified
9 ■■■■■ changed files
Assets/Scripts/TowerDefense/UI/HUD/TowerPlacementGhost.cs 9 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/HUD/TowerPlacementGhost.cs
@@ -112,7 +112,7 @@
                        if (ps == null)
                            ps = t.GetChild(0).GetComponent<ParticleSystem>();
                        ps.Play();
                        break;
                    }
@@ -187,7 +187,6 @@
        public virtual void Move(Vector3 worldPosition, Quaternion rotation, bool validLocation)
        {
            m_TargetPosition = worldPosition;
            if (!m_ValidPos)
            {
                // Immediately move to the given position
@@ -218,9 +217,11 @@
            if (Vector3.SqrMagnitude(currentPos - m_TargetPosition) > 0.01f)
            {
                currentPos = Vector3.SmoothDamp(currentPos, m_TargetPosition, ref m_MoveVel, dampSpeed);
                //currentPos = Vector3.SmoothDamp(currentPos, m_TargetPosition, ref m_MoveVel, dampSpeed);
                transform.position = currentPos;
                //transform.position = currentPos;
                transform.position = m_TargetPosition;
            }
            else
            {