コード例 #1
0
        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));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        public override bool FrameEquals(FrameData framedata)
        {
            TextureFrameData textureFrameData = framedata as TextureFrameData;

            return(textureFrameData != null && base.FrameEquals(framedata) && this.TextureFile.Equals((ResourceData)textureFrameData.TextureFile));
        }