private static void AddIngreadient(IngreadientStruct ingreadient) { var ingreadients = DataStorage.GetSFSArray(dataKeys.ingreadiants.ToString()); if (!IsDataAvaliable(ingreadient.name, dataKeys.ingreadiants)) { ingreadients.AddSFSObject(ingreadient.ToSfsObj()); } }
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); }
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); }