Class: Scene_Skill
- Inherits:
-
Scene_ItemBase
- Object
- Scene_Base
- Scene_MenuBase
- Scene_ItemBase
- Scene_Skill
- Defined in:
- lib/rgss3_default_scripts/Scene_Skill.rb
Overview
** Scene_Skill
This class performs skill screen processing. Skills are handled as items for
the sake of process sharing.
Instance Method Summary collapse
-
#command_skill ⇒ Object
————————————————————————– * [Skill] Command ————————————————————————–.
-
#create_command_window ⇒ Object
————————————————————————– * Create Command Window ————————————————————————–.
-
#create_item_window ⇒ Object
————————————————————————– * Create Item Window ————————————————————————–.
-
#create_status_window ⇒ Object
————————————————————————– * Create Status Window ————————————————————————–.
-
#on_actor_change ⇒ Object
————————————————————————– * Change Actors ————————————————————————–.
-
#on_item_cancel ⇒ Object
————————————————————————– * Item [Cancel] ————————————————————————–.
-
#on_item_ok ⇒ Object
————————————————————————– * Item [OK] ————————————————————————–.
-
#play_se_for_item ⇒ Object
————————————————————————– * Play SE When Using Item ————————————————————————–.
-
#start ⇒ Object
————————————————————————– * Start Processing ————————————————————————–.
-
#use_item ⇒ Object
————————————————————————– * Use Item ————————————————————————–.
-
#user ⇒ Object
————————————————————————– * Get Skill’s User ————————————————————————–.
Methods inherited from Scene_ItemBase
#activate_item_window, #check_common_event, #create_actor_window, #cursor_left?, #determine_item, #hide_sub_window, #item, #item_effects_valid?, #item_target_actors, #item_usable?, #on_actor_cancel, #on_actor_ok, #show_sub_window, #use_item_to_actors
Methods inherited from Scene_MenuBase
#create_background, #create_help_window, #dispose_background, #next_actor, #prev_actor, #terminate
Methods inherited from Scene_Base
#check_gameover, #create_main_viewport, #dispose_all_windows, #dispose_main_viewport, #fadeout_all, #main, #perform_transition, #post_start, #pre_terminate, #return_scene, #scene_changing?, #terminate, #transition_speed, #update, #update_all_windows, #update_basic
Instance Method Details
#command_skill ⇒ Object
- Skill
-
Command
67 68 69 70 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 67 def command_skill @item_window.activate @item_window.select_last end |
#create_command_window ⇒ Object
-
Create Command Window
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 22 def create_command_window wy = @help_window.height @command_window = Window_SkillCommand.new(0, wy) @command_window. = @viewport @command_window.help_window = @help_window @command_window.actor = @actor @command_window.set_handler(:skill, method(:command_skill)) @command_window.set_handler(:cancel, method(:return_scene)) @command_window.set_handler(:pagedown, method(:next_actor)) @command_window.set_handler(:pageup, method(:prev_actor)) end |
#create_item_window ⇒ Object
-
Create Item Window
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 45 def create_item_window wx = 0 wy = @status_window.y + @status_window.height ww = Graphics.width wh = Graphics.height - wy @item_window = Window_SkillList.new(wx, wy, ww, wh) @item_window.actor = @actor @item_window. = @viewport @item_window.help_window = @help_window @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @command_window.skill_window = @item_window end |
#create_status_window ⇒ Object
-
Create Status Window
36 37 38 39 40 41 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 36 def create_status_window y = @help_window.height @status_window = Window_SkillStatus.new(@command_window.width, y) @status_window. = @viewport @status_window.actor = @actor end |
#on_actor_change ⇒ Object
-
Change Actors
102 103 104 105 106 107 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 102 def on_actor_change @command_window.actor = @actor @status_window.actor = @actor @item_window.actor = @actor @command_window.activate end |
#on_item_cancel ⇒ Object
-
Item [Cancel]
81 82 83 84 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 81 def on_item_cancel @item_window.unselect @command_window.activate end |
#on_item_ok ⇒ Object
-
Item [OK]
74 75 76 77 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 74 def on_item_ok @actor.last_skill.object = item determine_item end |
#play_se_for_item ⇒ Object
-
Play SE When Using Item
88 89 90 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 88 def play_se_for_item Sound.play_use_skill end |
#start ⇒ Object
-
Start Processing
12 13 14 15 16 17 18 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 12 def start super create_help_window create_command_window create_status_window create_item_window end |
#use_item ⇒ Object
-
Use Item
94 95 96 97 98 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 94 def use_item super @status_window.refresh @item_window.refresh end |
#user ⇒ Object
-
Get Skill’s User
61 62 63 |
# File 'lib/rgss3_default_scripts/Scene_Skill.rb', line 61 def user @actor end |