|
From: João <lv...@us...> - 2009-12-05 23:40:16
|
This is an automated email from the git, the tree hashes are:
via 174d90a8487f598ed829470a9410257543aef0b7 (commit)
via 7241257d272c331e205ad12f67a1a71055bf6be5 (commit)
from 38fdfb4657fbe77c921c39bea0720bd845a7bb7d (commit)
- Log -----------------------------------------------------------------
commit 174d90a8487f598ed829470a9410257543aef0b7
Author: João <jcorrea@marvim.(none)>
Date: Sat Dec 5 19:15:47 2009 -0200
Adding dictionary to behaviours as suggested by Cardoso
diff --git a/code/enemy.py b/code/enemy.py
index 1a1d622..c5ce3ea 100644
--- a/code/enemy.py
+++ b/code/enemy.py
@@ -29,20 +29,18 @@ class Enemy(Actor):
Creates an enemy character that could has one of the following
behaves: normal, fast, or diagonal.
"""
+
+ self.speed_list = {"normal":[-4,0],
+ "fast":[-7,0],
+ "diagonal":[-3,1],
+ "seeker":[-3,1],
+ "zigzag":[-3,1]
+ }
self.counter = 1
self.orientation = True
self.behaviour = behaviour
- if behaviour == "normal":
- speed = [-4, 0]
- elif behaviour == "fast":
- speed = [-7, 0]
- elif behaviour == "diagonal":
- speed = [-3, 1]
- elif behaviour == "seeker":
- speed = [-3, 1]
- elif behaviour == "zigzag":
- speed = [-3, 1]
+ speed = self.speed_list[behaviour]
Actor.__init__(self, position, rotation, life, speed,
rotation_speed, image)
commit 7241257d272c331e205ad12f67a1a71055bf6be5
Author: João <jcorrea@marvim.(none)>
Date: Sat Dec 5 18:36:53 2009 -0200
Fixing type cast on pop function
diff --git a/code/stage.py b/code/stage.py
index a2e32ab..469dbde 100644
--- a/code/stage.py
+++ b/code/stage.py
@@ -95,7 +95,7 @@ class Stage:
nextx = int(self.getNextX())
while nextx == position:
subList.append(self.L.pop())
- nextx = self.getNextX()
+ nextx = int(self.getNextX())
return subList
def buildStage(self):
-----------------------------------------------------------------------
Summary of changes:
code/enemy.py | 18 ++++++++----------
code/stage.py | 2 +-
2 files changed, 9 insertions(+), 11 deletions(-)
--
Dead Channel is a sci-fi shoot 'em up game developed using pygame.
|