add agent rotate image
This commit is contained in:
parent
3d8ff6222c
commit
1900954708
BIN
images/sapper_idle/agent0.png
Normal file
BIN
images/sapper_idle/agent0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
images/sapper_idle/agent1.png
Normal file
BIN
images/sapper_idle/agent1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
images/sapper_idle/agent3.png
Normal file
BIN
images/sapper_idle/agent3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -25,7 +25,7 @@ def main():
|
||||
#1 - right
|
||||
#2 - up
|
||||
#3 - left
|
||||
#4 - down
|
||||
#0 - down
|
||||
|
||||
while running:
|
||||
for event in pg.event.get():
|
||||
@ -34,9 +34,9 @@ def main():
|
||||
running = False
|
||||
elif event.type == pg.KEYDOWN:
|
||||
if (event.key == pg.K_d or event.key == pg.K_RIGHT):
|
||||
game_ui.rotate(1)
|
||||
elif (event.key == pg.K_a or event.key == pg.K_LEFT):
|
||||
game_ui.rotate(-1)
|
||||
elif (event.key == pg.K_a or event.key == pg.K_LEFT):
|
||||
game_ui.rotate(1)
|
||||
elif (event.key == pg.K_w or event.key == pg.K_UP and ((agent.dir == 1 and agent.x*80 < 700) or (agent.dir == 3 and agent.x*80 > 5) or
|
||||
(agent.dir == 2 and agent.y*80 > 0) or (agent.dir == 0 and agent.y*80 < 700))):
|
||||
game_ui.move()
|
||||
|
Loading…
Reference in New Issue
Block a user