public BitmapTextShakeAnimation(BitmapText _BitmapText, TagText.Node _Node) : base(_BitmapText, _Node)
    {
        m_Speed     = _Node.GetFloat("speed", 1);
        m_Size      = _Node.GetFloat("size", 200);
        m_Amplitude = _Node.GetFloat("amplitude", 2);

        m_Directions = new Vector2[DIRECTIONS_LENGTH];
        for (int i = 0; i < m_Directions.Length; i++)
        {
            m_Directions[i] = Random.insideUnitCircle;
        }
    }
    public BitmapTextRainbowAnimation(BitmapText _BitmapText, TagText.Node _Node) : base(_BitmapText, _Node)
    {
        const float step = 1.0f / 7.0f;

        m_Speed              = _Node.GetFloat("speed", 1);
        m_Gradient           = new Gradient();
        m_Gradient.alphaKeys = new GradientAlphaKey[]
        {
            new GradientAlphaKey(1, 0),
            new GradientAlphaKey(1, 1),
        };
        m_Gradient.colorKeys = new GradientColorKey[]
        {
            new GradientColorKey(new Color(1.0f, 0.0f, 0.0f), step * 0),
            new GradientColorKey(new Color(1.0f, 0.5f, 0.0f), step * 1),
            new GradientColorKey(new Color(1.0f, 1.0f, 0.0f), step * 2),
            new GradientColorKey(new Color(0.0f, 1.0f, 0.0f), step * 3),
            new GradientColorKey(new Color(0.0f, 0.5f, 1.0f), step * 4),
            new GradientColorKey(new Color(0.0f, 0.0f, 1.0f), step * 5),
            new GradientColorKey(new Color(1.0f, 0.0f, 1.0f), step * 6),
            new GradientColorKey(new Color(1.0f, 0.0f, 0.0f), step * 7),
        };
    }
Example #3
0
 public BitmapTextBlinkAnimation(BitmapText _BitmapText, TagText.Node _Node) : base(_BitmapText, _Node)
 {
     m_Speed  = _Node.GetFloat("speed", 1);
     m_Source = _Node.GetColor("source", new Color(1, 1, 1, 0.25f));
     m_Target = _Node.GetColor("target", new Color(1, 1, 1, 1));
 }
Example #4
0
 public BitmapTextWaveAnimation(BitmapText _BitmapText, TagText.Node _Node) : base(_BitmapText, _Node)
 {
     m_Speed     = _Node.GetFloat("speed", 1);
     m_Size      = _Node.GetFloat("size", 150);
     m_Amplitude = _Node.GetFloat("amplitude", 2);
 }
 public BitmapTextShowAnimation(BitmapText _BitmapText, TagText.Node _Node) : base(_BitmapText, _Node)
 {
     m_Speed = _Node.GetFloat("speed", 1);
     m_Size  = _Node.GetFloat("size", 3);
 }