18 lines
525 B
TypeScript
18 lines
525 B
TypeScript
|
import { physicsObject } from "./physicsObject";
|
||
|
import { playerInventory } from "./playerInventory";
|
||
|
|
||
|
export class playerData{
|
||
|
socketId : string
|
||
|
userName : string
|
||
|
characterId : number
|
||
|
inventory : playerInventory = new playerInventory()
|
||
|
rigidbody : physicsObject = new physicsObject()
|
||
|
|
||
|
static copyLight(data : playerData){
|
||
|
let player : any = Object.assign({}, data);
|
||
|
delete player.userName
|
||
|
delete player.characterId
|
||
|
delete player.inventory
|
||
|
return player
|
||
|
}
|
||
|
}
|