public override void OnActivated(Transform[] lanes, float spanX) { for (int i = 0; i < mPowerups.Length; ++i) { mPowerups[i].gameObject.SetActive(true); mPowerups[i].enabled = true; mPowerups[i].GetComponent <SpriteRenderer>().enabled = true; mPowerups[i].transform.localPosition = mOriginalPositions[i]; BlinkObject blink = mPowerups[i].GetComponent <BlinkObject>(); if (blink != null) { blink.enabled = true; } } }
private void OnHit() { mCurrentLives--; if (pLives <= 0) { DoGameOver(); return; } _gameUi.SetLives(pLives); BlinkObject blink = GetComponent <BlinkObject>(); blink.StartBlink(true); _levelManager.StopRunning(); StartCoroutine(DelayedResume(blink.pBlinkDuration)); }