private void OnTriggerEnter2D(Collider2D other) { if (_wasPickedUp) { return; } _wasPickedUp = true; _collider.enabled = false; _spriteRenderer.enabled = false; _wasPickedUpEvent.position = transform.position; _wasPickedUpEvent.Raise(this, _wasPickedUpEvent); StartCoroutine(HideCoroutine()); }
private void HandleCharacterWasHit() { if (_isDying) { return; } _characterDidDieEvent.Raise(this, _characterDidDieEvent); _isDying = true; _gun.enabled = false; _movementController.enabled = false; _characterAnimationController.enabled = false; StartCoroutine(DyingCoroutine(Vector2.right)); }