Fix ide support

This commit is contained in:
schmelczerandras 2020-10-07 18:35:32 +02:00
parent 1a3afe4dd0
commit e01400058d
14 changed files with 50 additions and 20 deletions

View file

@ -5,6 +5,10 @@ import { serializable } from '../transport/serialization/serializable';
export class Circle {
constructor(public center: vec2, public radius: number) {}
public distance(target: vec2): number {
return vec2.distance(this.center, target) - this.radius;
}
public toArray(): Array<any> {
return [this.center, this.radius];
}