Пример #1
0
        /// <summary>
        /// Our main function to create text effects.
        /// </summary>
        /// <param name="text"></param>
        /// <param name="type"></param>
        /// <param name="modifier"></param>
        void GenerateTextEffect(string text, sbyte type, sbyte modifier)
        {
            switch (type)
            {
            case 1:
                EffectSlowtype(text, modifier);
                break;

            default:
                if (text.Contains("\n"))
                {
                    string[] workerStrings = text.Split('\n');
                    currentPoint.Y++;
                    for (int i = 0; i < workerStrings.Length; i++)
                    {
                        Screen.AppendString((int)Screen.ScreenLayer.UIText2, new Vector2(currentPoint.X, currentPoint.Y), workerStrings[i]);
                        currentPoint.X = DefaultTextLeft;
                    }
                }
                else
                {
                    Screen.AppendString((int)Screen.ScreenLayer.UIText2, new Vector2(currentPoint.X, currentPoint.Y), text);
                    currentPoint.X += text.Length;
                }
                break;
            }
        }