#============================================================================== # ■ VX-RGSS2-12 エンディング [Ver.1.0.0] by Claimh #------------------------------------------------------------------------------ # エンディング(スタッフロール)の雛型です # あくまで雛形なので、自分で納得がいくまで改造してください。 # # 表示順:製作者→製作協力者→素材提供者→END表示 # (→強くてニューゲーム用セーブ)→タイトルor強制終了 # 画像パス:Graphics/system #============================================================================== module Ending #============================================================================== # □ カスタマイズSTART #============================================================================== # エンディングBGM ENDING_BGM = "Scene8" # エンディングバックグラフィック(黒背景でいいならnil) END_BACK_GRA = "Title" # END表示グラフィック(必須) END_GRAPHIC = "Title" # エンディング後はタイトルに戻す(強制終了させるなら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 = Cache.system(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 = Cache.system(END_GRAPHIC) @sprite.bitmap.draw_text(0, 208-12, 544, 24, "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 for i in 0..70 @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..220 Graphics.update end # 移動+フェードアウト for i in 0..70 @producer_sprite.x += 3 @producer_sprite.opacity -= 7 Graphics.update end end end #============================================================================== # ■ Scene_Save #============================================================================== class Scene_File < Scene_Base #-------------------------------------------------------------------------- # ● 元の画面へ戻る #-------------------------------------------------------------------------- alias return_scene_ending return_scene def return_scene if $game_temp.renew_save $scene = Ending::ENDING_TITLE ? Scene_Title.new : nil $game_temp.renew_save= false return end return_scene_ending end end class Sprite_Category < Sprite #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(nil) self.y = 208 self.bitmap = Bitmap.new(400, 24) self.bitmap.font.color = Color.new(192, 224, 255, 255) end def refresh(type) self.bitmap.clear self.bitmap.draw_text(100,0,544,24,type) if type != "" end end class Sprite_Producer < Sprite #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(nil) self.y = 218 self.bitmap = Bitmap.new(544, 416) end def refresh(name, site, url) self.bitmap.clear self.bitmap.draw_text(100,24,400,24,name) if name != "" self.bitmap.draw_text(150,48,400,24,site) if site != "" self.bitmap.draw_text(150,72,400,24,url) if url != "" end end