public void ShowBuff(float buffAmount, string textDesignation, BuffStyle buffStyle) { int buffAmountAsInt = Mathf.RoundToInt(buffAmount); string buffText = buffAmountAsInt.ToString() + "\n" + textDesignation; Color textColor = ReturnColorFromBuffStyle(buffStyle); ExplodeText(buffText, textColor); }
private Color ReturnColorFromBuffStyle(BuffStyle buffStyle) { switch (buffStyle) { case BuffStyle.Positive: return(Color.green); // break; case BuffStyle.Negative: return(Color.yellow); // break; case BuffStyle.Warning: return(Color.white); // break; } return(Color.gray); }