Skip to content
Snippets Groups Projects
Commit e5919e36 authored by Jantz's avatar Jantz
Browse files

little changes to man.py

parent ec0f1aa9
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,6 @@ def main():
# GUI object creation
gui = GUI()
# 32 pixels on 1920x1080 resolution
margin = world.window_resolution[0] / 60
dt = 1/1000
time_now = time.time()
#MOUSE TESTING
......@@ -67,15 +64,15 @@ def main():
running = False
# Choose the tower to place with the number keys
if event.key == pg.K_1:
if active_tower != 2:
active_tower = 2
if world.active_tower != 2:
world.active_tower = 2
else:
active_tower = 0
world.active_tower = 0
if event.key == pg.K_2:
if active_tower != 2:
active_tower = 2
if world.active_tower != 2:
world.active_tower = 2
else:
active_tower = 0
world.active_tower = 0
# Start the round with the space key
if event.key == pg.K_SPACE and not world.round_active:
world.request_to_start_round = True
......@@ -114,8 +111,10 @@ def main():
# Debug drawing, comment out if not needed.
#world.draw_debug()
# Draw th round number
gui.draw_text(world.window, f"ROUND: {world.current_round}", (world.window_resolution[0] - margin, margin), 'topright')
# Draw the round number
gui.draw_text(world.window, f"ROUND: {world.current_round}", (world.window_resolution[0] - gui.margin, gui.margin), 'topright')
# Draw money balance
gui.draw_text(world.window, f"MONEY: {world.money}", (world.window_resolution[0] - gui.margin, gui.margin * 2 + gui.font_size), 'topright')
pg.display.update()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment