I want the dino change frames when he’s jumping, not to use the same frame as when he’s standing.
Github repo Lines 67-72 and 104-107
this.anims.create({
key: ‘jump’,
frames: this.anims.generateFrameNumbers(‘dino’, { start: 5, end: 6 }),
frameRate: 10,
repeat: -1
});
Then in the update function
if (cursors.up.isDown && dino.body.touching.down){
dino.setVelocityY(-330);
dino.anims.play(‘jump’, true);
}
Any help will be appreciated.