#============================================================================== # ■ XP-RGSS-17 エンディング [Ver.1.1.0] by Claimh #------------------------------------------------------------------------------ # エンディング(スタッフロール)の雛型です # あくまで雛形なので、自分で納得がいくまで改造してください。 # # 表示順:製作者→製作協力者→素材提供者→END表示 # (→強くてニューゲーム用セーブ)→タイトルor強制終了 #============================================================================== module Ending #============================================================================== # □ カスタマイズSTART #============================================================================== # エンディングBGM ENDING_BGM = "013-Theme02" # エンディングバックグラフィック(黒背景でいいならnil) END_BACK_GRA = "001-Title01" # END表示グラフィック(必須) END_GRAPHIC = "001-Title01" # エンディング後はタイトルに戻す(強制終了させるならfalse) ENDING_TITLE = true # 強くてニューゲーム用セーブを行う?(要・強くてニューゲーム) END_SAVE = false # 強くてニューゲーム用のスイッチID RENEW_SWITCH = 10 #============================================================================== # □ カスタマイズEND #============================================================================== end class Game_Temp attr_accessor :renew_save alias init_ending initialize def initialize init_ending @renew_save = false end end class Scene_Ending include Ending #-------------------------------------------------------------------------- # ● メイン処理 #-------------------------------------------------------------------------- def main # エンディング BGM を演奏 Audio.bgm_play("Audio/BGM/" + ENDING_BGM) # ME、BGS の演奏を停止 Audio.me_stop Audio.bgs_stop # トランジション実行 Graphics.transition if END_BACK_GRA != nil # エンディンググラフィックを作成 @sprite = Sprite.new @sprite.bitmap = RPG::Cache.title(END_BACK_GRA) # ゲーム画面を更新 Graphics.update end @category_sprite = Sprite_Category.new @producer_sprite = Sprite_Producer.new @category = nil $game_temp.renew_save = false #======================================================================== # □ カスタマイズSTART #======================================================================== # draw_telop(タイプ, 名前, 付属情報1, 付属情報2) # -> これをいくつか書けばOK. # 製作者 draw_telop("製作者", "Claimh", "Code Crush", "http://codecrush.iza-yoi.net/") # 製作協力者 draw_telop("製作協力者", "A氏", "", "") # 素材提供者 draw_telop("素材提供者(グラフィック)", "B氏", "サイトB", "URL") draw_telop("素材提供者(音楽)", "C氏", "サイトC", "URL") draw_telop("素材提供者(スクリプト)", "D氏", "サイトD", "URL") # スペシャルサンクス draw_telop("スペシャルサンクス", "E氏", "", "") draw_telop("スペシャルサンクス", "F氏", "", "") #======================================================================== # □ カスタマイズEND #======================================================================== Graphics.freeze @category_sprite.dispose @producer_sprite.dispose @sprite.bitmap = RPG::Cache.title(END_GRAPHIC) @sprite.bitmap.draw_text(0, 240-16, 640, 32, "Thank you for your playing...", 1) Graphics.transition(40) # 表示待ち for i in 0..2000 Graphics.update Input.update if Input.trigger?(Input::C) or Input.trigger?(Input::B) break end end Audio.bgm_fade(500) for i in 0..60 @sprite.opacity -= 255 / 60 Graphics.update end Graphics.freeze @sprite.bitmap.dispose @sprite.dispose if END_SAVE $game_switches[RENEW_SWITCH] = true $game_temp.renew_save = true $scene = Scene_Save.new return end $scene = Ending::ENDING_TITLE ? Scene_Title.new : nil end #-------------------------------------------------------------------------- # ● テロップ描写 #-------------------------------------------------------------------------- def draw_telop(type, name, sight, url) Graphics.freeze if @category != type @category = type @category_sprite.refresh(type) end @producer_sprite.refresh(name, sight, url) @producer_sprite.x = 0 @producer_sprite.opacity = 255 Graphics.transition # 表示待ち for i in 0..200 Graphics.update end # 移動+フェードアウト for i in 0..60 @producer_sprite.x += 5 @producer_sprite.opacity -= 8 Graphics.update end end end #============================================================================== # ■ Scene_Save #============================================================================== class Scene_Save < Scene_File #-------------------------------------------------------------------------- # ● 決定時の処理 #-------------------------------------------------------------------------- alias on_decision_ending on_decision def on_decision(filename) on_decision_ending(filename) if $game_temp.renew_save $scene = Ending::ENDING_TITLE ? Scene_Title.new : nil $game_temp.renew_save= false return end end #-------------------------------------------------------------------------- # ● キャンセル時の処理 #-------------------------------------------------------------------------- alias on_cancel_ending on_cancel def on_cancel on_cancel_ending if $game_temp.renew_save $scene = Ending::ENDING_TITLE ? Scene_Title.new : nil $game_temp.renew_save = false return end end end class Sprite_Category < Sprite #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(nil) self.y = 240 self.bitmap = Bitmap.new(400, 32) self.bitmap.font.color = Color.new(192, 224, 255, 255) end def refresh(type) self.bitmap.clear self.bitmap.draw_text(100,0,640,32,type) if type != "" end end class Sprite_Producer < Sprite #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(nil) self.y = 250 self.bitmap = Bitmap.new(640, 480) end def refresh(name, site, url) self.bitmap.clear self.bitmap.draw_text(100,32,400,32,name) if name != "" self.bitmap.draw_text(150,64,400,32,site) if site != "" self.bitmap.draw_text(150,96,400,32,url) if url != "" end end