目前,我正尝试取一个创建的矩形并对其宽度进行补间。似乎没有用,我缺少什么吗?
// health bar is a rectangle made using game.add.graphics().fillRect()
var healthBar = state.healthBar;
var newHealthWidth = Math.random() * 100;
this.add.tween(healthBar)
.to({ width: newHealthWidth }, 500);