public void UpdateUI(TopBar.UI ui, string text, Sprite sprite = null) { switch (ui) { case UI.HardCurrency: { UpdateImageAndText(m_hardCurrency, text, sprite); break; } case UI.SoftCurrency: { UpdateImageAndText(m_softCurrency, text, sprite); break; } case UI.Level: { UpdateImageAndText(m_level, text, sprite); break; } case UI.SoftKey: { UpdateImageAndText(m_softKey, text, sprite); break; } case UI.HardKey: { UpdateImageAndText(m_hardKey, text, sprite); break; } } }
public void UpdateTopBar(TopBar.UI uiElement, Value value, Sprite sprite = null) { m_topBar.UpdateUI(uiElement, value.Amount.ToString(), sprite); }