td = $game_player
return true if td.moving? or $game_switches[JUDGE_SWITCHES]
case td.direction
when 8
if $game_map.check_event(td.x, td.y - 1).class != Fixnum
if INPUT_TYPE
return td.passable?(td.x, td.y - 1, td.direction) if Input.press?(Input::UP)
else
return td.passable?(td.x, td.y - 1, td.direction) if Input.trigger?(Input::UP)
end
end
when 6
if $game_map.check_event(td.x + 1, td.y).class != Fixnum
if INPUT_TYPE
return td.passable?(td.x + 1, td.y, td.direction) if Input.press?(Input::RIGHT)
else
return td.passable?(td.x + 1, td.y, td.direction) if Input.trigger?(Input::RIGHT)
end
end
when 4
if $game_map.check_event(td.x - 1, td.y).class != Fixnum
if INPUT_TYPE
return td.passable?(td.x - 1, td.y, td.direction) if Input.press?(Input::LEFT)
else
return td.passable?(td.x - 1, td.y, td.direction) if Input.trigger?(Input::LEFT)
end
end
when 2
if $game_map.check_event(td.x, td.y + 1).class != Fixnum
if INPUT_TYPE
return td.passable?(td.x, td.y + 1, td.direction) if Input.press?(Input::DOWN)
else
return td.passable?(td.x, td.y + 1, td.direction) if Input.trigger?(Input::DOWN)
end # if INPUT_TYPE
end # if $game_map.check_event
end # case
return true
end # def
alias rwa_extra_voice_run_in_update update
def update
rwa_extra_voice_run_in_update
return if $game_switches[JUDGE_SWITCHES]
if !$game_player.moving?
@@tdtime ||= []
@@tdtime[0] ||= 0
@@tdtime[1] ||= false
@@tdtime[0] >= SE_DELAY ? @@tdtime[1] = true : @@tdtime[0] += 1
@@tdtime[0] = 0 if @@tdtime[1]
end
if rwa_extra_voice_run_in == false and @@tdtime[1]
Audio.se_play("Audio/SE/#{SE_NAME}", SE_VOLUME, 100)
@@tdtime[1] = nil
end # if
end # def