My way of making L go to next level

bool isCollisionEnabled = true;

    void Update()
    {
        if(state == State.Alive)
        {
            RespondToThrustInput();
            RespondToRotationInput();
            RespondToDebugKeys();
        }
    }

    void RespondToDebugKeys()
    {
        //Wins the level upon pressing the L key
        if (Input.GetKeyDown(KeyCode.L))
        {
            StartSuccessSequence();

        }
        //Changes the collision parameter between 0 and 1, preventing the game from doing anything (including winning) upon collision when the value is 0.
        if (Input.GetKeyDown(KeyCode.C))
        {
            isCollisionEnabled = !isCollisionEnabled;
        }
    }

I think my solution is pretty unique, as i didn’t find others using StartSuccessSequence …it is slower though.

1 Like

Great job experimenting and trying out stuff. That’s how you will grow as a programmer.

1 Like

Privacy & Terms