blob: 6771b5e13fe013fef13fa1d5117366195c2f214e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
(local proto (require :lib.proto))
{:init (proto.table-method :entity.init)
:position (proto.table-value :entity.position)
:velocity (proto.table-value :entity.velocity)
:duration (proto.table-value :entity.duration)
;; [self game {: up : down : left : right}]
:steer (proto.meta-method :entity.velocity)
;; [self game]
;; screen origin at center of entity, 1 = 1 pixel (for now)
:draw (proto.meta-method :entity.draw)
;; [self game pos]
:collide (proto.meta-method-opt :entity.collide)}
|