Exemple #1
0
    protected override void SwitchStates()
    {
        switch (states)
        {
        case 0:
            Startstate.SetActive(true);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 1:
            Startstate.SetActive(false);
            Firststate.SetActive(true);
            Secondstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 2:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(true);
            Finishedstate.SetActive(false);
            break;

        case 3:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Finishedstate.SetActive(true);
            break;
        }
    }
    //3rd method, switches the states of the puzzle and in puzzle 1 will also move the levers with the puzzle if need be
    protected override void SwitchStates()
    {
        switch (states)
        {
        case 0:
            Startstate.SetActive(true);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Finishedstate.SetActive(false);
            Switch2move.position = new Vector3(Switch2move.position.x, .68f, Switch2move.position.z);
            Switch3move.position = new Vector3(Switch3move.position.x, -.36f, Switch2move.position.z);
            break;

        case 1:
            Startstate.SetActive(false);
            Firststate.SetActive(true);
            Secondstate.SetActive(false);
            Finishedstate.SetActive(false);
            Switch2move.position = new Vector3(Switch2move.position.x, .12f, Switch2move.position.z);
            Switch3move.position = new Vector3(Switch3move.position.x, -.36f, Switch2move.position.z);
            break;

        case 2:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(true);
            Finishedstate.SetActive(false);
            Switch2move.position = new Vector3(Switch2move.position.x, .68f, Switch2move.position.z);
            Switch3move.position = new Vector3(Switch3move.position.x, .12f, Switch2move.position.z);
            break;

        case 3:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Finishedstate.SetActive(true);
            Switch2move.position = new Vector3(Switch2move.position.x, .12f, Switch2move.position.z);
            Switch3move.position = new Vector3(Switch3move.position.x, .12f, Switch2move.position.z);
            break;
        }
    }
    protected override void SwitchStates()
    {
        switch (states)
        {
        case 0:
            Startstate.SetActive(true);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Thirdstate.SetActive(false);
            Fourthstate.SetActive(false);
            Fifthstate.SetActive(false);
            Sixthstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 1:
            Startstate.SetActive(false);
            Firststate.SetActive(true);
            Secondstate.SetActive(false);
            Thirdstate.SetActive(false);
            Fourthstate.SetActive(false);
            Fifthstate.SetActive(false);
            Sixthstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 2:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(true);
            Thirdstate.SetActive(false);
            Fourthstate.SetActive(false);
            Fifthstate.SetActive(false);
            Sixthstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 3:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Thirdstate.SetActive(true);
            Fourthstate.SetActive(false);
            Fifthstate.SetActive(false);
            Sixthstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 4:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Thirdstate.SetActive(false);
            Fourthstate.SetActive(true);
            Fifthstate.SetActive(false);
            Sixthstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 5:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Thirdstate.SetActive(false);
            Fourthstate.SetActive(false);
            Fifthstate.SetActive(true);
            Sixthstate.SetActive(false);
            Finishedstate.SetActive(false);
            break;

        case 6:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Thirdstate.SetActive(false);
            Fourthstate.SetActive(false);
            Fifthstate.SetActive(false);
            Sixthstate.SetActive(true);
            Finishedstate.SetActive(false);
            break;

        case 7:
            Startstate.SetActive(false);
            Firststate.SetActive(false);
            Secondstate.SetActive(false);
            Thirdstate.SetActive(false);
            Fourthstate.SetActive(false);
            Fifthstate.SetActive(false);
            Sixthstate.SetActive(false);
            Finishedstate.SetActive(true);
            break;
        }
    }