{"id":425,"date":"2013-04-08T17:22:39","date_gmt":"2013-04-08T08:22:39","guid":{"rendered":"http:\/\/androiphone.uvs.jp\/?p=425"},"modified":"2013-04-08T17:22:39","modified_gmt":"2013-04-08T08:22:39","slug":"androidandengine-cocos2d%e3%80%80actionjump%e3%81%aeandengine%e7%89%88","status":"publish","type":"post","link":"https:\/\/androiphone.uvs.jp\/?p=425","title":{"rendered":"[Android][AndEngine] cocos2d\u3000ActionJump\u306eAndEngine\u7248"},"content":{"rendered":"<h4>\n\u4e00\u5fdc\u3001\u3061\u3087\u304f\u3061\u3087\u304f\u30e1\u30e2\u7a0b\u5ea6\u306b\u3002cocos2d\u3067\u306fActionJump\u30af\u30e9\u30b9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u304c\u3001AndEngine\u3067\u306f\u3002\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3084\u3001\u79fb\u52d5\u306a\u3069\u306f\u3001\u3042\u308b\u7a0b\u5ea6\u7528\u610f\u3055\u308c\u3066\u3044\u305f\u3082\u306e\u306eActionJump\u306b\u76f8\u5f53\u3059\u308b\u3082\u306e\u304c\u3001\u306a\u304b\u3063\u305f\u306e\u3067\u4f5c\u3063\u305f\u3002<\/p>\n<p>[java]<br \/>\n\tprivate IEntityModifier MovewithJumpModifier(float dura,float x1,float y1,float x2,float y2,int j_count,float j_height){<\/p>\n<p>\t\tIEntityModifier ret_modifier = null;<br \/>\n\t\tfor(int i=0;i&lt;j_count;i++){<br \/>\n\t\t\tfloat s_x = x1 + ((x2-x1)\/j_count) * i;<br \/>\n\t\t\tfloat s_y = y1 + ((y2-y1)\/j_count) * i;<br \/>\n\t\t\tfloat e_x = x1 + ((x2-x1)\/j_count) * (i+1);<br \/>\n\t\t\tfloat e_y = y1 + ((y2-y1)\/j_count) * (i+1);<\/p>\n<p>\t\t\tJumpModifier jm = new JumpModifier(dura\/j_count,s_x,e_x,s_y,e_y,j_height);<br \/>\n\t\t\tif(ret_modifier==null){<br \/>\n\t\t\t\tret_modifier = new SequenceEntityModifier(jm);<br \/>\n\t\t\t}else{<br \/>\n\t\t\t\tret_modifier = new SequenceEntityModifier(ret_modifier,jm);<br \/>\n\t\t\t}<br \/>\n\t\t}<br \/>\n\t\treturn ret_modifier;<br \/>\n\t}<br \/>\n[\/java]<br \/>\n\u5f15\u6570\u306fdura:\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u6642\u9593 (x1 y1) \u21d2 (x2 y2):\u79fb\u52d5\u5ea7\u6a19 j_count:\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u56de\u6570 j_height:\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u9ad8\u3055\u3000\u3067\u3001ActionJump\u30af\u30e9\u30b9\u3068\u540c\u3058\u304f\u3057\u305f\u3064\u3082\u308a\u3002<\/p>\n<\/h4>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u5fdc\u3001\u3061\u3087\u304f\u3061\u3087\u304f\u30e1\u30e2\u7a0b\u5ea6\u306b\u3002cocos2d\u3067\u306fActionJump\u30af\u30e9\u30b9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u304c\u3001AndEngine\u3067\u306f\u3002\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3084\u3001\u79fb\u52d5\u306a\u3069\u306f\u3001\u3042\u308b\u7a0b\u5ea6\u7528\u610f\u3055\u308c\u3066\u3044\u305f\u3082\u306e\u306eActionJump\u306b\u76f8\u5f53\u3059\u308b\u3082\u306e\u304c\u3001\u306a\u304b\u3063 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[13,5,14],"tags":[],"class_list":["post-425","post","type-post","status-publish","format-standard","hentry","category-andengine","category-android","category-java","ja"],"_links":{"self":[{"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=\/wp\/v2\/posts\/425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=425"}],"version-history":[{"count":7,"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=\/wp\/v2\/posts\/425\/revisions"}],"predecessor-version":[{"id":432,"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=\/wp\/v2\/posts\/425\/revisions\/432"}],"wp:attachment":[{"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androiphone.uvs.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}