When you override preUpdate()
, you need to pass time, deltaTime
to the super method.
Groups don’t have position (or visibility) so there is no x
or y
to tween. But you can tween the position of their members:
this.tweens.add({
targets: this.keyz.getChildren(),
y: '+=6',
// ...
});
Also, you can pass ease functions (e.g., Phaser.Math.Easing.Sine.InOut
) instead of strings if you want.