Exemple #1
0
        private void SetHealth(UISceneIntegratedSelectable miniature)
        {
            float actualHealth = miniature.Health / miniature.MaxHealth;

            _healthBar.StatusBar.fillAmount = actualHealth;
            _healthBar.StatusText.text      = string.Format("{0} / {1}", actualHealth * 100, miniature.MaxHealth);
        }
Exemple #2
0
        private void CreateSelectable(int type)
        {
            var selectable = new UISceneIntegratedSelectable();

            selectable.Type = type;
            _mainList.Add(selectable);
        }
Exemple #3
0
        private void SetMana(UISceneIntegratedSelectable miniature)
        {
            float actualMana = miniature.Mana / miniature.MaxMana;

            _manaBar.StatusBar.fillAmount = actualMana;
            _manaBar.StatusText.text      = string.Format("{0} / {1}", actualMana * 100, miniature.MaxMana);
            _manaBar.gameObject.SetActive(miniature.MaxMana != 0);
        }