This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code shows a maze and uses input from the keyboard to move the user around the screen. | |
# The objective is to reach the goal. | |
# Sets values of tile size and player's movement speed | |
# Also creates tile or box for player and generates map | |
def tick args | |
args.state.tile_size = 80 | |
args.state.player_speed = 4 | |
args.state.player ||= [200, 200, 100, 100, 'dragonruby.png'] | |
generate_map args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code shows a maze and uses input from the keyboard to move the user around the screen. | |
# The objective is to reach the goal. | |
# Sets values of tile size and player's movement speed | |
# Also creates tile or box for player and generates map | |
def tick args | |
args.state.tile_size = 80 | |
args.state.player_speed = 4 | |
args.state.player ||= tile(args, 7, 3, 0, 128, 180) | |
generate_map args |