Beispiel #1
0
    public void Respawn()
    {
        CameraFollow Cam = (CameraFollow)FindObjectOfType(typeof(CameraFollow));

        Cam.ChangeCam(false);
        deathScreen.SetActive(false);
        player.transform.position       = spawnPoint;
        GetComponent <player>().enabled = true;
        GetComponent <player>().stats.ResetStats();
        playerSprite.enabled = true;
        if (bc != null)
        {
            bc.enabled = true;
        }
        if (cc != null)
        {
            cc.enabled = true;
        }
        if (crc1 != null)
        {
            crc1.enabled = true;
        }
        if (crc2 != null)
        {
            crc2.enabled = true;
        }
        rb.bodyType = RigidbodyType2D.Dynamic;

        Proc.ResLvls();
    }