41 lines
1.7 KiB
Ruby
41 lines
1.7 KiB
Ruby
#==============================================================================
|
||
# ■ Game_Event
|
||
#------------------------------------------------------------------------------
|
||
# イベントを扱うクラスです。条件判定によるイベントページ切り替えや、並列処理
|
||
# イベント実行などの機能を持っており、Game_Map クラスの内部で使用されます。
|
||
#==============================================================================
|
||
|
||
class Game_Event < Game_Character
|
||
#--------------------------------------------------------------------------
|
||
# ● 画面 X 座標の取得
|
||
#--------------------------------------------------------------------------
|
||
def screen_x
|
||
super + ev_adjust[0]
|
||
end
|
||
#--------------------------------------------------------------------------
|
||
# ● 画面 Y 座標の取得
|
||
#--------------------------------------------------------------------------
|
||
def screen_y
|
||
super + ev_adjust[1]
|
||
end
|
||
#--------------------------------------------------------------------------
|
||
# 〇
|
||
#--------------------------------------------------------------------------
|
||
def ev_adjust
|
||
@ev_adjust ||= adjust_set
|
||
end
|
||
#--------------------------------------------------------------------------
|
||
# 〇
|
||
#--------------------------------------------------------------------------
|
||
def adjust_set
|
||
return [16,0] if half_board?
|
||
return [$1.to_i,$2.to_i] if @event.name =~ /^\!位置調整_x(-?\d+)_y(-?\d+)/i
|
||
return [0,0]
|
||
end
|
||
#--------------------------------------------------------------------------
|
||
# ○
|
||
#--------------------------------------------------------------------------
|
||
def half_board?
|
||
@event.name == "<ずらし看板>" && empty? && @priority_type == 2
|
||
end
|
||
end
|