b2BodyãTweenerã§ã³ã³ããã¼ã«
äºæ¸¬ãã¤ããªãåããBox2Dã®æ¥½ããã¨ãããªãã ãã©ãããç¨åº¦ã³ã³ããã¼ã«ãããã¨ãããåºã¦ãããããã
ãã¶ãããããªã¢ããã¼ãããããã ã¨æããã©ãã©ã¤ãã©ãªã½ã¼ã¹è¦ã¦ããã¾ãã¡ç解ã§ããªãã£ãã®ã§ãb2Bodyã®ã¡ã½ãããSetXForm()ãå©ç¨ãã¦Tweenerã§åããæ¹æ³ãèãã¦ã¿ãã
b2Bodyãç¶æ¿ããmyBodyã¨ãããªãã¸ã§ã¯ãããç¾å¨å°ããå³æ¹åã¸ï¼ï¼Box2Dã®ä¸çæç®ã§ï¼ãã¥ã¤ã¼ã³ããããã¨ããæ
var nPotision:b2Vec2 = myBody.GetPosition(); myBody.WakeUP(); Tweener.addTween(nPotision, { x:nPotision+1, time:1, onUpdateParams:[myBody], onUpdate:function( targetBody:b2Body ){ targetBody.SetXForm(this, 0); });
ã¨ããã
Tweenerã®é¨åãæ´çããã¨
ã¡ãªã¿ã«for(){}ã§å²ã£ã¦ãåããã®ã§ãè¤æ°ã®ãªãã¸ã§ã¯ããä¸æã«ãã¥ã¤ã¼ã³ãããã¨ãã§ããã