示例#1
0
        public override void DoAction()
        {
            base.DoAction();

            //Restore player health
            //Value to restore depends on the level
            int helathToRestore = Random.Range(3, Math.Max(5, 20 - 2 * GameManager.Instance.Level));

            _player.Health.AddValue(helathToRestore);
            _player.HealthText.text    = _player.Health.Value.ToString();
            _tile.HealthToAddText.text = "Health + " + helathToRestore;
            _tile.StartCoroutine(DungeLikeHelper.ShowForSeconds(_tile.HealthToAddText.gameObject));
        }
示例#2
0
        public override void DoAction()
        {
            base.DoAction();

            //Restore player mana
            //Value to restore depends on the level
            int manaToRestore = Random.Range(1, Math.Max(2, 10 - 2 * GameManager.Instance.Level));

            _player.Mana.AddValue(manaToRestore);
            _player.ManaText.text    = _player.Mana.Value.ToString();
            _tile.ManaToAddText.text = "Mana + " + manaToRestore;
            _tile.StartCoroutine(DungeLikeHelper.ShowForSeconds(_tile.ManaToAddText.gameObject));
        }