public void GenerateFrames() { if (Image.GetChild("delay") == null) { return; } frames = new List <MapObjectFrame>(); IMGEntry originalImage = Image.parent; foreach (IMGEntry frame in originalImage.childs.Values) { MapObjectFrame f = new MapObjectFrame(); try { f.ID = int.Parse(frame.Name); } catch { continue; // to handle:"blend" } f.Image = Map.GetRealImage(frame); f.Object = Object; animationTime += f.Image.GetInt("delay"); frames.Add(f); } frames = frames.OrderBy(x => x.ID).ToList <MapObjectFrame>(); }
public void GenerateFrames() { frames = new List <MapBackFrame>(); IMGEntry originalImage = Image.parent; foreach (IMGEntry frame in originalImage.childs.Values) { MapBackFrame f = new MapBackFrame(); f.ID = int.Parse(frame.Name); f.Image = Map.GetRealImage(frame); f.Object = Object; animationTime += f.Image.GetInt("delay"); frames.Add(f); } frames = frames.OrderBy(x => x.ID).ToList <MapBackFrame>(); }