예제 #1
0
    private static void AddIngreadient(IngreadientStruct ingreadient)
    {
        var ingreadients = DataStorage.GetSFSArray(dataKeys.ingreadiants.ToString());

        if (!IsDataAvaliable(ingreadient.name, dataKeys.ingreadiants))
        {
            ingreadients.AddSFSObject(ingreadient.ToSfsObj());
        }
    }
예제 #2
0
    private static List <string> GetChildIngreadients(string IngreadientName)
    {
        var result          = new List <string>();
        var allIngreadients = DataStorage.GetSFSArray(dataKeys.ingreadiants.ToString());

        for (int i = 0; i < allIngreadients.Count; i++)
        {
            var ingreadient = new IngreadientStruct((SFSObject)allIngreadients.GetSFSObject(i));
            if (ingreadient.ParentIngreadient == IngreadientName)
            {
                result.Add(ingreadient.name);
            }
        }
        return(result);
    }
예제 #3
0
    internal static IngreadientStruct getIngreadient(string IngreadientName)
    {
        var allIngreadients = DataStorage.GetSFSArray(dataKeys.ingreadiants.ToString());

        for (int i = 0; i < allIngreadients.Count; i++)
        {
            var ingreadient = new IngreadientStruct((SFSObject)allIngreadients.GetSFSObject(i));

            Debug.Log(ingreadient.name + "   " + IngreadientName);
            if (ingreadient.name == IngreadientName)
            {
                return(ingreadient);
            }
        }
        return(null);
    }