begin-pickup.js 520 B

12345678910111213141516171819202122
  1. stages.push({
  2. id: "begin-pickup",
  3. setup: () => {
  4. getSet('starfield').setup();
  5. starMotion.velocity.x = 0.05;
  6. starMotion.velocity.y = 0.05;
  7. getSet('begin-pickup-cargo').setup();
  8. },
  9. update: (delta) => {
  10. getSet('starfield').update(delta);
  11. getSet('begin-pickup-cargo').update(delta);
  12. },
  13. draw: (context, delta) => {
  14. getSet('starfield').draw(context, delta);
  15. getSet('begin-pickup-cargo').draw(context, delta);
  16. atlas.drawCentered(context, userData.sprite, { x: 0, y: 0 });
  17. },
  18. cleanup: () => {
  19. },
  20. });