premier jet chargement depuis bdd
This commit is contained in:
parent
4d401ae98e
commit
d33febcac7
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue