| 1234567891011121314 |
- //bucket - Update Every Frame
- // if the bucket's powerup equals "frozen"
- // OR if the timer equals null
- if ( $this.powerup == "frozen" || $this.timer === null ) {
- //change the color of the bucket to blue
- $this.fill("#0000FF");
- $this.timer = createTimer(2000, function() {
- // after 2 seconds, powerup is null
- $this.powerup = null;
- }, false );
- } else if ( $this.powerup === null) {
- //change bucket color back to grey
- $this.fill("#BBBBBB");
- }
|