1
0

Step_0.gml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. _jump_p = ingame.kcp("Z");
  2. _jump_r = ingame.kcr("Z");
  3. _dash = ingame.kcp("C");
  4. _attack = ingame.kcp("X");
  5. _left = ingame.kc(vk_left);
  6. _right = ingame.kc(vk_right);
  7. _up = ingame.kc(vk_up);
  8. _down = ingame.kc(vk_down);
  9. _inventory = ingame.kcp("I");
  10. _focus = ingame.kcp("A");
  11. _pause = ingame.kcp(vk_escape);
  12. _up_title = title.kcp(vk_up);
  13. _down_title = title.kcp(vk_down);
  14. _select_title = title.kcp("Z");
  15. _left_inv = inventory.kcp(vk_left);
  16. _right_inv = inventory.kcp(vk_right);
  17. _up_inv = inventory.kcp(vk_up);
  18. _down_inv = inventory.kcp(vk_down);
  19. _close_inv = inventory.kcp("I") || inventory.kcp(vk_escape);
  20. _save_pause = pause.kcp("Z");
  21. _close_pause = pause.kcp("X") || pause.kcp(vk_escape);
  22. if room != rTitle
  23. exit;
  24. if _up_title
  25. {
  26. menu_index--;
  27. if menu_index < 0
  28. menu_index = array_length(menu_options) - 1;
  29. }
  30. if _down_title
  31. {
  32. menu_index++;
  33. if menu_index >= array_length(menu_options)
  34. menu_index = 0;
  35. }
  36. for(var i = 0; i < array_length(menu_options); i++)
  37. {
  38. var _target = (i == menu_index) ? 1.2 : 1.0;
  39. option_scale[i] = lerp(option_scale[i], _target, lerp_speed);
  40. }
  41. if _select_title
  42. {
  43. var _func, _ripple;
  44. switch(menu_index)
  45. {
  46. case 0:
  47. if !file_exists("ddmyx_save.dat")
  48. break;
  49. autodel_handle("title");
  50. _func = function()
  51. {
  52. icl(oRippleExpand);
  53. load_game_from_disk();
  54. };
  55. _ripple = icl(oRippleShrink, 960, 540);
  56. _ripple.callback = _func;
  57. break;
  58. case 1:
  59. autodel_handle("title");
  60. _func = function()
  61. {
  62. icl(oRippleExpand);
  63. global.save_data = get_default_save_data();
  64. save_game_to_disk();
  65. load_game_from_disk();
  66. };
  67. _ripple = icl(oRippleShrink, 960, 600);
  68. _ripple.callback = _func;
  69. break;
  70. case 3: game_end(); break;
  71. }
  72. }
  73. if instance_exists(info_typer1)
  74. info_typer1.active = (menu_index == 2);
  75. if instance_exists(info_typer2)
  76. info_typer2.active = (menu_index == 2);
  77. animation_timer += 0.05;