#--------------------------------------------------------------------------
# ● 正面事件的启动判定
#--------------------------------------------------------------------------
def check_event_trigger_there(triggers)
result = false
# 事件执行中的情况下
if $game_system.map_interpreter.running?
return result
end
# 计算正面坐标
new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# 全部事件的循环
for event in $game_map.events.values
# 事件坐标与目标一致的情况下
if event.x == new_x and event.y == new_y and
triggers.include?(event.trigger)
# 跳跃中以外的情况下、启动判定是正面的事件
if not event.jumping? and not event.over_trigger?
event.start
result = true
end
end
end
# 找不到符合条件的事件的情况下
if result == false
# 正面的元件是计数器的情况下
if $game_map.counter?(new_x, new_y)
# 计算 1 元件里侧的坐标
new_x += (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y += (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# 全事件的循环
for event in $game_map.events.values
# 事件坐标与目标一致的情况下
if event.x == new_x and event.y == new_y and
triggers.include?(event.trigger)
# 跳跃中以外的情况下、启动判定是正面的事件
if not event.jumping? and not event.over_trigger?
event.start
result = true
end
end
end
end
end
return result
end