I am trying to end a game but couldn’t how can i end it with a loss when one gets to -10000 and a win when one gets to 10000?
the following code is an example of how i was doing it…
if(this.hitTest(this._parent.bug2)) {
this._parent.total=this._parent.total-30;
}
}
if(this.hitTest(this._parent.bug1)) {
this._parent.total=this._parent.total+250;
}
if(this.hitTest(this._parent.bug3)) {
this._parent.total=this._parent.total-40;
}
// now i want the game to end
//a win=10000 points
//a loss=-10000 points
//how can i present this
}