Added spawnable npcs. Fixed angle-radian convertion functions.

This commit is contained in:
2013-01-22 10:26:58 -04:30
parent 7361223ebf
commit ae7c7d66ed
3 changed files with 140 additions and 6 deletions

View File

@@ -262,6 +262,7 @@ class OmnidirectionalActor(BaseActor):
self.idle_frames = []
self.moving_frames = []
self.scared_frames = []
self.current_frame = 0
def is_moving(self):
@@ -355,6 +356,11 @@ class OmnidirectionalActor(BaseActor):
if self.current_frame >= len(self.moving_frames):
self.current_frame = len(self.moving_frames) - 1
def toggle_scared(self):
aux = self.moving_frames
self.moving_frames = self.scared_frames
self.scared_frames = aux
def draw(self, canvas):
if self.image is not None:
if not self.animated: