private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Platform") { shootController.DestroyBullet(this.gameObject); } else if (collision.gameObject.tag == "Enemy") { shootController.DestroyEnemy(this.gameObject, collision.gameObject); //Destroy(collision.gameObject); } else if (collision.gameObject.tag == "EnemyBullet") { shootController.DestroyBullet(this.gameObject); collision.gameObject.GetComponent <EnemyBulletController>().Die(); } else if (collision.gameObject.tag == "Ball") { shootController.Win(); Debug.Log("You win"); } }