end #end case
end
end
#==========================================================================
#==========================================================================
# ■ Window_DayLight
#--------------------------------------------------------------------------
# 顯示日夜/時間的窗口。
#==========================================================================
# 釋放訊息窗口
@message_window.dispose
# 標題畫面切換中的情況下
if $scene.is_a?(Scene_Title)
# 淡入淡出畫面
Graphics.transition
Graphics.freeze
end
end
alias daylight_sys_update update
def update
@daylight_window.refresh #刷新時間顯示
#------------------------------------------------------------------------
# ● 初始化對像
# x : 窗口的 X 坐標
# y : 窗口的 Y 坐標
# width : 窗口的寬
# height : 窗口的寬
#------------------------------------------------------------------------
def initialize(x, y, width, height)
super()
@windowskin_name = $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
self.x = x
self.y = y
self.width = width
self.height = height
self.z = 100
end
#------------------------------------------------------------------------
#洞穴 屋內亮度正常化
#------------------------------------------------------------------------
def inside_normal
if $game_switches[Ctrl_in_house] == true
$game_screen.start_tone_change(Tone.new(0,0,0,0),5)
end
end
#------------------------------------------------------------------------
#---------------------------------------
#時段使用圖案代表
#---------------------------------------
def show_day #時段圖案函式
testname=$hour.to_s#將角色ID編號,轉成字串變數(to_s) 並存到testname
bitmap=Bitmap.new("Graphics/pictures/#{testname}")#取出路徑Graphics/pictures/下 testname 檔名的圖
src_rect=Rect.new(0,0,bitmap.width,bitmap.height)
self.contents.blt(20,4,bitmap,src_rect)
end
#---------------------------------------
#-----------------------------------------
#天氣變化
#-----------------------------------------
def weather_decision
if $game_switches[Ctrl_in_house] == true
$game_screen.weather(0, 3, 1)
else
w_d = rand(100)
if w_d >= 0 and w_d <= 80
$game_screen.weather(0, 3, 50) #正常(類型0正常1雨天2刮風3下雪,強度,時間/10)
else
if w_d > 80 and w_d <= 90
$game_screen.weather(1, 5, 50)#雨天
else
if w_d > 90 and w_d <= 100
$game_screen.weather(1, 10, 500)#刮風
end
end
end
end
end
#---------------------------------------
#------------各時間顏色變化---------------------
def the_time
if $scene.is_a?(Scene_Battle)
else
end
end#end case
end
end
#==========================================================================
#==========================================================================
# ■ Window_DayLight
#--------------------------------------------------------------------------
# 顯示日夜/時間的窗口。
#==========================================================================
# 釋放訊息窗口
@message_window.dispose
# 標題畫面切換中的情況下
if $scene.is_a?(Scene_Title)
# 淡入淡出畫面
Graphics.transition
Graphics.freeze
end
end
alias daylight_sys_update update
def update
@daylight_window.refresh #刷新時間顯示