public override bool FrameEquals(FrameData framedata) { TextureFrameData textureFrameData = framedata as TextureFrameData; bool flag = textureFrameData != null; return(flag && base.FrameEquals(framedata) && this.TextureFile.Equals(textureFrameData.TextureFile)); }
private static HashSet <ResourceData> ScanAnimationData(TimelineActionData timelineActionData) { HashSet <ResourceData> result; if (timelineActionData == null) { result = null; } else { HashSet <ResourceData> hashSet = new HashSet <ResourceData>(); foreach (TimelineData current in timelineActionData.Timelines) { if (current.FrameType == typeof(TextureFrame).Name) { using (List <FrameData> .Enumerator enumerator2 = current.Frames.GetEnumerator()) { while (enumerator2.MoveNext()) { TextureFrameData textureFrameData = (TextureFrameData)enumerator2.Current; hashSet.Add(textureFrameData.TextureFile); } } } } result = hashSet; } return(result); }
private static bool UpdateResourcesInAnimationData(TimelineActionData timelineActionData, ChangedResourceCollection changedResourceCollection) { bool flag = false; foreach (TimelineData current in timelineActionData.Timelines) { if (!(current.FrameType != typeof(TextureFrame).Name)) { using (List <FrameData> .Enumerator enumerator2 = current.Frames.GetEnumerator()) { while (enumerator2.MoveNext()) { TextureFrameData textureFrameData = (TextureFrameData)enumerator2.Current; ResourceItemData textureFile = textureFrameData.TextureFile; if (!(textureFile == null)) { ResourceFile resourceFile = null; if (changedResourceCollection.TryGetValue(textureFile, out resourceFile)) { if (resourceFile != null) { textureFile.Update(resourceFile.GetResourceData()); } else { textureFrameData.TextureFile = null; } if (!flag) { flag = true; } } } } } } } return(flag); }
public override bool FrameEquals(FrameData framedata) { TextureFrameData textureFrameData = framedata as TextureFrameData; return(textureFrameData != null && base.FrameEquals(framedata) && this.TextureFile.Equals((ResourceData)textureFrameData.TextureFile)); }