Exemplo n.º 1
0
        /// <summary>
        /// カーソル位置が前フレームでCursorPointsEntityに追加した位置と近似値でないか
        /// </summary>
        /// <param name="currentCursorPoint"></param>
        /// <returns></returns>
        private bool IsAddCursorPoint(Vector2 currentCursorPoint)
        {
            var cursorPointsCount = _cursorPointsEntity.GetCursorPointsCount();

            if (cursorPointsCount <= 1)
            {
                return(true);
            }

            var lastCursorPoint = _cursorPointsEntity.GetCursorPoint(cursorPointsCount - 1);
            var distance        = (currentCursorPoint - lastCursorPoint).sqrMagnitude;

            return(distance >= DrawParameter.DIFFERENCE_DISTANCE);
        }