Ejemplo n.º 1
0
        /// <summary>
        /// Draws our current string
        /// </summary>
        private void stringToDraw(ScrollMethod type, string text, int position)
        {
            switch (type)
            {
            case ScrollMethod.Normal:
                scrollBuf = text;
                break;

            case ScrollMethod.Auto:
                scrollBuf = text.Substring(position);
                break;
            }
        }
Ejemplo n.º 2
0
        private float MoveTowardsValue(float from, float to, float delta, ScrollMethod method)
        {
            switch (method)
            {
            case ScrollMethod.MOVE_TOWARDS:
                return(Mathf.MoveTowards(from, to, delta * Time.unscaledDeltaTime));

            case ScrollMethod.LERP:
                return(Mathf.Lerp(from, to, delta * Time.unscaledDeltaTime));

            default:
                return(from);
            }
        }