23 lines
No EOL
536 B
JavaScript
23 lines
No EOL
536 B
JavaScript
class Technologie{
|
|
constructor(nom) {
|
|
this.nom = nom
|
|
}
|
|
|
|
chargerDepuisBdd(){
|
|
fetch("../bdd/arbre.json").then((data)=>{
|
|
data.json().then((data)=>{
|
|
console.log(data)
|
|
this.props = data["technologies"][this.nom]
|
|
this.cout = this.props.cout
|
|
this.boost = this.props.boost
|
|
})
|
|
|
|
})
|
|
}
|
|
|
|
appliquerAmeliorationStyle(){
|
|
document.getElementById("link-css").setAttribute("href","css/"+this.props.css_id)
|
|
}
|
|
|
|
|
|
} |