//public void LaserHit(PlayerControlls enemy) {
    //    health--;
    //    if (health <= 0) {
    //        gameManager.RespawnPlayer(this);
    //        gameObject.SetActive(false);
    //    }
    //}

    void OnCollisionEnter2D(Collision2D collision)
    {
        if ((collision.gameObject.tag == "Player" || collision.gameObject.tag == "Debris") && collision.relativeVelocity.magnitude > 0)
        {
            gameManager.RespawnPlayer(this);
            gameObject.SetActive(false);
            if (team % 2 == 0)
            {
                redFlag.SetActive(true);
                playerRedFlag.SetActive(false);
            }
            else
            {
                blueFlag.SetActive(true);
                playerBlueFlag.SetActive(false);
            }
        }
    }