Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # • Diagonal Moviment
- #==============================================================================
- # Autor: Dax
- # Versão: 1.0
- # Site: www.dax-soft.weebly.com
- # Requerimento: N/A
- #==============================================================================
- # • Descrição:
- #------------------------------------------------------------------------------
- # Adicional a opção do personagem andar na diagonal.
- #==============================================================================
- class Game_Player < Game_Character
- #--------------------------------------------------------------------------
- # • Processamento de movimento através de pressionar tecla
- #--------------------------------------------------------------------------
- def move_by_input
- return if !movable? || $game_map.interpreter.running?
- case Input.dir8
- when 2, 4, 6, 8 then move_straight(Input.dir4)
- when 1
- move_diagonal(4, 2)
- [4, 2].each { |i| move_straight(i) unless moving? }
- when 3
- move_diagonal(6, 2)
- [6, 2].each { |i| move_straight(i) unless moving? }
- when 7
- move_diagonal(4, 8)
- [4, 8].each { |i| move_straight(i) unless moving? }
- when 9
- move_diagonal(6, 8)
- [6, 8].each { |i| move_straight(i) unless moving? }
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement