Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ■ Scene_Map
- #------------------------------------------------------------------------------
- # マップ画面の処理を行うクラスです。
- #==============================================================================
- class Scene_Map < Scene_Base
- #--------------------------------------------------------------------------
- # ● Aボタンによるオリジナルメニュー呼び出し判定
- #--------------------------------------------------------------------------
- def update_call_menu2
- if Input.trigger?(Input::A)
- return if $game_map.interpreter.running? # イベント実行中?
- return if $game_system.menu_disabled # メニュー禁止中?
- $game_temp.menu_beep = true # SE 演奏フラグ設定
- $game_temp.next_scene = "original_menu"
- end
- end
- #--------------------------------------------------------------------------
- # ● 画面切り替えの実行
- #--------------------------------------------------------------------------
- def update_scene_change
- return if $game_player.moving? # Is player moving?
- case $game_temp.next_scene
- when "battle"
- call_battle
- when "shop"
- call_shop
- when "name"
- call_name
- when "menu"
- call_menu
- when "save"
- call_save
- when "debug"
- call_debug
- when "gameover"
- call_gameover
- when "title"
- call_title
- when "original_menu"
- call_original_menu
- else
- $game_temp.next_scene = nil
- end
- end
- end
- #==============================================================================
- # ■ Scene_Original_Menu
- #------------------------------------------------------------------------------
- # メニュー画面の処理を行うクラスです。
- #==============================================================================
- class Scene_Original_Menu < Scene_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # menu_index : コマンドのカーソル初期位置
- #--------------------------------------------------------------------------
- def initialize(menu_index = 0)
- @menu_index = menu_index
- end
- #--------------------------------------------------------------------------
- # ● 開始処理
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- create_command_window
- end
- #--------------------------------------------------------------------------
- # ● 終了処理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @command_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- def update
- super
- update_menu_background
- @command_window.update
- update_command_selection
- end
- #--------------------------------------------------------------------------
- # ● コマンドウィンドウの作成
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = "コモンイベント1"
- s2 = "コモンイベント2"
- s3 = "コモンイベント3"
- s4 = "コモンイベント4"
- @command_window = Window_Command.new(160, [s1, s2, s3, s4],1,4,32)
- @command_window.index = @menu_index
- end
- #--------------------------------------------------------------------------
- # ● コマンド選択の更新
- #--------------------------------------------------------------------------
- def update_command_selection
- #Bボタンで終了
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Map.new
- elsif Input.trigger?(Input::C)
- Sound.play_decision
- #コモンイベントの呼び出し
- $game_temp.common_event_id = @command_window.index+1
- $scene = Scene_Map.new
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement