Example #1
0
    //Loads the phase from a .json file, and returns a dictionary of phases
    public static Dictionary <int, Dictionary <string, string> > LoadPhases(string directory)
    {
        JSONEditor jsonEditor = new JSONEditor(directory);

        Dictionary <int, Dictionary <string, string> > phase = new Dictionary <int, Dictionary <string, string> > ();

        for (int i = 0; i < jsonEditor.NumberOfObjects(); i++)
        {
            phase.Add(i, PhasesSaver.LoadStep(jsonEditor, i));
        }
        return(phase);
    }
Example #2
0
    //Loads the phase from a .json file, and returns a dictionary of phases
    public static Dictionary <int, Dictionary <string, string> > LoadPhases(string directory)
    {
        JSONEditor jsonEditor = new JSONEditor(directory);

        Dictionary <int, Dictionary <string, string> > phase = new Dictionary <int, Dictionary <string, string> > ();

        Debug.Log("Number of steps = " + jsonEditor.NumberOfObjects());
        for (int i = 0; i < jsonEditor.NumberOfObjects(); i++)
        {
            phase.Add(i, PhasesSaver.LoadStep(jsonEditor, i));
            Debug.Log("Adicionando step = " + phase[i]["typeOfStep"]);
        }
        return(phase);
    }