Example #1
0
    public void init(int startDifficulty, string startPhase, TextAsset options)
    {
        Debug.Log("init start");
        allOptions = new List <OptionsHolder>();
        JSONObject json = new JSONObject(options.text);

        foreach (JSONObject difficulties in json.list)
        {
            Debug.Log("diff " + difficulties);
            allOptions.Add(new OptionsHolder(difficulties));
        }
        Debug.Log("alloptions count : " + allOptions.Count);
        //currentOptions = allOptions[startDifficulty];

        //Eviter deux fois charger 1ere phase, startDifficulty et startPhase inutiles ?
        currentOptions.switchDifficulty(allOptions[startDifficulty]);
        currentOptions.switchPhase(startPhase);


        Debug.Log("init end");
    }
Example #2
0
 public void changePhase(string name)
 {
     currentOptions.switchPhase(name);
 }