コード例 #1
0
ファイル: PowerupSection.cs プロジェクト: TIPGames/EcoRunner
 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;
         }
     }
 }
コード例 #2
0
        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));
        }