1
0

Step_0.gml 2.8 KB

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