void Update()
    {
        if (!waitingToMove)
        {
            movement.x = Input.GetAxisRaw("Horizontal");
        }
        if (!waitingToMove)
        {
            movement.y = Input.GetAxisRaw("Vertical");
        }

        if (movement.x != 0 || movement.y != 0)
        {
            archiveMovement = movement;
        }

        if (Input.GetKeyDown(KeyCode.Mouse0))
        {
            if (waitingToRespawn)
            {
                return;
            }
            if (waitingToMove)
            {
                return;
            }
            Attack();
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            Debug.Log("trigger 1");
            if (waitingToRespawn)
            {
                Respawn();
            }
            Debug.Log("trigger 2");
            if (waitingToMove)
            {
                return;
            }
            Debug.Log("trigger 3");
            if (!stam.CheckIfEnoughStamina(riftStamCost))
            {
                return;
            }
            Debug.Log("trigger 4");
            waitingToMove = true;
            RiftSetup();
        }

        if (Input.GetKeyDown(KeyCode.T))
        {
            TakeDamage(20);
        }
    }