Class BB_Storage
Defined in: Storage.js.
Constructor Attributes | Constructor Name and Description |
---|---|
BB_Storage(levels)
Game data storage
|
Method Attributes | Method Name and Description |
---|---|
getLevel()
Get maximun level number
|
|
getSound()
Get sound enabled
|
|
save()
Save data to local storage
|
|
setScore(level, score, level)
Set score data and check new highscore
|
|
setSound(enabled)
Set sound enabled
|
Method Detail
{Number}
getLevel()
Get maximun level number
- Returns:
- {Number}
{Boolean}
getSound()
Get sound enabled
- Returns:
- {Boolean}
save()
Save data to local storage
setScore(level, score, level)
Set score data and check new highscore
- Parameters:
- {Number} level
- {BB_Score} score
- {Boolean} level
- completed
setSound(enabled)
Set sound enabled
- Parameters:
- {Boolean} enabled