Create_0.gml 505 B

123456789101112131415161718192021222324252627282930
  1. /// @description init menu
  2. win_width = window_get_width();
  3. win_height = window_get_height();
  4. // Cards in hand
  5. card_hand = [];
  6. card_selected = 0;
  7. card_change = 0;
  8. // Spawn Card
  9. for(i=0; i<=4; i+=1)
  10. {
  11. card = instance_create_depth(0, 0, -600, obj_card);
  12. array_push(card_hand, card);
  13. spacing = i * 4;
  14. with(card)
  15. {
  16. x = other.i * width + other.spacing + 50;
  17. y = other.win_height - height;
  18. if (other.i == 0)
  19. selected = true;
  20. }
  21. }
  22. // Spawn Mob
  23. instance_create_depth(0, 0, -500, obj_enemy);