Merge world and webrtc conexion
This commit is contained in:
parent
3151113db3
commit
2bfa57b0ba
7 changed files with 123 additions and 68 deletions
|
@ -3,6 +3,7 @@ import {PointInterface} from "./Websocket/PointInterface";
|
|||
import {Group} from "./Group";
|
||||
import {Distance} from "./Distance";
|
||||
import {UserInterface} from "./UserInterface";
|
||||
import {ExSocketInterface} from "_Model/Websocket/ExSocketInterface";
|
||||
|
||||
export class World {
|
||||
static readonly MIN_DISTANCE = 160;
|
||||
|
@ -29,8 +30,12 @@ export class World {
|
|||
});
|
||||
}
|
||||
|
||||
public leave(user : ExSocketInterface){
|
||||
/*TODO leaver user in group*/
|
||||
this.users.delete(user.userId);
|
||||
}
|
||||
|
||||
public updatePosition(userPosition: MessageUserPosition): void {
|
||||
let context = this;
|
||||
let user = this.users.get(userPosition.userId);
|
||||
if(typeof user === 'undefined') {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue