protected override void DoPower(GameObject paddle) { if (health.Value < 3) { health.addValue(1); } }
// Update is called once per frame void Update() { if (transform.position.y < -stageBounds.y - .5f) { Sounds.PlayAudio(loseLifeClip); health.addValue(-1); if (health.Value <= 0) { Sounds.PlayAudio(loseGameClip); lose.Call(); Destroy(this.gameObject); return; } serveCall.Call(); } }
void Hit() { if (UnityEngine.Random.value >= 0.5) { Sounds.PlayAudio(brickData.hit1Clip); } else { Sounds.PlayAudio(brickData.hit2Clip); } health -= 1; score.addValue(brickData.value); if (health <= 0) { died = true; return; } brickColor -= 1; SetSprite(); }