My Solution but disabled more then i expected

 void Update()
    {
        if (state == State.Alive)
        {
            RespondToThurstInput();
            RespondTORotateInput();
        }
        Debug();

    }

    void Debug()
    {


        if (Input.GetKey(KeyCode.L))
        {
            LoadNextScene();
            print("Next level loaded");
        }

        if (Input.GetKeyDown(KeyCode.C))
        {
            if (rigidBody.detectCollisions == true)
            {
                rigidBody.detectCollisions = false;
                print("Collision Disabled");
            }
            else if (rigidBody.detectCollisions == false)
            {
                rigidBody.detectCollisions = true;
                print("Collision Enabled");
            }
            

        }
1 Like

Privacy & Terms