king-exit/Scripts/_.30.rb
2024-08-31 14:17:23 -05:00

137 lines
No EOL
4.7 KiB
Ruby
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=begin
RGSS3
★特殊エフェクト - タイトル表示プラグイン★
マップで表示することを想定している「光拡散エフェクト」「スクリーンノイズ」
をタイトルでも表示できるようにします。
ver1.00
Last Update : 2012/01/19
01/19 : RGSS2からの移植
ろかん   http://kaisou-ryouiki.sakura.ne.jp/
=end
#===========================================
# 設定箇所
#===========================================
module Rokan
module Title_in_Reffect
# 光拡散エフェクト
# 有効にする場合は「光拡散エフェクト」を別途導入してください。
Reffective = true
ReffectType = 4 # エフェクトの種類を指定
# スクリーンノイズ
# 有効にする場合は「スクリーンノイズ」を別途導入してください。
NoiseEffective = false
end
end
#===========================================
# ここまで
#===========================================
$rsi ||= {}
$rsi["特殊エフェクト - タイトル表示プラグイン"] = true
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# ● インクルード Rokan::Title_in_Reffect
#--------------------------------------------------------------------------
include Rokan::Title_in_Reffect
#--------------------------------------------------------------------------
# ● 開始処理
#--------------------------------------------------------------------------
alias _reffect_start start
def start
_reffect_start
create_reffect
end
#--------------------------------------------------------------------------
# ● 終了処理
#--------------------------------------------------------------------------
alias _reffect_terminate terminate
def terminate
_reffect_terminate
dispose_reffect
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias _reffect_update update unless $!
def update
_reffect_update
update_reffect
end
#--------------------------------------------------------------------------
# ● 特殊エフェクトの作成
#--------------------------------------------------------------------------
def create_reffect
if Reffective
@re_add_count = 0
@viewport = Viewport.new
@viewport.z = 70
$game_system.r_effect_type = ReffectType
end
if NoiseEffective
$game_temp.r_noise_effect_spriteset = Spriteset_Noise.new
$game_system.start_noise
end
end
#--------------------------------------------------------------------------
# ● 特殊エフェクトの解放
#--------------------------------------------------------------------------
def dispose_reffect
if Reffective
$game_system.r_effect_type = 0
$game_temp.dispose_r_effect
@viewport.dispose
end
if NoiseEffective && $game_temp.r_noise_effect_spriteset
$game_system.r_noise_effect = false
$game_temp.r_noise_effect_spriteset.dispose_noise
end
end
#--------------------------------------------------------------------------
# ● 特殊エフェクトのフレーム更新
#--------------------------------------------------------------------------
def update_reffect
if Reffective
unless $game_system.r_effect_type.zero?
if @re_add_count.zero?
case $game_system.r_effect_type
when 1..10
sprite = Sprite_Reffect_Diffusion.new(@viewport)
when 21..30
sprite = Sprite_Reffect_Spiral.new(@viewport)
end
$game_temp.r_effect_sprites << sprite
@re_add_count = 10
end
@re_add_count -= 1
end
$game_temp.r_effect_sprites.each{|sprite| sprite.update}
end
if NoiseEffective && $game_temp.r_noise_effect_spriteset
$game_temp.r_noise_effect_spriteset.update
end
end
#--------------------------------------------------------------------------
# ● 背景の作成
#--------------------------------------------------------------------------
alias _reffect_create_background create_background
def create_background
_reffect_create_background
@sprite2.z = 80
end
#--------------------------------------------------------------------------
# ● コマンドウィンドウの作成
#--------------------------------------------------------------------------
alias _reffect_create_command_window create_command_window
def create_command_window
_reffect_create_command_window
@command_window.z = 95
end
end