private void Rendercostss(Rect rect, Card card) { int value = 0; Texture texture = null; if (card.getCostOrder() > 0) { value = card.getCostOrder(); texture = icon_order; } else { if (card.getCostEnergy() > 0) { value = card.getCostEnergy(); texture = icon_energy; } else { if (card.getCostDecay() > 0) { value = card.getCostDecay(); texture = icon_decay; } else { if (card.getCostGrowth() > 0) { value = card.getCostGrowth(); texture = icon_growth; } } } } if (texture != null) { GUI.DrawTexture(rect, texture); char[] array = Convert.ToString(value).ToCharArray(); for (int i = 0; i < array.Length; i++) { Rect position = new Rect(rect.xMax + 5f - (float)(array.Length - i) * rect.height * 0.6f, rect.y + 1f, rect.height * 0.7f, rect.height); Texture image = zahlenarray[(int)Char.GetNumericValue(array[i])]; GUI.DrawTexture(position, image); } } }