public static string get_CatalogOutlineString(outline cc) { string html_filePath = "section" + cc.secid + ".html"; string htmlcode = string.Empty; switch (cc.type) { case outlinetype.Section1: htmlcode = "<CatalogSection Level=\"2\"><p onclick='window.external.MN_opensection(\"" + cc.secid + "\")' html_filePath=\"" + html_filePath + "\" style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:10.0pt;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;line-height:20.0pt;font-size:12.0pt;font-family:宋体;cursor:pointer;'>" + "" + PadRightEx(cc.secid + " " + cc.Name1, 70, '.') + "" + "</p></CatalogSection>"; break; case outlinetype.Section2: htmlcode = "<CatalogSection Level=\"3\"><p onclick='window.external.MN_opensection(\"" + cc.secid + "\")' html_filePath=\"" + html_filePath + "\" style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:20.0pt;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;line-height:20.0pt;font-size:12.0pt;font-family:宋体;cursor:pointer;'>" + "" + PadRightEx(cc.secid + " " + cc.Name1, 72, '.') + "" + "</p></CatalogSection>"; break; case outlinetype.Chapter: htmlcode = "<CatalogSection Level=\"1\"><p onclick='window.external.MN_opensection(\"" + cc.secid + "\")' html_filePath=\"" + html_filePath + "\" style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;line-height:20.0pt;font-size:12.0pt;font-family:宋体;cursor:pointer;'>" + "" + PadRightEx(cc.secid + " " + cc.Name1, 74, '.') + "" + "</p></CatalogSection>"; break; default: html_filePath = cc.nodename + ".html"; htmlcode = "<CatalogSection Level=\"1\"><p onclick='window.external.MN_opensection(\"" + cc.nodename + "\")' html_filePath=\"" + html_filePath + "\" style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;line-height:20.0pt;font-size:12.0pt;font-family:宋体;cursor:pointer;'>" + "" + PadRightEx(cc.Name1, 74, '.') + "" + "</p></CatalogSection>"; break; } return(htmlcode); }
void itemClick() // 아이템 마우스 클릭 : ItemCollectScene(아이템 Btn이미지 변경), GameScene(아이템 던지기) { highlightBox.SetActive(false); Ray cameraRay = playerCamera.ScreenPointToRay(Input.mousePosition); RaycastHit rayHit; if (Physics.Raycast(cameraRay, out rayHit)) { GameObject hitObj = rayHit.transform.gameObject; if (sceneName == "ItemCollectScene") { bool possess = false; if (hitObj.GetComponentInChildren <outline>() != null) // outline 스크립트 있는 지 여부 판단, 없는 오브젝트 무시 { possess = true; } if (possess == true && hitObj.GetComponentInChildren <outline>().isActiveAndEnabled == true) // 아이템 가방창에 이미지 변경 { if (hitObj.tag == "item") { s_itemBtn.InputGetItemArr(hitObj); } else if (hitObj.tag == "weapon" || hitObj.tag == "armor") { s_itemBtn.GetComponent <ItemBtn>().inputGameObj(hitObj); } } } else if (sceneName == "GameScene") //아웃라인 활성화 상태인 아이템 클릭 후 캐릭터 머리 위로 옮기고 서버에 주운 아이템 정보 보내기 { outline ObjOutline = hitObj.GetComponent <outline>(); if (hitObj.layer == (int)eLAYER.TOUCHABLE && ObjOutline.isActiveAndEnabled == true) { hitObj.GetComponent <Rigidbody>().useGravity = false; Vector3 newPos = transform.position; newPos.y += 5; hitObj.transform.position = newPos; hitObj.GetComponent <outline>().enabled = false; getItem = hitObj; int itemNum = s_itemSpawn.GetObjNum(hitObj); sGetObj getObj = new sGetObj(itemNum); SocketServer.SingleTonServ().SendMsg(getObj); Debug.Log("send Succ"); transform.Find("Canvas").Find("ThrowPoint").gameObject.SetActive(true); } else { highlightBox.SetActive(true); } } } else { highlightBox.SetActive(true); } }
/// <summary> /// Builds the outline. /// </summary> /// <param name="xmlWriter">The XML writer.</param> /// <param name="htmlToPdfFiles">The HTML to PDF files.</param> /// <param name="tableOfContentsIncluded">if set to <c>true</c> indicates a table of contents is included in the PDF.</param> internal static void BuildOutline(XmlWriter xmlWriter, IReadOnlyCollection <HtmlToPdfFile> htmlToPdfFiles, bool tableOfContentsIncluded) { outline outline = new outline { Items = BuildOutline(htmlToPdfFiles.SelectMany(x => x.TitleAndHeadings), tableOfContentsIncluded), }; var serializer = new XmlSerializer(typeof(outline)); XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces(); namespaces.Add(string.Empty, "http://wkhtmltopdf.org/outline"); serializer.Serialize(xmlWriter, outline, namespaces); }
public static string write_CatalogOutline(outline ch) { string htmlcode = string.Empty; htmlcode = get_CatalogOutlineString(ch); if (ch.children.Count == 0) { return(htmlcode); } else { foreach (outline ca in ch.children) { htmlcode = htmlcode + write_CatalogOutline(ca); } return(htmlcode); } }
private void Awake() { scene = SceneManager.GetActiveScene(); if (scene.name == "ItemCollectScene") { highlightBox = GameObject.Find("Player").transform.Find("chkHighlight").gameObject; } else if (scene.name == "GameScene") { hitEffect = GameObject.Find("HitEffect"); s_player = SocketServer.SingleTonServ().NowPlayerScript(); highlightBox = s_player.gameObject.transform.Find("chkHighlight").gameObject; } highlightBox.SetActive(true); if (transform.name == "swordAndShield(Clone)") //swordAndShield 자식 오브젝트 둘 모두에게 적용 { s_outline2 = transform.GetComponentsInChildren <outline>(); } else { s_outline = transform.GetComponentInChildren <outline>(); } }
void itemClick() // 던질 아이템 클릭 가능 여부 체크 및 클릭한 아이템 머리 위로 위치 이동, targetZone 생성 조건 On! { highlightBox.SetActive(false); Ray cameraRay = playerCamera.ScreenPointToRay(Input.mousePosition); RaycastHit rayHit; if (Physics.Raycast(cameraRay, out rayHit)) { GameObject hitObj = rayHit.transform.gameObject; outline ObjOutline = hitObj.GetComponent <outline>(); if (hitObj.layer == (int)eLAYER.TOUCHABLE && ObjOutline.isActiveAndEnabled == true) { Debug.Log("click"); hitObj.GetComponent <Rigidbody>().useGravity = false; Vector3 newPos = transform.position; newPos.y += 5; hitObj.transform.position = newPos; getItem = hitObj; hitObj.GetComponent <Rigidbody>().useGravity = false; int itemNum = s_itemSpawn2.GetObjNum(hitObj); sGetObj getObj = new sGetObj(itemNum); SocketServer.SingleTonServ().SendMsg(getObj); Debug.Log("send Succ"); transform.Find("Canvas").Find("ThrowPoint").gameObject.SetActive(true); } else { highlightBox.SetActive(true); } } else { highlightBox.SetActive(true); } }
private ObservableCollection<outline> getChildren(XmlNode xn) { ObservableCollection<outline> list = new ObservableCollection<outline>(); foreach (XmlNode xn2 in xn.ChildNodes) { outline ol = new outline(){text=getAttribute("text",xn2),type=getAttribute("type",xn2),url=getAttribute("url",xn2)}; ol.children.AddRange(getChildren(xn2)); list.Add(ol); } return list; }