premier jet chargement depuis bdd

This commit is contained in:
Theo Mougnibas 2024-11-21 11:02:48 +01:00
parent 4d401ae98e
commit d33febcac7

View file

@ -1,11 +1,15 @@
class element{
constructor(tag,id) {
constructor(techno,tag) {
this.tag = tag
this.id = id
this.techno = techno
}
afficher(){
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
})
}
}