Exemple #1
0
    public static IEnumerator LoadDressingXML()
    {
        XMLDressing xmlLetters = new XMLDressing();

        yield return(xmlLetters.LoadFromResources("Gameplay/dressing"));

        XMLController.Instance.isDressingLoaded = true;
        yield return(true);
    }
Exemple #2
0
    private void SerializeLevelFromXML(string path, XmlReader reader)
    {
        var         serializer  = new XmlSerializer(typeof(XMLDressing));
        XMLDressing xmlDressing = serializer.Deserialize(reader) as XMLDressing;

        Dictionary <int, DressingCategoriesTO> categories = new Dictionary <int, DressingCategoriesTO>();

        foreach (DressingCategoriesTO category in xmlDressing.cat)
        {
            if (!categories.ContainsKey(category.id))
            {
                categories.Add(category.id, category);
            }
        }
        DressingController.Instance.Dressing = categories;
    }