-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchange.py
More file actions
30 lines (19 loc) · 721 Bytes
/
change.py
File metadata and controls
30 lines (19 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Hero(TankSprite):
def __init__(self, image_name, screen):
self.is_dash = False
def update(self):
if not self.is_hit_wall:
super().update()
if self.is_dash :
for i in range(10):
super().update()
self.is_dash = False
self.__turn()
# def __check_keyup(self, event):
# elif event.key == pygame.K_BACKSPACE:
# self.hero.is_moving = False
# def __check_keydown(self, event):
# elif event.key == pygame.K_BACKSPACE:
# self.hero.is_moving = True
# self.hero.is_hit_wall = False
# self.hero.is_dash = True