private void OnTriggerEnter2D(Collider2D collision) { if (collision.transform.tag == "item3") { Destroy(collision.gameObject); Player.PowerTimer(); WSServer.PlayerPowerUp(DeviceId); } if (collision.transform.tag == "item4") { Destroy(collision.gameObject); Player.SpeedTimer(); } if (collision.transform.tag == "item5") { body.drag = 6.5f; } if (collision.transform.tag == "item6") { GameObject white = GameObject.FindWithTag("item7"); this.transform.position = white.transform.position; Destroy(collision.gameObject); Destroy(white.gameObject); } if (collision.transform.tag == "item8") { body.drag = 0.0f; } if (collision.transform.tag == "item9") { if (OnEatSmallNetItem != null) { OnEatSmallNetItem(DeviceId); } Destroy(collision.gameObject); } if (collision.transform.tag == "item10") { if (OnEatBigNetItem != null) { OnEatBigNetItem(DeviceId); } Destroy(collision.gameObject); } }