// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.LeftArrow) && !Input.GetKey(KeyCode.RightArrow)) { LateralMove(Vector2.left); } else if (!Input.GetKey(KeyCode.LeftArrow) && Input.GetKey(KeyCode.RightArrow)) { LateralMove(Vector2.right); } if (Input.GetKey(KeyCode.Space) && energyManager.GetCurrentEnergy() > 0) { Thrust(); anim.SetBool("launching", true); } else { anim.SetBool("launching", false); } }