{"id":2688,"date":"2020-04-16T09:11:24","date_gmt":"2020-04-16T00:11:24","guid":{"rendered":"http:\/\/taki-lab.site\/bocci\/?p=2688"},"modified":"2020-04-16T09:11:27","modified_gmt":"2020-04-16T00:11:27","slug":"%e3%80%90c%e3%80%91%e3%80%90altseed%e3%80%91%e3%80%90%e6%95%b0%e7%8b%ac%e3%80%91%e3%83%91%e3%83%ac%e3%83%83%e3%83%88%e3%81%ae%e8%a1%a8%e7%a4%ba%e3%80%81%e9%9d%9e%e8%a1%a8%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/taki-lab.site\/bocci\/?p=2688","title":{"rendered":"\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u30d1\u30ec\u30c3\u30c8\u306e\u8868\u793a\u3001\u975e\u8868\u793a"},"content":{"rendered":"\n<p>\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-\u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"iEgRsRnhmc\"><a href=\"https:\/\/taki-lab.site\/bocci\/?p=2682\">\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u306e\u79fb\u52d5\u3067\u8272\u3092\u5909\u3048\u308b\u3002<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u306e\u79fb\u52d5\u3067\u8272\u3092\u5909\u3048\u308b\u3002&#8221; &#8212; \u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\" src=\"https:\/\/taki-lab.site\/bocci\/?p=2682&#038;embed=true#?secret=qFYRVNHcLe#?secret=iEgRsRnhmc\" data-secret=\"iEgRsRnhmc\" width=\"474\" height=\"267\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u6700\u65b0\u30bd\u30fc\u30b9\u306f\u3053\u3061\u3089(gitHub)\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/takishita2nd\/sudokuGUI\">https:\/\/github.com\/takishita2nd\/sudokuGUI<\/a><\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u30de\u30a6\u30b9\u30af\u30ea\u30c3\u30af\u3067\u6570\u5b57\u3092\u5165\u529b\u3059\u308b\u305f\u3081\u306e\u30d1\u30ec\u30c3\u30c8\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d1\u30ec\u30c3\u30c8\u306b\u306f\u3001\u3053\u3093\u306a\u753b\u50cf\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"192\" height=\"256\" data-attachment-id=\"2689\" data-permalink=\"https:\/\/taki-lab.site\/bocci\/?attachment_id=2689\" data-orig-file=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/04\/palette.png?fit=192%2C256&amp;ssl=1\" data-orig-size=\"192,256\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"palette\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/04\/palette.png?fit=192%2C256&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/04\/palette.png?fit=192%2C256&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/04\/palette.png?resize=192%2C256\" alt=\"\" class=\"wp-image-2689\"\/><\/figure>\n\n\n\n<p>\u3053\u308c\u3092\u30de\u30a6\u30b9\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u7b87\u6240\u306b\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u308c\u3068\u540c\u6642\u306b\u3001\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u793a\u3059\u30de\u30b9\u306e\u8272\u3082\u56fa\u5b9a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3057\u3066\u3001\u30d1\u30ec\u30c3\u30c8\u306e\u5916\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30d1\u30ec\u30c3\u30c8\u3092\u6d88\u3057\u3066\u30de\u30b9\u306e\u8272\u3082\u5143\u306b\u623b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001\u30d1\u30ec\u30c3\u30c8\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace sudokuGUI\n{\n    class Palette\n    {\n        private asd.Vector2DF palettePosition;\n        private const int width = 192;\n        private const int height = 256;\n        private asd.TextureObject2D _texture;\n\n        public Palette()\n        {\n            _texture = new asd.TextureObject2D();\n        }\n\n        public asd.TextureObject2D getPaletteTexture()\n        {\n            return _texture;\n        }\n\n        public void Show(asd.Vector2DF pos)\n        {\n            palettePosition = new asd.Vector2DF(pos.X, pos.Y - 64);\n            _texture.Position = palettePosition;\n            _texture.Texture = Resource.getPalette();\n        }\n\n        public void Hide()\n        {\n            _texture.Texture = null;\n        }\n\n        public bool isClick(asd.Vector2DF pos)\n        {\n            if(pos.X > palettePosition.X &amp;&amp; pos.X &lt; palettePosition.X + width\n                &amp;&amp; pos.Y > palettePosition.Y &amp;&amp; pos.Y &lt; palettePosition.Y + height)\n            {\n                return true;\n            }\n            else\n            {\n                return false;\n            }\n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>getPaletteTexture()\u3067\u306f\u3001Altseed\u30a8\u30f3\u30b8\u30f3\u306b\u8ffd\u52a0\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>show()\u3067\u30de\u30a6\u30b9\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u6e21\u3057\u3001\u305d\u306e\u5ea7\u6a19\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8a2d\u5b9a\u3057\u3066\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002\uff08\u5ea7\u6a19\u306e\u4f4d\u7f6e\u306f\u5c11\u3057\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u3044\u307e\u3059\u3002\uff09<\/p>\n\n\n\n<p>Hide()\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u6d88\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>isClick()\u3067\u306f\u3001\u6e21\u3055\u308c\u305f\u30de\u30a6\u30b9\u306e\u5ea7\u6a19\u304c\u30c6\u30af\u30b9\u30c1\u30e3\u306e\u7bc4\u56f2\u5185\u304b\u3069\u3046\u304b\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        private bool mouseHold;\n        private Palette palette = null;\n\n\uff1a\n\n            \/\/ \u30d1\u30ec\u30c3\u30c8\n            palette = new Palette();\n            asd.Engine.AddObject2D(palette.getPaletteTexture());\n\n            \/\/ Altseed\u304c\u9032\u884c\u53ef\u80fd\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\n            while (asd.Engine.DoEvents())\n            {\n                asd.Vector2DF pos = asd.Engine.Mouse.Position;\n                if (!mouseHold)\n                {\n                    for (int row = 0; row &lt; 9; row++)\n                    {\n                        for (int col = 0; col &lt; 9; col++)\n                        {\n                            squareObjects&#91;row, col].updateTexture(pos);\n                        }\n                    }\n                }\n\n                if (asd.Engine.Mouse.LeftButton.ButtonState == asd.ButtonState.Push)\n                {\n                    if (mouseHold)\n                    {\n                        if (!palette.isClick(pos))\n                        {\n                            palette.Hide();\n                            mouseHold = false;\n                        }\n                    }\n                    else\n                    {\n                        mouseHold = true;\n                        palette.Show(pos);\n                    }\n                }\n\n                \/\/ Altseed\u3092\u66f4\u65b0\u3059\u308b\u3002\n                asd.Engine.Update();\n            }\n<\/code><\/pre>\n\n\n\n<p>\u4eca\u307e\u3067Main\u95a2\u6570\u306b\u5b9f\u88c5\u3057\u3066\u3044\u305f\u51e6\u7406\u306fSudokuUI\u30af\u30e9\u30b9\u306b\u79fb\u3057\u307e\u3057\u305f\u3002\uff08\u3042\u307e\u308aMain\u95a2\u6570\u306b\u3042\u308c\u3053\u308c\u66f8\u304f\u306e\u306f\u597d\u304d\u3058\u3083\u7121\u3044\u3002\uff09<\/p>\n\n\n\n<p>mouseHold\u306f\u30de\u30a6\u30b9\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u72b6\u614b\u3092\u4fdd\u6301\u3057\u3001true\u306e\u5834\u5408\u306f\u30de\u30a6\u30b9\u3092\u30af\u30ea\u30c3\u30af\u3055\u308c\u3066\u3044\u308b\u72b6\u614b\u3067\u3001\u30d1\u30ec\u30c3\u30c8\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u72b6\u614b\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3057\u3066\u3001mouseHold=true\u306e\u3068\u304d\u306f\u3001\u30de\u30b9\u306e\u30c6\u30af\u30b9\u30c1\u30e3\u306e\u8272\u3092\u5909\u3048\u308b\u51e6\u7406\u3092\u884c\u308f\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u52d5\u304b\u3057\u3066\u307f\u308b\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"http:\/\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/04\/20200416083951.mp4\"><\/video><\/figure>\n\n\n\n<p>\u304b\u306a\u308a\u3001\u5f62\u304c\u898b\u3048\u3066\u304d\u307e\u3057\u305f\u306d\u3002<\/p>\n\n\n\n<a href=\"\/\/blog.with2.net\/link\/?2023426:1010\" target=\"_blank\" rel=\"noopener noreferrer\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/12\/03a6eee54039f74ded0b8f7548b1868f.png?w=474\" title=\"\u30d1\u30bd\u30b3\u30f3\u30e9\u30f3\u30ad\u30f3\u30b0\"><\/a>\n\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 \u6700\u65b0\u30bd\u30fc\u30b9\u306f\u3053\u3061\u3089(gitHub)\u3002 https:\/\/github.com\/takishita2nd\/sudokuGUI \u4eca\u56de\u306f\u30de\u30a6\u30b9\u30af\u30ea\u30c3\u30af\u3067\u6570\u5b57\u3092\u5165\u529b\u3059\u308b\u305f\u3081\u306e\u30d1\u30ec\u30c3\u30c8\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002 \u30d1\u30ec &hellip; <a href=\"https:\/\/taki-lab.site\/bocci\/?p=2688\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u30d1\u30ec\u30c3\u30c8\u306e\u8868\u793a\u3001\u975e\u8868\u793a<\/span> <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":{"om_disable_all_campaigns":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[174,3],"tags":[184,137,175],"class_list":["post-2688","post","type-post","status-publish","format-standard","hentry","category-c","category-3","tag-altseed","tag-c","tag-175"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8SDbY-Hm","jetpack-related-posts":[{"id":2715,"url":"https:\/\/taki-lab.site\/bocci\/?p=2715","url_meta":{"origin":2688,"position":0},"title":"\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u30d1\u30ec\u30c3\u30c8\u304b\u3089\u6570\u5b57\u3092\u5165\u529b\u3059\u308b","author":"taki","date":"2020\u5e744\u670821\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2708 \u6700\u2026","rel":"","context":"C#","block_context":{"text":"C#","link":"https:\/\/taki-lab.site\/bocci\/?cat=174"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2702,"url":"https:\/\/taki-lab.site\/bocci\/?p=2702","url_meta":{"origin":2688,"position":1},"title":"\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u30d1\u30ec\u30c3\u30c8\u306e\u4f5c\u6210","author":"taki","date":"2020\u5e744\u670818\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2688 \u6700\u2026","rel":"","context":"C#","block_context":{"text":"C#","link":"https:\/\/taki-lab.site\/bocci\/?cat=174"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2737,"url":"https:\/\/taki-lab.site\/bocci\/?p=2737","url_meta":{"origin":2688,"position":2},"title":"\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u3053\u308c\u304b\u3089\u3084\u308b\u3053\u3068\u3002","author":"taki","date":"2020\u5e744\u670824\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2731 \u3068\u2026","rel":"","context":"C#","block_context":{"text":"C#","link":"https:\/\/taki-lab.site\/bocci\/?cat=174"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2708,"url":"https:\/\/taki-lab.site\/bocci\/?p=2708","url_meta":{"origin":2688,"position":3},"title":"\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u3011\u30d1\u30ec\u30c3\u30c8\u306b\u00d7\u3092\u8ffd\u52a0\u3002","author":"taki","date":"2020\u5e744\u670819\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2702 \u6700\u2026","rel":"","context":"C#","block_context":{"text":"C#","link":"https:\/\/taki-lab.site\/bocci\/?cat=174"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2741,"url":"https:\/\/taki-lab.site\/bocci\/?p=2741","url_meta":{"origin":2688,"position":4},"title":"\u3010C#\u3011\u3010ALTSEED\u3011\u3010\u6570\u72ec\u30119\u00d79\u30de\u30b9\u306e\u5916\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082\u30d1\u30ec\u30c3\u30c8\u304c\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3046\u52d5\u4f5c\u306e\u4fee\u6b63","author":"taki","date":"2020\u5e744\u670826\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2737 \u6700\u2026","rel":"","context":"C#","block_context":{"text":"C#","link":"https:\/\/taki-lab.site\/bocci\/?cat=174"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/04\/136745a6f14b13c4ec28aa8b8abf449f.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2926,"url":"https:\/\/taki-lab.site\/bocci\/?p=2926","url_meta":{"origin":2688,"position":5},"title":"\u3010C#\u3011\u3010\u30d4\u30af\u30ed\u30b9\u3011\u3010ALTSEED\u3011\u6570\u5b57\u5165\u529b\u30de\u30b9\u306b\u6570\u5b57\u3092\u5165\u529b\u3059\u308b","author":"taki","date":"2020\u5e745\u670812\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2909 \u6700\u2026","rel":"","context":"C#","block_context":{"text":"C#","link":"https:\/\/taki-lab.site\/bocci\/?cat=174"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2688"}],"version-history":[{"count":1,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2688\/revisions"}],"predecessor-version":[{"id":2691,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2688\/revisions\/2691"}],"wp:attachment":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}