mirror of
https://github.com/2009scape/2009scape.github.io.git
synced 2024-09-12 03:12:30 +02:00
17 lines
612 B
JavaScript
17 lines
612 B
JavaScript
var chocolateBars = {
|
|
|
|
// Variables
|
|
nbrOwned : 0,
|
|
|
|
setNbrOwned : function(value){
|
|
this.nbrOwned = value;
|
|
|
|
if(this.nbrOwned == 0) htmlInteraction.setInnerHtml("chocolate_bars", "You have 0 chocolate bars :(");
|
|
else if(this.nbrOwned != 1) htmlInteraction.setInnerHtml("chocolate_bars", "You have " + this.nbrOwned + " chocolate bars \\o/ (a bug ? Oo)");
|
|
else htmlInteraction.setInnerHtml("chocolate_bars", "You have 1 chocolate bar \\o/");
|
|
htmlInteraction.setElementVisibility("chocolate_bars", true);
|
|
buttons.checkChocolateBars();
|
|
}
|
|
|
|
};
|