private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.CompareTag(Tags.TARGET_TAG)) { var target = collision.gameObject.GetComponent <Target>(); var health = target.GetComponent <Health>(); if (!target.IsDestroying) { health.CurrentValue -= Damage; CollisionEntered?.Invoke(); } Holder.ReturnBulletToHolder(this); } }
private void OnCollisionEnter2D(Collision2D collision) { CollisionEntered?.Invoke(collision); }
private void OnCollisionEnter2D(Collision2D collision) { CollisionEntered?.Invoke(gameObject); //Time.timeScale = 0.5f; }
private void OnCollisionEnter(Collision collision) { CollisionEntered?.Invoke(collision); }