Example #1
0
        private void OnShipHit(Collider2D other)
        {
            if (sharedData.CurrentLives == 0)
            {
                SetComponentsActive(false);
                sharedData.SetGameOver(true);
                GameEvents.OnGameOverEvent?.Invoke();
                Reset();
            }
            else
            {
                sharedData.DecrementLives();
                StartCoroutine(OnRespawnRoutine());
            }

            blastSfx.Play();
        }