- Joined
- Aug 28, 2013
- Messages
- 349
- Reaction score
- 100
- First Language
- German
- Primarily Uses
- N/A
This is the method:
def update_call_menu if $game_system.menu_disabled || $game_map.interpreter.running? @menu_calling = false else @menu_calling ||= Input.trigger?
call_menu if @menu_calling && !$game_player.moving? end endit looks complicated to me and I dont see why they need to use a @menu_calling variable for this.
Can someone explain it to me?
I mean you could do somethin like this:
def update_call_menu call_menu if can_call_menu? && Input.trigger?
end def can_call_menu? return false if $game_system.menu_disabled return false if $game_map.interpreter.running? return false if $game_player.moving? return true endIs there a reason why it was done like it was done?
def update_call_menu if $game_system.menu_disabled || $game_map.interpreter.running? @menu_calling = false else @menu_calling ||= Input.trigger?
Can someone explain it to me?
I mean you could do somethin like this:
def update_call_menu call_menu if can_call_menu? && Input.trigger?
