lunariafantasia/Scripts/_CACAO_.rb
2024-01-12 03:12:38 -06:00

75 lines
3 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#******************************************************************************
#
# トランジション
#
# --------------------------------------------------------------------------
# バージョン 1.0.0
# 対 応 RPGツクールVX Ace : RGSS3
# 制 作 者
# 配 布 元 http://cacaosoft.webcrow.jp/
# --------------------------------------------------------------------------
# == 概 要 ==
#
# トランジション処理を追加します。
# フェードアウト・インの時間を指定可能にします。
#
# --------------------------------------------------------------------------
# == 使用方法 ==
#
# ★ トランジション準備
# prepare_transition
#
# ★ トランジション開始
# perform_transition(duration = 30, filename = "", vague = 40)
# start_transition(duration = 30, filename = "", vague = 40)
#
# ★ 画面のフェードアウト
# start_fadeout(duration = 30)
#
# ★ 画面のフェードイン
# start_fadein(duration = 30)
#
#
#******************************************************************************
#/////////////////////////////////////////////////////////////////////////////#
# #
# 下記のスクリプトを変更する必要はありません。 #
# #
#/////////////////////////////////////////////////////////////////////////////#
class Game_Interpreter
#--------------------------------------------------------------------------
# ● トランジション準備
#--------------------------------------------------------------------------
def prepare_transition
Fiber.yield while $game_message.visible
Graphics.freeze
end
#--------------------------------------------------------------------------
# ● トランジション実行
#--------------------------------------------------------------------------
def perform_transition(duration = 30, filename = "", vague = 40)
begin Fiber.yield end while $game_message.visible
Graphics.transition(duration, "Graphics/Transitions/#{filename}", vague)
end
alias start_transition perform_transition
#--------------------------------------------------------------------------
# ● 画面のフェードアウト
#--------------------------------------------------------------------------
def start_fadeout(duration = 30)
Fiber.yield while $game_message.visible
screen.start_fadeout(duration)
wait(duration)
end
#--------------------------------------------------------------------------
# ● 画面のフェードイン
#--------------------------------------------------------------------------
def start_fadein(duration = 30)
Fiber.yield while $game_message.visible
screen.start_fadein(duration)
wait(duration)
end
end