Added spawnable npcs. Fixed angle-radian convertion functions.
This commit is contained in:
6
actor.py
6
actor.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user