Javascript 在移相器中绘制圆弧,并在5秒内应用吐温缩短其长度

Javascript 在移相器中绘制圆弧,并在5秒内应用吐温缩短其长度,javascript,phaser-framework,Javascript,Phaser Framework,嘿,我想用phaser v2.3.0绘制一个圆,并通过在其上应用tween均匀地减小它。 应该是这样的。但是从一个完整的圆周开始(一种在圆周上有一定厚度的空心圆盘),在5秒内均匀地减小它的周长。 你可以接受我的帮助 因为我对phaser是新手,所以我能够理解它,或者如果你能给我一个简单的例子或解决方案,它会更好。 提前谢谢我得到了答案 var GameState = { update: function () { this.graphics.clear();

嘿,我想用phaser v2.3.0绘制一个圆,并通过在其上应用tween均匀地减小它。 应该是这样的。但是从一个完整的圆周开始(一种在圆周上有一定厚度的空心圆盘),在5秒内均匀地减小它的周长。 你可以接受我的帮助 因为我对phaser是新手,所以我能够理解它,或者如果你能给我一个简单的例子或解决方案,它会更好。
提前谢谢

我得到了答案

var GameState = {
   update: function () {
        this.graphics.clear();
        this.graphics.lineStyle(6, 0xffffff);
        this.graphics.arc(40, 90, 20, 0, 
                   game.math.degToRad(this.angle.max), true, 128);
        this.graphics.endFill();
   }
   create: function () {
        this.graphics = game.add.graphics(0, 0);
        this.world.bringToTop(this.graphics)
        this.angle = { min: 0, max: 0 };
        this.roundArcTween = this.add.tween(this.angle).to({ max: 360 }, 5000);
   }

}
我得到了答案

var GameState = {
   update: function () {
        this.graphics.clear();
        this.graphics.lineStyle(6, 0xffffff);
        this.graphics.arc(40, 90, 20, 0, 
                   game.math.degToRad(this.angle.max), true, 128);
        this.graphics.endFill();
   }
   create: function () {
        this.graphics = game.add.graphics(0, 0);
        this.world.bringToTop(this.graphics)
        this.angle = { min: 0, max: 0 };
        this.roundArcTween = this.add.tween(this.angle).to({ max: 360 }, 5000);
   }

}