40 lines
1.6 KiB
Ruby
40 lines
1.6 KiB
Ruby
#==============================================================================
|
||
# ■ Game_Event
|
||
#------------------------------------------------------------------------------
|
||
# イベントを扱うクラスです。条件判定によるイベントページ切り替えや、並列処理
|
||
# イベント実行などの機能を持っており、Game_Map クラスの内部で使用されます。
|
||
#==============================================================================
|
||
|
||
class Game_Event < Game_Character
|
||
#--------------------------------------------------------------------------
|
||
# ● イベントページの設定をセットアップ
|
||
#--------------------------------------------------------------------------
|
||
alias light_setup_page_settings setup_page_settings
|
||
def setup_page_settings
|
||
light_setup_page_settings
|
||
light_set if light?
|
||
end
|
||
#--------------------------------------------------------------------------
|
||
# 〇 明かり条件
|
||
#--------------------------------------------------------------------------
|
||
def light?
|
||
@character_name != "" && @event.name == "!light"
|
||
end
|
||
#--------------------------------------------------------------------------
|
||
# 〇 明かり設定
|
||
#--------------------------------------------------------------------------
|
||
def light_set
|
||
@blend_type = 1
|
||
@opacity = 122
|
||
l = @list
|
||
if l[0].code == 108
|
||
index = 0
|
||
while l[index].code == 408 || l[index].code == 108
|
||
text = l[index].parameters[0]
|
||
@blend_type = $1.to_i if text =~ /ブレンド(\d)/
|
||
@opacity = $1.to_i if text =~ /不透明度(\d+)/
|
||
index += 1
|
||
end
|
||
end
|
||
end
|
||
end
|