示例#1
0
    void LoadData(QuestionBoxSaveData data)
    {
        if (data != null)
        {
            if (data.itemsExpecting != null)
            {
                for (int i = 0; i < data.itemsExpecting.Length; i++)
                {
                    System.Object o;
                    o = System.Enum.Parse(typeof(AcidsList), data.itemsExpecting[i]);
                    if (o == null)
                    {
                        o = System.Enum.Parse(typeof(BasesList), data.itemsExpecting[i]);
                    }
                    else if (o == null)
                    {
                        o = System.Enum.Parse(typeof(IndicatorsList), data.itemsExpecting[i]);
                    }
                    else if (o == null)
                    {
                        o = System.Enum.Parse(typeof(SaltsList), data.itemsExpecting[i]);
                    }
                    else if (o == null)
                    {
                        o = System.Enum.Parse(typeof(NormalItemList), data.itemsExpecting[i]);
                    }

                    Debug.Log("e is: " + o.ToString());
                    //itemsExpecting[i] = ItemManager.instance.itemDictionary[o].GetComponent<ItemsDescription>();
                }
            }
            unlocked = data.unlocked;
            //prevAnswerState = unlocked;
            dialogueSystem.ChangeDialogueSequenceTo(data.dialogueSequenceIndex);
            correctAnswers = data.corretAnswers;
        }
    }