//Score decreases when background is clicked
//*******Background Object - Mouse Click Event******//
$this.scene.score -= 1;
score.text($this.scene.score);

//******Scene - Initialize When Scene Starts*******//
if($this.scene.state() == "PLAY") {
    ninja_1.visible(false);
    ninja_2.visible(false);
    ninja_3.visible(false);
    ninja_4.visible(false);

    var ninjaTime1 = random(3000,1000);
    createTimer(ninjaTime1, function(){
        if (ninja_1.visible()) {
            ninja_1.visible(false);
        } else {
            ninja_1.visible(true);
        }
    });

    var ninjaTime2 = random(3000,1000);
    createTimer(ninjaTime1, function(){
        if (ninja_2.visible()) {
            ninja_2.visible(false);
        } else {
            ninja_2.visible(true);
        }
    });

    var ninjaTime3 = random(3000,1000);
    createTimer(ninjaTime1, function(){
        if (ninja_3.visible()) {
            ninja_3.visible(false);
        } else {
            ninja_3.visible(true);
        }
    });

    var ninjaTime4 = random(3000,1000);
    createTimer(ninjaTime4, function(){
        if (ninja_4.visible()) {
            ninja_4.visible(false);
        } else {
            ninja_4.visible(true);
        }
    });

    var ninjaTime5 = random(3000,1000);
    createTimer(ninjaTime5, function(){
        if (ninja_5.visible()) {
            ninja_5.visible(false);
        } else {
            ninja_5.visible(true);
        }
    });

    }
