{"id":1191,"date":"2014-05-19T09:30:53","date_gmt":"2014-05-19T09:30:53","guid":{"rendered":"http:\/\/www.clonefactor.com\/wordpress\/?p=1191"},"modified":"2014-05-19T09:30:53","modified_gmt":"2014-05-19T09:30:53","slug":"%e8%b3%87%e6%ba%90%e4%b8%8a%e7%9a%84%e6%b5%aa%e8%b2%bb","status":"publish","type":"post","link":"https:\/\/www.clonefactor.com\/wordpress\/program\/unity3d\/1191\/","title":{"rendered":"\u8cc7\u6e90\u4e0a\u7684\u6d6a\u8cbb."},"content":{"rendered":"<p>\u5617\u8a66\u505a Dungeon Editor \u7684\u6642\u5019.<br \/>\n\u5f9e OOP \u7684\u5c64\u9762\u60f3, \u6bcf\u500b block \u9700\u8981\u77e5\u9053\u6bcf\u500b\u9130\u8fd1\u7684 block \u662f\u751a\u9ebc\u6240\u4ee5\u5f04\u4e86\u4e00\u500b list \u628a 26 \u500b block \u90fd\u653e\u9032\u53bb.<\/p>\n<pre class=\"brush:csharp\">#region variable\r\nList&lt;IBlock&gt; mNeighbor = new List&lt;IBlock&gt;(26);\r\n#endregion\r\n\r\n#region getter\/setter\r\n\/\/ Upper level\r\n\/\/ 00,01,02\r\n\/\/ 03,04,05\r\n\/\/ 06,07,08\r\npublic bool IsEmptyUNW\t\t{get{return ReferenceEquals(null,mNeighbor[0]);}}\r\npublic bool IsEmptyUN\t\t{get{return ReferenceEquals(null,mNeighbor[1]);}}\r\npublic bool IsEmptyUNE\t\t{get{return ReferenceEquals(null,mNeighbor[2]);}}\r\npublic bool IsEmptyUW\t\t{get{return ReferenceEquals(null,mNeighbor[3]);}}\r\npublic bool IsEmptyU\t\t{get{return ReferenceEquals(null,mNeighbor[4]);}}\r\npublic bool IsEmptyUE\t\t{get{return ReferenceEquals(null,mNeighbor[5]);}}\r\npublic bool IsEmptyUSW\t\t{get{return ReferenceEquals(null,mNeighbor[6]);}}\r\npublic bool IsEmptyUS\t\t{get{return ReferenceEquals(null,mNeighbor[7]);}}\r\npublic bool IsEmptyUSE\t\t{get{return ReferenceEquals(null,mNeighbor[8]);}}\r\n\r\n\/\/ Current level\r\n\/\/ 09,10,11\r\n\/\/ 12,  ,13\r\n\/\/ 14,15,16\r\npublic bool IsEmptyNW\t\t{get{return ReferenceEquals(null,mNeighbor[9]);}}\r\npublic bool IsEmptyN\t\t{get{return ReferenceEquals(null,mNeighbor[10]);}}\r\npublic bool IsEmptyNE\t\t{get{return ReferenceEquals(null,mNeighbor[11]);}}\r\npublic bool IsEmptyW\t\t{get{return ReferenceEquals(null,mNeighbor[12]);}}\r\npublic bool IsEmpty\t\t\t{get{return transform.childCount==0;}}\r\npublic bool IsEmptyE\t\t{get{return ReferenceEquals(null,mNeighbor[13]);}}\r\npublic bool IsEmptySW\t\t{get{return ReferenceEquals(null,mNeighbor[14]);}}\r\npublic bool IsEmptyS\t\t{get{return ReferenceEquals(null,mNeighbor[15]);}}\r\npublic bool IsEmptySE\t\t{get{return ReferenceEquals(null,mNeighbor[16]);}}\r\n\r\n\/\/ Lower level\r\n\/\/ 17,18,19\r\n\/\/ 20,21,22\r\n\/\/ 23,24,25\r\npublic bool IsEmptyLNW\t\t{get{return ReferenceEquals(null,mNeighbor[17]);}}\r\npublic bool IsEmptyLN\t\t{get{return ReferenceEquals(null,mNeighbor[18]);}}\r\npublic bool IsEmptyLNE\t\t{get{return ReferenceEquals(null,mNeighbor[19]);}}\r\npublic bool IsEmptyLW\t\t{get{return ReferenceEquals(null,mNeighbor[20]);}}\r\npublic bool IsEmptyL\t\t{get{return ReferenceEquals(null,mNeighbor[21]);}}\r\npublic bool IsEmptyLE\t\t{get{return ReferenceEquals(null,mNeighbor[22]);}}\r\npublic bool IsEmptyLSW\t\t{get{return ReferenceEquals(null,mNeighbor[23]);}}\r\npublic bool IsEmptyLS\t\t{get{return ReferenceEquals(null,mNeighbor[24]);}}\r\npublic bool IsEmptyLSE\t\t{get{return ReferenceEquals(null,mNeighbor[25]);}}<\/pre>\n<p>\u9019\u662f\u4e00\u500b\u4e0d\u6210\u719f\u7684 mindset \u5f04\u51fa\u4f86\u7684\u6771\u6771. 26 \u500b list \u5373\u4ee3\u8868\u6709 26*4byte = 104byte \u7684\u8cc7\u8a0a.\u6709 100 \u500b block \u5c31\u6709 1kb \u591a\u7684\u8cc7\u6599&#8230;<\/p>\n<p>\u57fa\u672c\u4e0a\u8981\u505a\u5230\u540c\u6a23\u6548\u679c\u53ef\u4ee5\u7d93\u65c1\u908a\u7684 block \u7528\u985e\u4f3c link list \u7684\u65b9\u5f0f\u56de\u50b3\u7d66 target , \u76ee\u7684\u5730\u7684\u8cc7\u6599.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5617\u8a66\u505a Dungeon Editor \u7684\u6642\u5019. \u5f9e OOP \u7684\u5c64\u9762\u60f3, \u6bcf\u500b block \u9700\u8981\u77e5\u9053\u6bcf &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[16],"class_list":["post-1191","post","type-post","status-publish","format-standard","hentry","category-unity3d","tag-c-2"],"_links":{"self":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/posts\/1191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1191"}],"version-history":[{"count":0,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/posts\/1191\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}