jake.caron Posted September 24, 2018 Share Posted September 24, 2018 Hello, Just wondering if it is possible to tween a container and all of its sprites at once. Thank you, Jake Link to comment Share on other sites More sharing options...
cruseyd Posted October 11, 2018 Share Posted October 11, 2018 Bump. I would like to know this as well. One solution that I came up with is having the container fire an event that adds a tween to all children, but that seems overly complicated. Link to comment Share on other sites More sharing options...
prob Posted October 11, 2018 Share Posted October 11, 2018 You'll have to be more specific when you stay "tween". Any position or transform property of a container affects the children of the container. If you wanted to do something else, then you'd just getAll the children of a container and iterate through them. samme 1 Link to comment Share on other sites More sharing options...
digitsensitive Posted December 30, 2018 Share Posted December 30, 2018 Have a look at the official Phaser 3 examples: http://labs.phaser.io, for example the Twirl example (http://labs.phaser.io/edit.html?src=src\game objects\container\twirl 6.js) this.tweens.add({ targets: containers, angle: { value: 360, duration: 6000 }, scaleX: { value: 0.1, duration: 3000, yoyo: true, ease: 'Quad.easeInOut' }, scaleY: { value: 0.1, duration: 3000, yoyo: true, ease: 'Cubic.easeInOut' }, repeat: -1, delay: function (i, total, target) { return i * 64; } }); Link to comment Share on other sites More sharing options...
Recommended Posts