You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Cryptid/cryptide_project/src/model/User.tsx

30 lines
710 B

import Player from "./Player";
import defaultpdp from "../res/img/Person.png"
class User extends Player{
public soloStats: any
public onlineStats: any
constructor(id: string, pseudo: string, profilePicture: string, soloStats: any, onlineStats: any){
if (profilePicture == ""){
profilePicture = defaultpdp
}
super(id, pseudo, profilePicture)
this.soloStats=soloStats
this.onlineStats=onlineStats
}
toJson() {
return {
type: "User",
id: this.id,
pseudo: this.pseudo,
soloStats: this.soloStats,
onlineStats: this.onlineStats
};
}
}
export default User