summaryrefslogtreecommitdiffstats
path: root/src/controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/controller')
-rw-r--r--src/controller/collision.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/controller/collision.ts b/src/controller/collision.ts
index e1bd9f9..a44ffa4 100644
--- a/src/controller/collision.ts
+++ b/src/controller/collision.ts
@@ -1,5 +1,6 @@
import { Collision } from '../model/data/collision';
+import { Circle } from '../math/circle';
import { Collidable } from '../math/collision';
import { LineSegment, Movement } from '../math/line';
import { Point } from '../math/point';
@@ -26,6 +27,11 @@ export function mkCollision(collision: Collision[]): Collidable[] {
ret.push(new Point(vec2.clone(v)));
prev = v;
}
+ break;
+
+ case 'circle':
+ ret.push(new Circle(vec2.clone(c.center), c.radius));
+ break;
}
}