Exemplo n.º 1
0
        private bool HasEqualCollections <IResource>(IResource resource)
        {
            bool result = false;

            if (resource is Map)
            {
                var map = resource as Map;

                foreach (var entityCollection in map.EntityCollections)
                {
                    foreach (var item in EntityCollections)
                    {
                        if (!item.IsEqual(entityCollection))
                        {
                            return(false);
                        }
                    }
                }

                foreach (var transition in map.Transitions)
                {
                    if (!Transitions.Contains(transition))
                    {
                        return(false);
                    }
                }

                foreach (var tileset in map.Tilesets)
                {
                    foreach (var item in Tilesets)
                    {
                        if (!item.IsEqual(tileset))
                        {
                            return(false);
                        }
                    }
                }

                foreach (var tile in map.Tiles)
                {
                    if (!Tiles.Contains(tile))
                    {
                        return(false);
                    }
                }

                return(true);
            }

            return(result);
        }