{"id":1081,"date":"2017-04-07T15:28:23","date_gmt":"2017-04-07T07:28:23","guid":{"rendered":"http:\/\/39.100.100.179\/?p=1081"},"modified":"2020-09-23T19:42:45","modified_gmt":"2020-09-23T11:42:45","slug":"%e5%88%b6%e4%bd%9c%e4%b8%80%e4%b8%aa%e7%8e%8b%e8%80%85%e8%8d%a3%e8%80%80","status":"publish","type":"post","link":"http:\/\/www.u3d8.com\/?p=1081","title":{"rendered":"\u5236\u4f5c\u4e00\u4e2a\u738b\u8005\u8363\u8000\u7684\u5c0f\u5730\u56fe"},"content":{"rendered":"<p>\u4eca\u5929\u6211\u4eec\u7528\u89c2\u5bdf\u8005\u6a21\u5f0f \u5236\u4f5c\u4e00\u4e2a\u6a21\u4eff\u738b\u8005\u8363\u8000\u7684\u5c0f\u5730\u56fe\u529f\u80fd<\/p>\n<p><img title=\"\u5236\u4f5c\u4e00\u4e2a\u738b\u8005\u8363\u8000\u7684\u5c0f\u5730\u56fe - \u7b2c1\u5f20  | u3d8\u6280\u672f\u5206\u4eab\" alt=\"\u5236\u4f5c\u4e00\u4e2a\u738b\u8005\u8363\u8000\u7684\u5c0f\u5730\u56fe - \u7b2c1\u5f20  | u3d8\u6280\u672f\u5206\u4eab\" loading=\"lazy\" class=\"wp-image-2108 size-full aligncenter\" src=\"http:\/\/www.u3d8.com\/wp-content\/uploads\/2017\/04\/minimap1.gif\" alt=\"\" width=\"553\" height=\"308\" \/><\/p>\n<p>\u5c0f\u5730\u56fe\u5305\u542b\u529f\u80fd\uff1a<\/p>\n<p>1\u3001\u5728\u5c0f\u5730\u56fe\u663e\u793a\u5854\u3001\u58eb\u5175<\/p>\n<p>2\u3001\u663e\u793a\u5c0f\u5730\u56fe\u67d0\u5904\u95ea\u70c1\u7279\u6548<\/p>\n<p>3\u3001\u5728\u5c0f\u5730\u56fe\u70b9\u51fb\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6444\u50cf\u673a\u79fb\u52a8\u5230\u624b\u6307\u7684\u4f4d\u7f6e<\/p>\n<p>4\u3001\u5728\u5c0f\u5730\u56fe\u6ed1\u52a8\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6444\u50cf\u673a\u8ddf\u968f\u624b\u6307\u79fb\u52a8<\/p>\n<p>\u6d4b\u8bd5\u65b9\u6cd5\uff1a<\/p>\n<p>\u6309\u952e1\uff1a \u751f\u6210soldier<\/p>\n<p>\u6309\u952e2\uff1a \u751f\u6210tower<\/p>\n<p>\u6309\u952ez\uff1a \u663e\u793a\u8b66\u62a5\u4fe1\u53f7\u5c0f\u5730\u56feicon<\/p>\n<p>\u6309\u952ex\uff1a \u53d6\u6d88\u663e\u793a\u8b66\u62a5\u4fe1\u53f7\u5c0f\u5730\u56feicon<\/p>\n<p>\u6309\u952ec\uff1a \u4fee\u6539\u8b66\u62a5\u4fe1\u53f7\u5c0f\u5730\u56feicon<\/p>\n<p>\u6309\u952eu\uff1a \u53d6\u6d88\u663e\u793a\u6700\u540e\u4e00\u4e2a\u7269\u4f53\u7684\u5c0f\u5730\u56feicon<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<p>&gt;\u4fee\u6539\u201cMiniMapView.ts\u201d\u811a\u672c\u7684mapSize\u4e3a\u5b9e\u9645\u7684\u5730\u56fe\u5927\u5c0f\u3002<\/p>\n<p>&gt;\u521d\u59cb\u5316 \u5854\u3001\u5175 \u5c0f\u5730\u56feicon<\/p>\n<p>\u9700\u8981\u5728\u5c0f\u5730\u56fe\u663e\u793a\u7684\u7269\u4f53\u4e0a\u6dfb\u52a0\u521d\u59cb\u5316\u65b9\u6cd5<\/p>\n<pre class=\"lang:c# decode:true \">MiniMapElement miniMapElement = gameObject.AddComponent();\nminiMapElement.Init( MiniMapElementIconType.Owner_Soldier );<\/pre>\n<p>&gt;\u663e\u793a \u5854\u3001\u5175 \u5c0f\u5730\u56feicon \uff08\u81ea\u52a8\u6267\u884c\uff09<\/p>\n<p>\u521d\u59cb\u5316\u65f6\u81ea\u52a8\u663e\u793a\u5c0f\u5730\u56feicon<\/p>\n<p>\u82e5\u9700\u8981\u624b\u52a8\u663e\u793aicon\uff0c\u5219\u6267\u884c\uff1a<\/p>\n<pre class=\"lang:c# decode:true \">miniMapElement.enabled = true;<\/pre>\n<p>&gt;\u66f4\u6362 \u5854\u3001\u5175 \u5c0f\u5730\u56feicon<\/p>\n<pre class=\"lang:c# decode:true \">MiniMapMessageDispatcher.PostElementMessage( MiniMapElementStateType.Update, miniMapElement.id, MiniMapElementIconType.Enemy_Soldier );<\/pre>\n<p>&gt;\u79fb\u9664 \u5854\u3001\u5175 \u5c0f\u5730\u56feicon \uff08\u81ea\u52a8\u6267\u884c\uff09<\/p>\n<p>\u5728\u7269\u4f53\u9690\u85cf\u6216\u8005\u9500\u6bc1\u65f6\uff0c\u81ea\u52a8\u79fb\u9664\u5728\u5c0f\u5730\u56fe\u4e0aicon<\/p>\n<p>\u82e5\u9700\u8981\u624b\u52a8\u79fb\u9664icon\uff0c\u5219\u6267\u884c\uff1a<\/p>\n<pre class=\"lang:c# decode:true \">miniMapElement.enabled = false;<\/pre>\n<p>&gt;\u521d\u59cb\u5316 \u8b66\u62a5\u4fe1\u53f7 \u5c0f\u5730\u56feicon<\/p>\n<pre class=\"lang:c# decode:true \">int effectId = MiniMapController.MakeId();\nMiniMapMessageDispatcher.PostElementMessage( MiniMapElementStateType.Create, effectId, MiniMapElementIconType.Effect1 );<\/pre>\n<p>&gt;\u663e\u793a \u8b66\u62a5\u4fe1\u53f7 \u5c0f\u5730\u56feicon<\/p>\n<pre class=\"lang:c# decode:true \">MiniMapMessageDispatcher.PostElementMessage( MiniMapElementStateType.Update, effectId, new Vector3( 2, 1, 0 ) );<\/pre>\n<p>&gt;\u66f4\u6362 \u8b66\u62a5\u4fe1\u53f7 \u5c0f\u5730\u56feicon<\/p>\n<pre class=\"lang:c# decode:true \">MiniMapMessageDispatcher.PostElementMessage( MiniMapElementStateType.Update, effectId, MiniMapElementIconType.Effect2 );<\/pre>\n<p>&gt;\u79fb\u9664 \u8b66\u62a5\u4fe1\u53f7 \u5c0f\u5730\u56feicon<\/p>\n<pre class=\"lang:c# decode:true \">MiniMapMessageDispatcher.PostElementMessage( MiniMapElementStateType.Destroy, effectId );<\/pre>\n<p>\u9879\u76ee\u4f7f\u7528\u7248\u672c\uff1aUnity5.3.6 \u00a0 \u00a0GitHub\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n<p><a href=\"https:\/\/github.com\/654306663\/MiniMap\">https:\/\/github.com\/654306663\/MiniMap<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6211\u4eec\u7528\u89c2\u5bdf\u8005\u6a21\u5f0f \u5236\u4f5c\u4e00\u4e2a\u6a21\u4eff\u738b\u8005\u8363\u8000\u7684\u5c0f\u5730\u56fe\u529f\u80fd \u5c0f\u5730\u56fe\u5305\u542b\u529f\u80fd\uff1a 1\u3001\u5728 &hellip; <a href=\"http:\/\/www.u3d8.com\/?p=1081\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[240,241,242],"_links":{"self":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1081"}],"collection":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1081"}],"version-history":[{"count":7,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1081\/revisions"}],"predecessor-version":[{"id":2110,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1081\/revisions\/2110"}],"wp:attachment":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1081"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}