projet-clicodrome/js/element.js

15 lines
No EOL
341 B
JavaScript

class element{
constructor(techno,tag) {
this.tag = tag
this.techno = techno
}
charger_depuis_bdd(){
fetch("../bdd/arbre.json").then((data,r)=>{
let props = data["technologies"][this.techno][this.tag]
this.cout = props.cout
this.boost = props.boost
})
}
}