projet-clicodrome/js/collegue.js

21 lines
No EOL
515 B
JavaScript

class Collegue{
constructor(nom) {
this.nom = nom
}
async chargerDepuisBdd() {
let data = await fetch("../bdd/arbre.json")
data = await data.json()
this.props = data["collegues"][this.nom]
this.nom = this.props.nom
this.cout = this.props.cout
this.boost = this.props.boost
this.revenu_passif = this.props.revenu_passif
}
afficherAnimationDebloquage(){
// animation sympathique lorsque l'on achète un personnage
}
}