{"id":109,"date":"2014-09-29T22:58:47","date_gmt":"2014-09-29T13:58:47","guid":{"rendered":"http:\/\/nantoka.filmm.info\/blog\/?p=109"},"modified":"2014-09-30T07:51:58","modified_gmt":"2014-09-29T22:51:58","slug":"unity-%e3%82%b9%e3%83%94%e3%83%bc%e3%83%89%e9%96%a2%e4%bf%82%e3%81%ae%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=109","title":{"rendered":"Unity-\u30b9\u30d4\u30fc\u30c9\u95a2\u4fc2\u306e\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>\u4eca\u56de\u306e\u30ef\u30fc\u30af\u30b7\u30e7\u30c3\u30d7\u3067\u4f5c\u3063\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u305d\u306e\uff13<\/p>\n<pre class=\"brush: jscript; light: false; title: ; toolbar: true; notranslate\" title=\"\">\r\n#pragma strict\r\nvar mySpeed : Vector3;\r\nvar maxHeight : int;\r\nvar currentHeight : int;\r\n\r\nfunction Start(){\r\nyield WaitForSeconds (5);\/\/\u3044\u304d\u306a\u308a\u30b9\u30bf\u30fc\u30c8\u3055\u305b\u308b\u3068\u5b50\u3069\u3082\u56f0\u308b\u306e\u30675\u79d2\u5f85\u305f\u305b\u3066\u308b\uff0e\u30ab\u30a6\u30f3\u30c8\u30c0\u30a6\u30f3\u306e\u7d75\u3068\u304b\u5165\u308c\u305f\u304b\u3063\u305f\u306a\u3041\r\nSpeedCheck(true);\/\/SpeedCheck\u3092true\u306b\u3059\u308b\u3068\u52d5\u304d\u307e\u3059\r\n}\r\n\r\n\r\nfunction Update() {\r\n        currentHeight = transform.position.y;\/\/\u3044\u307e\u306e\u9ad8\u3055\u51fa\u3057\u307e\u3059\r\n     if (currentHeight &gt; maxHeight){\/\/maxheight\u3088\u308a\u9ad8\u3051\u308c\u3070\r\n       transform.position.y = maxHeight;\/\/maxheight\u306e\u9ad8\u3055\u3067\u56fa\u5b9a\u306d\r\n     }\r\n       transform.Translate(mySpeed);\/\/\u79fb\u52d5\u301c\r\n    }\r\n    \r\nfunction SpeedCheck(sp : boolean){\/\/false\u304c\u6765\u305f\u3089\r\n   if(sp == false){\r\n   mySpeed = Vector3(0,0,0);\/\/\u98db\u884c\u6a5f\u505c\u6b62\r\n   GetComponent(myAlt).fallOff();\/\/\u7206\u767a\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\r\n   yield WaitForSeconds (5);\/\/\u6b8b\u5ff5\u3067\u3057\u305f\u753b\u9762\u306e\u524d\u306b5\u79d2\u5f85\u3061\u307e\u3059\r\nApplication.LoadLevel (&quot;bad&quot;);\/\/\u30b7\u30fc\u30f3bad\u8aad\u307f\u8fbc\u307f\r\n   }if(sp == true){\r\n      mySpeed = Vector3(2,0,0);\/\/\u666e\u6bb5\u306f\u5e38\u306b2\u79fb\u52d5\r\n   }\r\n   }\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306e\u30ef\u30fc\u30af\u30b7\u30e7\u30c3\u30d7\u3067\u4f5c\u3063\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u305d\u306e\uff13 #pragma strict var mySpeed : Vector3; var maxHeight : int; var currentHeight : int; fun &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=109\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Unity-\u30b9\u30d4\u30fc\u30c9\u95a2\u4fc2\u306e\u30b9\u30af\u30ea\u30d7\u30c8<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-unity"],"_links":{"self":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=109"}],"version-history":[{"count":1,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}