private void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.tag == "life") { life = life + 1; } if (other.gameObject.tag == "killbox") { thegamemanager.EndGame(); speedIncreaseMilestone = speedIncreaseMilestoneStore; speedMilestoneCounte = speedmilestonecountstore; movespeed = movespeedstore; tempMoveSpeedDown = tempMoveSpeedDownstore; tempMoveSpeedUp = tempMoveSpeedUpstore; life = 3f; sound.DeathSound(); } if (other.gameObject.tag == "enemy") { other.gameObject.SetActive(false); GetPlayerHit(); } }