aboutsummaryrefslogtreecommitdiff
path: root/src/macroknight/entities.hy
diff options
context:
space:
mode:
Diffstat (limited to 'src/macroknight/entities.hy')
-rw-r--r--src/macroknight/entities.hy20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/macroknight/entities.hy b/src/macroknight/entities.hy
index 812193e..c490b25 100644
--- a/src/macroknight/entities.hy
+++ b/src/macroknight/entities.hy
@@ -87,3 +87,23 @@
(defn [property] surf [self]
self._disp_surf))
+
+(defclass Enemy [Entity]
+ (setv _type "enemy"))
+
+(defclass Enemy2Swords [Enemy]
+ (defn __init__ [self id tile tile-size x y]
+ (.__init__ (super) id tile tile-size x y)
+ (.flush self))
+
+ (defn move [self move]
+ (.append self.moves move)
+ (.move_ip self._rect (get move 0) (get move 1)))
+
+ (defn flush [self]
+ (setv self.moves []))
+
+ (defn ground [self])
+
+ (defn [property] total-move [self]
+ (merge-moves self.moves)))