BIG WIP of refactoring my work in TS
This commit is contained in:
@@ -24,9 +24,8 @@ export class Point implements PointInterface{
|
||||
export class MessageUserPosition extends Message{
|
||||
position: PointInterface;
|
||||
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
let data = JSON.parse(message);
|
||||
constructor(data: any) {
|
||||
super(data);
|
||||
this.position = new Point(data.position.x, data.position.y);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user