class Game_Interpreter
#--------------------------------------------------------------------------
# ● 天候:舞い上がる光の開始
#--------------------------------------------------------------------------
def ancient_light
screen.change_weather(:ancient_light, 3, 0)
end
end
class Spriteset_Weather
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :viewport
attr_reader :sprites
#--------------------------------------------------------------------------
# ● 天候の種類を設定
#--------------------------------------------------------------------------
def type=(type)
if @type != type
@sprites.each{|sprite| sprite.dispose}
@sprites = []
if type == :ancient_light
5.times{@sprites << Ancient_Light.new(self)}
end
end
@type = type
end
#--------------------------------------------------------------------------
# ● 天候の強さを設定
#--------------------------------------------------------------------------
alias ancient_light_power= power=
def power=(power)
if @type != :ancient_light
self.ancient_light_power = power
else
@power = power
end
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias ancient_light_update update
def update
if @type == :ancient_light
update_screen
@sprites << Ancient_Light.new(self) if (Graphics.frame_count % 100).zero?
@sprites.each{|sprite| sprite.update}
else
ancient_light_update
end
end
end