class Example extends Phaser.Scene {
this.load.image("pig", "https://assets.codepen.io/9367036/pig.png");
this.load.image("chicken", "https://assets.codepen.io/9367036/chicken.png");
const graphics = this.add.graphics();
graphics.lineStyle(3, 0xffffff, 1);
const pigPath = new Phaser.Curves.Path(150, 100).lineTo(300, 300);
this.add.follower(pigPath, 0, 0, "pig").setScale(0.5).startFollow({
const chickenPath = new Phaser.Curves.Path(650, 200).circleTo(100);
chickenPath.draw(graphics);
this.add.follower(chickenPath, 0, 0, "chicken").setScale(0.5).startFollow({
const game = new Phaser.Game(config);