projet-clicodrome/js/technologie.js
2024-11-21 11:28:59 +01:00

18 lines
No EOL
390 B
JavaScript

class Technologie{
constructor(nom) {
this.nom = nom
}
charger_depuis_bdd(){
fetch("../bdd/arbre.json").then((data)=>{
data.json().then((data)=>{
console.log(data)
this.props = data[this.nom]
this.cout = this.props.cout
this.boost = this.props.boost
})
})
}
}