/**
This lesson combines some of the more complex functions ninjas have learned so far
like pointToCursor(),rotation() and moveForwardByRotation(). 
They will also create and manipulate object properties.
 */

//********************Star Object - Update Every Frame******************//
if($this.thrown && $this.x() > 0 && $this.y() > 0 && $this.x() < 800 && $this.y() < 600  ){
    $this.moveForwardByRotation();
}else{
    $this.thrown = false;
    $this.x(454);
    $this.y(462);
}

//*********************Background Object - Mouse Click Event************//
if(!star.thrown){
    star.pointToCursor();
    star.rotation(star.rotation() -90);
    star.thrown=true;
    
}