public void updateHealthDispley(float maxHealth, float currentHealth) { float healthBarSize = currentHealth / maxHealth; healthBarSize *= healthBarMaxSize; //get % of max size relative to player health healthAmount.sizeDelta = new Vector2(healthBarSize, healthAmount.sizeDelta.y); healthNumber.newText(currentHealth + "/" + maxHealth); }
public void updateDisplayInformation() { if (deck == null) { Debug.LogWarning("no deck found, can't display information"); return; } cardCountText.newText(deck.getCardsInDeck().ToString()); }