Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/api/SuperSprite.py
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2013-08-22 21:20:52 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2013-08-22 21:20:52 (GMT)
commita8b8f856120ebde13c4703e3aa460594822cc56f (patch)
treeec28e9637873287ecd6fd1af2f24435a5b0d93b0 /src/api/SuperSprite.py
parent9a62679e89ad1fbc0954ba5bdb378b6c132c04ec (diff)
more cleans and fixes
Diffstat (limited to 'src/api/SuperSprite.py')
-rwxr-xr-xsrc/api/SuperSprite.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/api/SuperSprite.py b/src/api/SuperSprite.py
index d044541..2dee0ea 100755
--- a/src/api/SuperSprite.py
+++ b/src/api/SuperSprite.py
@@ -176,14 +176,14 @@ class CSuperSprite(pygame.sprite.Sprite):
if self.speed > self.maxSpeed:
self.speed = self.maxSpeed
- def setAngle(self, dir):
+ def setAngle(self, direction):
""" sets both the direction of motion
and visual rotation to the given angle
If you want to set one or the other,
set them directly. Angle measured in degrees
"""
- self.dir = dir
- self.rotation = dir
+ self.dir = direction
+ self.rotation = direction
def turnBy (self, amt):
""" turn by given number of degrees. Changes
@@ -312,7 +312,7 @@ class CSuperSprite(pygame.sprite.Sprite):
radians = math.atan2(dy, dx)
self.dir = radians / math.pi * 180
- def setSpeedLimits(self, max, min):
+ def setSpeedLimits(self, amax, amin):
""" determines maximum and minimum
speeds you will allow through
speedUp() method. You can still
@@ -321,8 +321,8 @@ class CSuperSprite(pygame.sprite.Sprite):
max: 10
min: -3
"""
- self.maxSpeed = max
- self.minSpeed = min
+ self.maxSpeed = amax
+ self.minSpeed = amin
def dataTrace(self):
""" utility method for debugging
@@ -393,9 +393,9 @@ class CSuperSprite(pygame.sprite.Sprite):
dy *= -1
radians = math.atan2(dy, dx)
- dir = radians * 180 / math.pi
- dir += 180
- return dir
+ direction = radians * 180 / math.pi
+ direction += 180
+ return direction
def drawTrace(self, color=(0x00, 0x00, 0x00)):
""" traces a line between previous position