lunariafantasia/Scripts/_.68.rb
2024-01-12 03:12:38 -06:00

41 lines
1.7 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#==============================================================================
# ■ 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