Merge branch 'Users' of https://codefirst.iut.uca.fr/git/Crypteam/Cryptid into GestionProfile
commit
9e98f374e9
@ -1,22 +0,0 @@
|
||||
import Player from "./Player";
|
||||
import defaultImg from '../res/img/Person.png'
|
||||
|
||||
class Human extends Player{
|
||||
|
||||
public pdp: string;
|
||||
|
||||
constructor(id: string, name: string){
|
||||
super(id, name)
|
||||
this.pdp = defaultImg;
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
type: "Human",
|
||||
id: this.id,
|
||||
name: this.name,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default Human
|
@ -0,0 +1,25 @@
|
||||
import Player from "./Player";
|
||||
|
||||
class User extends Player{
|
||||
|
||||
public soloStats: any
|
||||
public onlineStats: any
|
||||
|
||||
constructor(id: string, name: string, profilePicture: string, soloStats: any, onlineStats: any){
|
||||
super(id, name, 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
|
Loading…
Reference in new issue