12345678910111213141516171819202122 |
- stages.push({
- id: "asteroid-field",
- setup: () => {
- getSet('starfield').setup();
- starMotion.velocity.x = 0.05;
- starMotion.velocity.y = 0.05;
- getSet('asteroid-field').setup();
- },
- update: (delta) => {
- getSet('starfield').update(delta);
- getSet('asteroid-field').update(delta);
- },
- draw: (context, delta) => {
- getSet('starfield').draw(context, delta);
- getSet('asteroid-field').draw(context, delta);
- atlas.drawCentered(context, userData.sprite, { x: 0, y: 0 });
- },
- cleanup: () => {
- },
- });
|