12345678910111213141516171819202122 |
- stages.push({
- id: "travel-right",
- setup: () => {
- getSet('starfield').setup();
- starMotion.velocity.x = -1;
- starMotion.velocity.y = 0;
- },
- update: (delta) => {
- getSet('starfield').update(delta);
- },
- draw: (context, delta) => {
- getSet('starfield').draw(context, delta);
- context.fillStyle = "grey";
- context.save();
- context.rotate(90 * Math.PI / 180);
- atlas.drawCentered(context, "fire08.png", { x: 0, y: 57 });
- atlas.drawCentered(context, userData.sprite, { x: 0, y: 0 });
- context.restore();
- },
- cleanup: () => { },
- });
|