Exemple #1
0
    void FixedUpdate()
    {
        if (jump)
        {
            Debug.Log("jamp");
            jump = false;
            moveController.Jump();
        }

        if (tongueFlick)
        {
            tongueFlick = false;
            tongueController.FlickTongue();
        }

        if (resetTongue)
        {
            resetTongue = false;
            tongueController.ResetTongue();
        }

        if (reset)
        {
            reset = false;
            GameManager.instance.LoadScene();
        }
    }
Exemple #2
0
    public void Respawn()
    {
        rb.velocity = Vector2.zero;
        tongueController.ResetTongue();

        var checkpoint = GameManager.instance.CurrentCheckpoint;

        if (checkpoint == null)
        {
            transform.position = levelStart.position;
            return;
        }
        transform.position = checkpoint.transform.position;
    }