예제 #1
0
        internal static RenderedNode getNodeFromTextContent(TextContent textContent)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource = NodeSourceTypeTextContent;
            node.Title           = textContent.Title;
            node.Excerpt         = textContent.Excerpt;
            if (textContent.ImageData != null)
            {
                node.ImageBaseUrl = textContent.ImageData.ContentUrlBase;
            }
            node.ActualContentUrl = "../" + textContent.SemanticDomainName + "/" + textContent.Name + "/" + textContent.ID;
            if (textContent.Categories != null)
            {
                node.Categories.CollectionContent.AddRange(getCategoryCollectionTexts(textContent.Categories, getTitleOrNameFromCategory));
                node.CategoryNames.CollectionContent.AddRange(getCategoryCollectionTexts(textContent.Categories, cat => cat.CategoryName));
            }
            if (textContent.Locations != null)
            {
                node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(textContent.Locations));
            }
            node.Authors.CollectionContent.Add(getShortTextObject(textContent.Author));
            node.MainSortableText = textContent.SortOrderNumber.ToString();
            return(node);
        }
예제 #2
0
        internal static RenderedNode getNodeFromCategory(Category category)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource = NodeSourceTypeCategory;
            node.Title           = category.Title;
            node.Excerpt         = category.Excerpt;
            if (category.ImageData != null)
            {
                node.ImageBaseUrl = category.ImageData.ContentUrlBase;
            }
            //node.ActualContentUrl = "../" + textContent.SemanticDomainName + "/" + textContent.Name + "/" + textContent.ID;
            if (category.ParentCategory != null)
            {
                node.Categories.CollectionContent.Add(getShortTextObject(category.ParentCategory.Title));
                node.CategoryNames.CollectionContent.Add(getShortTextObject(category.ParentCategory.CategoryName));
            }
            node.IsCategoryFilteringNode = true;
            node.CategoryFilters.CollectionContent.Add(getShortTextObject(category.CategoryName));
            //if (textContent.Locations != null)
            //    node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(textContent.Locations));
            //node.Authors.CollectionContent.Add(getShortTextObject(textContent.Author));
            //node.MainSortableText = textContent.SortOrderNumber.ToString();
            return(node);
        }
예제 #3
0
        internal static RenderedNode getNodeFromActivity(Activity activity)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource  = NodeSourceTypeActivity;
            node.Title            = activity.ActivityName;
            node.Excerpt          = activity.Excerpt;
            node.ImageBaseUrl     = activity.ProfileImage.ImageData.ContentUrlBase;
            node.ActualContentUrl = activity.ReferenceToInformation.URL;
            node.TimestampText    = getTimeStampText(activity.StartingTime);
            node.Categories.CollectionContent.AddRange(getCategoryCollectionTexts(activity.CategoryCollection, getTitleOrNameFromCategory));
            node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(activity.LocationCollection));
            node.Authors.CollectionContent.Add(getShortTextObject(activity.ContactPerson));
            node.MainSortableText = activity.StartingTime.ToString("s");
            return(node);
        }
예제 #4
0
        internal static RenderedNode getNodeFromBlog(Blog blog)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource  = NodeSourceTypeBlog;
            node.Title            = blog.Title;
            node.Excerpt          = blog.Excerpt;
            node.ImageBaseUrl     = blog.ProfileImage.ImageData.ContentUrlBase;
            node.ActualContentUrl = blog.ReferenceToInformation.URL;
            node.TimestampText    = getTimeStampText(blog.Published);
            node.Categories.CollectionContent.AddRange(getCategoryCollectionTexts(blog.CategoryCollection, getTitleOrNameFromCategory));
            node.CategoryNames.CollectionContent.AddRange(getCategoryCollectionTexts(blog.CategoryCollection, cat => cat.CategoryName));
            node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(blog.LocationCollection));
            node.Authors.CollectionContent.Add(getShortTextObject(blog.Author));
            node.MainSortableText = blog.Published.ToString("s");
            return(node);
        }
예제 #5
0
    public void RenderMap()
    {
        if (renderedMap != null)
        {
            CleanMap();
        }
        renderedMap = new Dictionary <Vector2, RenderedNode>();

        foreach (KeyValuePair <Vector2, MapNode> mapNode in mapInfo.generatedMapDictionary)
        {
            GameObject   prefab   = ReturnPrefabForName(mapNode.Value.GetNodeType());
            GameObject   temp     = GameObject.Instantiate(prefab, mapNode.Key, prefab.transform.rotation, dynamicParent.transform);
            RenderedNode tempNode = temp.AddComponent <RenderedNode>();
            tempNode.ChangeType(mapNode.Value.GetNodeType());
            renderedMap.Add(temp.transform.position, tempNode);
        }

        Camera.main.transform.position = new Vector3(mapInfo.mapSize, mapInfo.mapSize / 2, -mapInfo.mapSize - 2f);
    }