using UnityEngine;
using System.Collections;
namespace TMPro
{
public enum ColorMode
{
Single,
HorizontalGradient,
VerticalGradient,
FourCornersGradient
}
[System.Serializable]
public class TMP_ColorGradient : ScriptableObject
{
public ColorMode colorMode = ColorMode.FourCornersGradient;
public Color topLeft;
public Color topRight;
public Color bottomLeft;
public Color bottomRight;
const ColorMode k_DefaultColorMode = ColorMode.FourCornersGradient;
static readonly Color k_DefaultColor = Color.white;
///
/// Default Constructor which sets each of the colors as white.
///
public TMP_ColorGradient()
{
colorMode = k_DefaultColorMode;
topLeft = k_DefaultColor;
topRight = k_DefaultColor;
bottomLeft = k_DefaultColor;
bottomRight = k_DefaultColor;
}
///
/// Constructor allowing to set the default color of the Color Gradient.
///
///
public TMP_ColorGradient(Color color)
{
colorMode = k_DefaultColorMode;
topLeft = color;
topRight = color;
bottomLeft = color;
bottomRight = color;
}
///
/// The vertex colors at the corners of the characters.
///
/// Top left color.
/// Top right color.
/// Bottom left color.
/// Bottom right color.
public TMP_ColorGradient(Color color0, Color color1, Color color2, Color color3)
{
colorMode = k_DefaultColorMode;
this.topLeft = color0;
this.topRight = color1;
this.bottomLeft = color2;
this.bottomRight = color3;
}
}
}