예제 #1
0
    /* --------------------------------------- Destroy & Restart ---------------------------------------
     * > Called from UserController
     * > Destroys all the gameobjects
     */
    public override void DestroyAndReset()
    {
        base.DestroyAndReset();

        // Destroy sorting elements
        elementManager.DestroyAndReset();

        // Destroy holders
        holderManager.DestroyAndReset();

        // Reset algorithm
        sortAlgorithm.ResetSetup();

        // Reset displays
        displayUnitManager.DestroyDisplaysContent(); // pseudocode
        displayUnitManager.ResetDisplays();

        // Hide sorting table and bring back menu
        StartCoroutine(ActivateTaskObjects(false));


        // test stuff
        //switch (sortSettings.TeachingMode)
        //{
        //    case Util.DEMO: case Util.STEP_BY_STEP: demoManager.ResetState(); break;
        //    case Util.USER_TEST: userTestManager.ResetState(); break;
        //    default: Debug.Log("Teaching mode '" + sortSettings.TeachingMode + "' not found"); break;
        //}
    }