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 BitmapTextAnimation(BitmapText _BitmapText, TagText.Node _Node) { m_BitmapText = _BitmapText; m_Characters = new List <BitmapCharacter>(); if (_Node == null) { return; } int sourceIndex = _Node.Index; int targetIndex = _Node.Index + _Node.Length; foreach (BitmapCharacter character in m_BitmapText.Characters) { if (character.Enabled && character.Visible && character.Index >= sourceIndex && character.Index <= targetIndex) { m_Characters.Add(character); } } }
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), }; }
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)); }
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); }