Class: GamePlay::Move_Reminder
- Inherits:
-
BaseCleanUpdate::FrameBalanced
- Object
- Base
- BaseCleanUpdate
- BaseCleanUpdate::FrameBalanced
- GamePlay::Move_Reminder
- Includes:
- MoveReminderMixin
- Defined in:
- scripts/01450 Systems/00302 MoveReminder/00003 GamePlay/00600 MoveReminder.rb
Overview
Move reminder Scene
Constant Summary collapse
- BACKGROUND =
Front background image
'MR_UI'
- CURSOR =
Cursor filename
'ball_selec'
- BUTTON_TEXTS =
List of button texts
[ [:ext_text, 9000, 117], [:ext_text, 9000, 113], ': previous', [:ext_text, 9000, 115] ]
- BUTTON_KEYS =
List of button used in the UI
%i[A DOWN UP B]
- BUTTON_ACTION =
List of button action
%i[action_a action_down action_up action_b]
- HELP_TEXT =
Text helping the player
'Which move should %s learn?'
- HELP_TEXT_COUNT =
Number of frame before help text shows up
180
Constants inherited from BaseCleanUpdate
BaseCleanUpdate::AIU_KEY2METHOD
Constants inherited from Base
Base::DEFAULT_TRANSITION, Base::DEFAULT_TRANSITION_PARAMETER
Constants included from Input
Input::ALIAS_KEYS, Input::AXIS_MAPPING, Input::AXIS_SENSITIVITY, Input::DEAD_ZONE, Input::Keyboard, Input::Keys, Input::NON_TRIGGER_ZONE, Input::REPEAT_COOLDOWN, Input::REPEAT_SPACE
Constants included from DisplayMessage
DisplayMessage::MESSAGE_ERROR, DisplayMessage::MESSAGE_PROCESS_ERROR
Instance Attribute Summary
Attributes included from MoveReminderMixin
Attributes inherited from Base
#__last_scene, #__result_process, #running, #viewport
Attributes included from DisplayMessage
Instance Method Summary collapse
-
#initialize(pokemon, mode = 0) ⇒ Move_Reminder
constructor
Create a new Move_Reminder Scene.
-
#update_graphics
Update the graphics.
-
#update_inputs
Update the inputs.
-
#update_mouse(moved) ⇒ Boolean
Update the mouse.
Methods included from MoveReminderMixin
Methods inherited from BaseCleanUpdate::FrameBalanced
Methods included from Graphics::FPSBalancer::Marker
Methods inherited from BaseCleanUpdate
#automatic_input_update, #update
Methods inherited from Base
#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=
Methods included from Input
dir4, dir8, get_text, joy_axis_position, press?, register_events, released?, repeat?, swap_states, trigger?
Methods included from DisplayMessage
#can_display_message_be_called?, #close_message_window, #display_message, #display_message_and_wait, #message_class, #message_processing?, #message_visible, #message_visible=
Constructor Details
#initialize(pokemon, mode = 0) ⇒ Move_Reminder
Create a new Move_Reminder Scene
30 31 32 33 34 35 36 |
# File 'scripts/01450 Systems/00302 MoveReminder/00003 GamePlay/00600 MoveReminder.rb', line 30 def initialize(pokemon, mode = 0) super() @index = 0 @pokemon = pokemon @mode = mode @count = 0 end |
Instance Method Details
#update_graphics
Update the graphics
60 61 62 63 |
# File 'scripts/01450 Systems/00302 MoveReminder/00003 GamePlay/00600 MoveReminder.rb', line 60 def update_graphics @base.update_background_animation @ui.update_graphics end |
#update_inputs
Update the inputs
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'scripts/01450 Systems/00302 MoveReminder/00003 GamePlay/00600 MoveReminder.rb', line 39 def update_inputs hide_win_text = @base.win_text_visible? if index_changed(:@index, :UP, :DOWN, @last_index) @ui.index = @index elsif Input.trigger?(:A) action_a elsif Input.trigger?(:B) action_b elsif !hide_win_text && (@count += 1) > HELP_TEXT_COUNT @base.show_win_text(format(get_text(HELP_TEXT), @pokemon.given_name)) else hide_win_text = false end if hide_win_text @base.hide_win_text @count = 0 end return true end |
#update_mouse(moved) ⇒ Boolean
Update the mouse
68 69 70 71 72 73 74 75 76 |
# File 'scripts/01450 Systems/00302 MoveReminder/00003 GamePlay/00600 MoveReminder.rb', line 68 def update_mouse(moved) if moved @base.hide_win_text if @base.win_text_visible? @count = 0 else (@base.ctrl, BUTTON_ACTION) end return true end |