{"id":958,"date":"2014-01-29T09:55:25","date_gmt":"2014-01-29T09:55:25","guid":{"rendered":"http:\/\/www.clonefactor.com\/wordpress\/?p=958"},"modified":"2014-01-29T09:55:38","modified_gmt":"2014-01-29T09:55:38","slug":"unity3d-%e6%b6%88%e7%8f%a0%e9%81%8a%e6%88%b2%e7%9a%84%e5%8e%9f%e5%bd%a2","status":"publish","type":"post","link":"https:\/\/www.clonefactor.com\/wordpress\/program\/unity3d\/958\/","title":{"rendered":"Unity3D : \u6d88\u73e0\u904a\u6232\u7684\u539f\u578b"},"content":{"rendered":"<unitydog width=\"\"\"\" height=\"\"\"\" src=\"https:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboBall_prototype.unity3d.zip\"><\/unitydog>\n<p>\u6d88\u73e0\u904a\u6232\u7684\u539f\u5f62.<\/p>\n<ul>\n<li><span style=\"line-height: 1.5em;\">\u73e0\u76e4\u5927\u5c0f<\/span><\/li>\n<li>\u73e0\u7684\u7a2e\u985e<\/li>\n<li>\u6389\u843d\u901f\u5ea6<\/li>\n<li>\u6389\u843d\u52a0\u901f\u5ea6<\/li>\n<li>\u52a0\u901f\u6642\u9593<\/li>\n<li>\u6389\u843d\u65b9\u5f0f (\u4e82\u6578\u6642\u9593\u5dee\u6389\u843d\u5bb9\u8a31)<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype001.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-960\" alt=\"comboball_prototype001\" src=\"http:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype001-272x300.jpg\" width=\"272\" height=\"300\" srcset=\"https:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype001-272x300.jpg 272w, https:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype001.jpg 531w\" sizes=\"auto, (max-width: 272px) 100vw, 272px\" \/><\/a><\/p>\n<p>\u90aa\u60e1\u7684\u63a7\u5236\u5668<\/p>\n<ul>\n<li>\u9650\u5236\u53ca\u6307\u5b9a\u6bcf\u9801\u6d88\u9664\u6578 (Combo Target)<\/li>\n<li>\u6d88\u9664\u6578\u8aa4\u5dee\u5bb9\u8a31\u6578 (Random Config &gt; Target)<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype002.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-961\" alt=\"comboball_prototype002\" src=\"http:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype002-300x180.jpg\" width=\"300\" height=\"180\" srcset=\"https:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype002-300x180.jpg 300w, https:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2014\/01\/comboball_prototype002.jpg 515w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u5bb9\u8a31\u81ea\u8a02\u6d88\u73e0\u689d\u4ef6<\/p>\n<pre class=\"brush:csharp\">using UnityEngine;\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\n\r\nnamespace ComboBallGame\r\n{\r\n\tpublic class Destroyer2Pair : ComboBallDestroyer\r\n\t{\r\n\t\tpublic int AffectTypeRangeBegin = 0;\r\n\t\tpublic int AffectTypeRangeEnd = 4;\r\n\t\tprivate void OnEnable()\r\n\t\t{\r\n\t\t\tDecideRule = (_matrix) =&gt; {\r\n\t\t\t\tfor(int x=0; x&lt;_matrix.Count; x++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(int y=0; y&lt;_matrix[x].Count; y++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\/\/ kill if the right one is same as mine.\r\n\t\t\t\t\t\tFakeBall _ballA = GetBall(x,y,_matrix);\r\n\t\t\t\t\t\tFakeBall _ballB = GetBall(x+1,y,_matrix);\r\n\t\t\t\t\t\tif( _ballA.BallType &gt;= AffectTypeRangeBegin &amp;&amp;\r\n\t\t\t\t\t\t\t_ballA.BallType &lt;= AffectTypeRangeEnd )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif( _ballA != null &amp;&amp; _ballB != null &amp;&amp;\r\n\t\t\t\t\t\t\t\t_ballA.BallType == _ballB.BallType )\r\n\t\t\t\t\t\t\t{\t\/\/ Kill them if same type \r\n\t\t\t\t\t\t\t\tGetBall(x,y,_matrix).FlagDestroyMark=true;\r\n\t\t\t\t\t\t\t\tGetBall(x+1,y,_matrix).FlagDestroyMark=true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\/\/ kill if the bottom one is same as mine.\r\n\t\t\t\t\t\t\t_ballA = GetBall(x,y,_matrix);\r\n\t\t\t\t\t\t\t_ballB = GetBall(x,y+1,_matrix);\r\n\t\t\t\t\t\t\tif( _ballA != null &amp;&amp; _ballB != null &amp;&amp;\r\n\t\t\t\t\t\t\t\t_ballA.BallType == _ballB.BallType )\r\n\t\t\t\t\t\t\t{\t\/\/ Kill them if same type \r\n\t\t\t\t\t\t\t\tGetBall(x,y,_matrix).FlagDestroyMark=true;\r\n\t\t\t\t\t\t\t\tGetBall(x,y+1,_matrix).FlagDestroyMark=true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn _matrix;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6d88\u73e0\u904a\u6232\u7684\u539f\u5f62. \u73e0\u76e4\u5927\u5c0f \u73e0\u7684\u7a2e\u985e \u6389\u843d\u901f\u5ea6 \u6389\u843d\u52a0\u901f\u5ea6 \u52a0\u901f\u6642\u9593 \u6389\u843d\u65b9\u5f0f (\u4e82\u6578\u6642\u9593\u5dee\u6389\u843d\u5bb9\u8a31 &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":[43],"class_list":["post-958","post","type-post","status-publish","format-standard","hentry","category-unity3d","tag-unity3d-2"],"_links":{"self":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/posts\/958","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=958"}],"version-history":[{"count":0,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/posts\/958\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/media?parent=958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/categories?post=958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/tags?post=958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}