Commit 28bcba01 authored by Johnny Jazeix's avatar Johnny Jazeix

babymatch, fix activity not loading when starting it twice without changing dataset

parent 3f3494af
......@@ -56,8 +56,9 @@ function start(items_, imagesUrl_, soundsUrl_, boardsUrl_, levelCount_, answerGl
function resetData() {
items.availablePieces.model.clear()
for(var i = 0 ; i < spots.length ; ++ i)
for(var i = 0 ; i < spots.length ; ++ i) {
spots[i].destroy()
}
spots = []
for(var i = 0 ; i < showText.length ; ++ i)
......@@ -69,8 +70,7 @@ function resetData() {
}
function stop() {
for(var i = 0 ; i < spots.length ; ++ i)
spots[i].destroy()
resetData()
}
function initLevel() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment