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(); } }
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; }