void SetColor(Color color)
{
if (curType == ComponentType.ENUM_LABEL)
{
for (int i = 0; i < tran.Length; i++)
{
UILabel lb = tran[i].GetComponent <UILabel>();
if (lb != null)
{
switch (witchColor)
{
case 0:
lb.color = color;
lb.MarkAsChanged();
break;
case 1:
lb.TopColor = color;
lb.MarkAsChanged();
break;
case 2:
lb.BottomColor = color;
lb.MarkAsChanged();
break;
case 3:
lb.effectColor = color;
break;
default:
break;
}
}
}
}
else if (curType == ComponentType.ENUM_SPRITE)
{
for (int i = 0; i < tran.Length; i++)
{
UISprite sp = tran[i].GetComponent <UISprite>();
if (sp != null)
{
if (witchColor == 0)
{
sp.color = color;
sp.MarkAsChanged();
}
}
}
}
}