diff --git a/asset/asset.svg b/asset/asset.svg
index e103936..d3b414f 100644
--- a/asset/asset.svg
+++ b/asset/asset.svg
@@ -26,8 +26,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.24748737"
- inkscape:cx="-2542.2953"
- inkscape:cy="99.716565"
+ inkscape:cx="-3244.5066"
+ inkscape:cy="371.0213"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -49,7 +49,7 @@
image/svg+xml
-
+
@@ -745,8 +745,8 @@
inkscape:export-xdpi="133.33333"
inkscape:export-ydpi="133.33333" />
cap_speed: self.speed[0] = cap_speed
if keystate[self.key_up]:
- self.speed[1] = -1*cap_speed
+ self.speed[1] -= acceleration
+ if self.speed[1] < -cap_speed: self.speed[1] = -cap_speed
if keystate[self.key_down]:
- self.speed[1] = cap_speed
+ self.speed[1] += acceleration
+ if self.speed[1] > cap_speed: self.speed[1] = cap_speed
# Begin the deceleration
- self.speed[0] = int(self.speed[0]/deceleration)
- self.speed[1] = int(self.speed[1]/deceleration)
+ if not (keystate[self.key_left] or keystate[self.key_right]):
+ self.speed[0] = int(self.speed[0]/deceleration)
+ if not (keystate[self.key_up] or keystate[self.key_down]):
+ self.speed[1] = int(self.speed[1]/deceleration)
# Update the position
self.posx = self.posx+self.speed[0]
@@ -130,7 +137,7 @@ class Perso():
canon = pygame.transform.rotate(self.canon,self.degres_canon)
# Get rects
- self.perso_rect = self.img.get_rect()
+ self.perso_rect = perso.get_rect()
self.canon_rect = canon.get_rect()
# Blits