src/js/main1.js
// this function will be called when the player touches a coin
this function will be called when the player touches a coin
this function will be called when the player touches a coin
function collectCoin(sprite, tile) {
    coinLayer.removeTileAt(tile.x, tile.y); 
    score++; 
    text.setText('Energy '+ score); 
    return false;
}
function collectCoin ( sprite , tile ) { coinLayer . removeTileAt ( tile . x , tile . y ) ; score ++ ; text . setText ( 'Energy ' + score ) ; return false ; }
this function will be called when the player touches a coin
this function will be called when the player touches a coin
// remove the tile/coin // add 10 points to the score // set the text to show the current score