1
0

Step_0.gml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. if !global.altcontrol
  2. {
  3. _jump_p = ingame.kcp("Z");
  4. _jump_r = ingame.kcr("Z");
  5. _dash = ingame.kcp("C");
  6. _attack = ingame.kcp("X");
  7. _left = ingame.kc(vk_left);
  8. _right = ingame.kc(vk_right);
  9. _up = ingame.kc(vk_up);
  10. _down = ingame.kc(vk_down);
  11. _inventory = ingame.kcp("I");
  12. _focus = ingame.kcp("A");
  13. _pause = ingame.kcp(vk_escape);
  14. }
  15. else
  16. {
  17. _jump_p = ingame.kcp("J");
  18. _jump_r = ingame.kcr("J");
  19. _dash = ingame.kcp("L");
  20. _attack = ingame.kcp("K");
  21. _left = ingame.kc("A");
  22. _right = ingame.kc("D");
  23. _up = ingame.kc("W");
  24. _down = ingame.kc("S");
  25. _inventory = ingame.kcp("I");
  26. _focus = ingame.kcp("U");
  27. _pause = ingame.kcp(vk_escape);
  28. }
  29. _up_title = title.kcp(vk_up) || title.kcp("W");
  30. _down_title = title.kcp(vk_down) || title.kcp("S");
  31. _left_title = title.kcp(vk_left) || title.kcp("A");
  32. _right_title = title.kcp(vk_right) || title.kcp("D");
  33. _select_title = title.kcp("Z") || title.kcp("J");
  34. _left_inv = inventory.kcp(vk_left);
  35. _right_inv = inventory.kcp(vk_right);
  36. _up_inv = inventory.kcp(vk_up);
  37. _down_inv = inventory.kcp(vk_down);
  38. _close_inv = inventory.kcp("I") || inventory.kcp(vk_escape);
  39. _save_pause = pause.kcp("Z");
  40. _close_pause = pause.kcp("X") || pause.kcp(vk_escape);
  41. if room != rTitle
  42. exit;
  43. if _up_title
  44. {
  45. menu_index--;
  46. if menu_index < 0
  47. menu_index = array_length(menu_options) - 1;
  48. }
  49. if _down_title
  50. {
  51. menu_index++;
  52. if menu_index >= array_length(menu_options)
  53. menu_index = 0;
  54. }
  55. for(var i = 0; i < array_length(menu_options); i++)
  56. {
  57. var _target = (i == menu_index) ? 1.2 : 1.0;
  58. option_scale[i] = lerp(option_scale[i], _target, lerp_speed);
  59. }
  60. if _select_title
  61. {
  62. var _func, _ripple;
  63. switch(menu_index)
  64. {
  65. case 0:
  66. if !file_exists("ddmyx_save.dat")
  67. break;
  68. autodel_handle("title");
  69. _func = function()
  70. {
  71. icl(oRippleExpand);
  72. load_game_from_disk();
  73. //
  74. bgm_play("explore");
  75. };
  76. _ripple = icl(oRippleShrink, 960, 540);
  77. _ripple.callback = _func;
  78. break;
  79. case 1:
  80. autodel_handle("title");
  81. _func = function()
  82. {
  83. icl(oRippleExpand);
  84. global.save_data = get_default_save_data();
  85. save_game_to_disk();
  86. load_game_from_disk();
  87. //
  88. bgm_play("explore");
  89. };
  90. _ripple = icl(oRippleShrink, 960, 600);
  91. _ripple.callback = _func;
  92. break;
  93. case 4: game_end(); break;
  94. }
  95. }
  96. if (_left_title || _right_title || _select_title) && menu_index == 3
  97. global.altcontrol = !global.altcontrol;
  98. menu_options[3] = global.altcontrol ? "控制-WASD" : "控制-方向键";
  99. if instance_exists(info_typer1)
  100. info_typer1.active = (menu_index == 2);
  101. if instance_exists(info_typer2)
  102. info_typer2.active = (menu_index == 2);
  103. animation_timer += 0.05;