#==============================================================================
# ■ 简易雾图像显示 by satgo1546
#------------------------------------------------------------------------------
# 简单地在地图上显示雾图像。设置在下面:
# 设定方法:map_id => [filename,opacity,xmove,ymove,zoom],
# 参数讲解:
# map_id 地图ID
# filename 雾图像文件名,塞到远景图文件夹里就行了
# opacity 雾的透明度
# xmove/ymove 横/纵坐标移动速率,与远景一样
# zoom 缩放百分比,一般设定为100或200
#
# 最后一项不用逗号,否则别忘记逗号!
#------------------------------------------------------------------------------
FOG_LIST = {
#12 => ["Fog1",64,-2,2,200]
}
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# ● 生成远景顺便生成雾
#--------------------------------------------------------------------------
alias sgc_par create_parallax
def create_parallax
sgc_par
@foggggg = Plane.new
@fog1 = FOG_LIST[$game_map.map_id]
@foggggg.bitmap = Bitmap.new(200,200) if @fog1.nil?
@foggggg.bitmap = Cache.parallax(@fog1[0]) unless @fog1.nil?
@foggggg.z = 6444
@foggggg.opacity = @fog1[1] unless @fog1.nil?
@foggggg.zoom_x = @foggggg.zoom_y = @fog1[4] / 100.0 unless @fog1.nil?
end
#--------------------------------------------------------------------------
# ● 释放远景顺便释放雾
#--------------------------------------------------------------------------
alias sgd_par dispose_parallax
def dispose_parallax
sgd_par
@foggggg.bitmap.dispose
@foggggg.dispose
end
#--------------------------------------------------------------------------
# ● 更新远景顺便更新雾
#--------------------------------------------------------------------------
alias sgu_par update_parallax
def update_parallax
sgu_par
unless @fog1.nil?
@foggggg.ox += @fog1[2]
@foggggg.oy += @fog1[3]
end
end
end