// Use this for initialization public void AddToScore() { powerSlider.value += 20; score++; UpdateText(); if (powerSlider.value >= 100) { powerSlider.value = 0; livesScript.GainLife(); } //powerBar.transform.localScale = new Vector3(transform.localScale.x, transform.localScale.y + 10f, transform.localScale.z); Debug.Log("Score: " + score); }
public void AddLife(int lifes) { _playerLives.GainLife(lifes); }