1234567891011121314151617181920212223242526272829 |
- stages.push({
- id: "launch-from-station",
- setup: () => {
- getSet('starfield').setup();
- starMotion.velocity.x = -0.10;
- starMotion.velocity.y = 0.05;
- getSet('station').setup();
- stationPosition.x = 150;
- stationTargetPosition.x = -150;
- },
- update: (delta) => {
- getSet('starfield').update(delta);
- getSet('station').update(delta);
- },
- draw: (context, delta) => {
- getSet('starfield').draw(context, delta);
-
- 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();
- getSet('station').draw(context, delta);
- },
- cleanup: () => {
- },
- });
|