void Death() { _effectsManager.PlayAudioClip(2); GameController.RoundOver(true); //sound sfx and animations stuff this.gameObject.SetActive(false); //Destroy(this.gameObject); }
void Shoot() { if (_playerStatesScript.Bullets > 0) { _effectsManager.PlayAudioClip(1); GameObject b = Instantiate(BulletPrefab, _bulletExit.position, Quaternion.identity); Rigidbody2D rb = b.GetComponent <Rigidbody2D>(); rb.velocity = _bulletExit.transform.right * BulletForce; _playerStatesScript.ModifyBullets(-1); _bullets.Add(b); //_armPivot.DOPause(); Invoke("ActivateEnemy", 0.5f); } else { _effectsManager.PlayAudioClip(3); if (GameController.EnemyActions.Bullets <= 0) { GameController.RoundOver(true, true); } //click sound //Game Over? } }