samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
def input
    # Check and handle button input
    input_buttons

    # If the mouse was lifted this tick
    if inputs.mouse.up
      # Set current input to none
      state.user_input = :none
    end

    # If the mouse was clicked this tick
    if inputs.mouse.down
      # Determine what the user is editing and appropriately edit the state.user_input variable
      determine_input
    end

    # Process user input based on user_input variable and current mouse position
    process_input
  end
# This method handles user input every tick
This method handles user input every tick
This method handles user input every tick
def input
    input_buttons
    if inputs.mouse.up
      state.user_input = :none
    end
    if inputs.mouse.down
      determine_input
    end
    process_input
  end
def input input_buttons if inputs . mouse . up state . user_input = :none end if inputs . mouse . down determine_input end process_input end
This method handles user input every tick
This method handles user input every tick
# Check and handle button input # If the mouse was lifted this tick # Set current input to none # If the mouse was clicked this tick # Determine what the user is editing and appropriately edit the state.user_input variable # Process user input based on user_input variable and current mouse position