Skip to content

Commit bdbf278

Browse files
author
Christian Wesselhoeft
committed
Fix jshint issues in src/gameobjects
1 parent 04d88b6 commit bdbf278

9 files changed

Lines changed: 57 additions & 57 deletions

File tree

src/gameobjects/BitmapData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Phaser.BitmapData = function (game, key, width, height) {
106106
*/
107107
this.dirty = false;
108108

109-
}
109+
};
110110

111111
Phaser.BitmapData.prototype = {
112112

src/gameobjects/BitmapText.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Phaser.BitmapText.prototype.preUpdate = function () {
177177

178178
return true;
179179

180-
}
180+
};
181181

182182
/**
183183
* Override and use this function in your own custom objects to handle any update requirements you may have.
@@ -186,7 +186,7 @@ Phaser.BitmapText.prototype.preUpdate = function () {
186186
*/
187187
Phaser.BitmapText.prototype.update = function() {
188188

189-
}
189+
};
190190

191191
/**
192192
* Automatically called by World.postUpdate.
@@ -201,7 +201,7 @@ Phaser.BitmapText.prototype.postUpdate = function () {
201201
this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y;
202202
}
203203

204-
}
204+
};
205205

206206
/**
207207
* Destroy this BitmapText instance. This will remove any filters and un-parent any children.
@@ -257,7 +257,7 @@ Phaser.BitmapText.prototype.destroy = function(destroyChildren) {
257257
this.mask = null;
258258
this.game = null;
259259

260-
}
260+
};
261261

262262
/**
263263
* @name Phaser.BitmapText#align

src/gameobjects/Button.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Phaser.Button.prototype.clearFrames = function () {
222222
this._onUpFrameName = null;
223223
this._onUpFrameID = null;
224224

225-
}
225+
};
226226

227227
/**
228228
* Used to manually set the frames that will be used for the different states of the Button.
@@ -349,7 +349,7 @@ Phaser.Button.prototype.setSounds = function (overSound, overMarker, downSound,
349349
this.setDownSound(downSound, downMarker);
350350
this.setUpSound(upSound, upMarker);
351351

352-
}
352+
};
353353

354354
/**
355355
* The Sound to be played when a Pointer moves over this Button.
@@ -373,7 +373,7 @@ Phaser.Button.prototype.setOverSound = function (sound, marker) {
373373
this.onOverSoundMarker = marker;
374374
}
375375

376-
}
376+
};
377377

378378
/**
379379
* The Sound to be played when a Pointer moves out of this Button.
@@ -397,7 +397,7 @@ Phaser.Button.prototype.setOutSound = function (sound, marker) {
397397
this.onOutSoundMarker = marker;
398398
}
399399

400-
}
400+
};
401401

402402
/**
403403
* The Sound to be played when a Pointer presses down on this Button.
@@ -421,7 +421,7 @@ Phaser.Button.prototype.setDownSound = function (sound, marker) {
421421
this.onDownSoundMarker = marker;
422422
}
423423

424-
}
424+
};
425425

426426
/**
427427
* The Sound to be played when a Pointer has pressed down and is released from this Button.
@@ -445,7 +445,7 @@ Phaser.Button.prototype.setUpSound = function (sound, marker) {
445445
this.onUpSoundMarker = marker;
446446
}
447447

448-
}
448+
};
449449

450450
/**
451451
* Internal function that handles input events.

src/gameobjects/Graphics.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Phaser.Graphics.prototype.preUpdate = function () {
112112

113113
return true;
114114

115-
}
115+
};
116116

117117
/**
118118
* Override and use this function in your own custom objects to handle any update requirements you may have.
@@ -122,7 +122,7 @@ Phaser.Graphics.prototype.preUpdate = function () {
122122
*/
123123
Phaser.Graphics.prototype.update = function() {
124124

125-
}
125+
};
126126

127127
/**
128128
* Automatically called by World.postUpdate.
@@ -137,7 +137,7 @@ Phaser.Graphics.prototype.postUpdate = function () {
137137
this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y;
138138
}
139139

140-
}
140+
};
141141

142142
/**
143143
* Destroy this Graphics instance.
@@ -185,7 +185,7 @@ Phaser.Graphics.prototype.destroy = function(destroyChildren) {
185185

186186
this.game = null;
187187

188-
}
188+
};
189189

190190
/*
191191
* Draws a {Phaser.Polygon} or a {PIXI.Polygon} filled
@@ -203,7 +203,7 @@ Phaser.Graphics.prototype.drawPolygon = function (poly) {
203203

204204
this.lineTo(poly.points[0].x, poly.points[0].y);
205205

206-
}
206+
};
207207

208208
/**
209209
* Indicates the rotation of the Graphics, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

src/gameobjects/Image.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Phaser.Image.prototype.preUpdate = function() {
164164

165165
return true;
166166

167-
}
167+
};
168168

169169
/**
170170
* Override and use this function in your own custom objects to handle any update requirements you may have.
@@ -174,7 +174,7 @@ Phaser.Image.prototype.preUpdate = function() {
174174
*/
175175
Phaser.Image.prototype.update = function() {
176176

177-
}
177+
};
178178

179179
/**
180180
* Internal function called by the World postUpdate cycle.
@@ -202,7 +202,7 @@ Phaser.Image.prototype.postUpdate = function() {
202202
this.children[i].postUpdate();
203203
}
204204

205-
}
205+
};
206206

207207
/**
208208
* Changes the Texture the Image is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.
@@ -279,7 +279,7 @@ Phaser.Image.prototype.loadTexture = function (key, frame) {
279279
}
280280
}
281281

282-
}
282+
};
283283

284284
/**
285285
* Crop allows you to crop the texture used to display this Image.
@@ -326,7 +326,7 @@ Phaser.Image.prototype.crop = function(rect) {
326326
}
327327
}
328328

329-
}
329+
};
330330

331331
/**
332332
* Brings a 'dead' Image back to life, optionally giving it the health value specified.
@@ -350,7 +350,7 @@ Phaser.Image.prototype.revive = function() {
350350

351351
return this;
352352

353-
}
353+
};
354354

355355
/**
356356
* Kills a Image. A killed Image has its alive, exists and visible properties all set to false.
@@ -375,7 +375,7 @@ Phaser.Image.prototype.kill = function() {
375375

376376
return this;
377377

378-
}
378+
};
379379

380380
/**
381381
* Destroys the Image. This removes it from its parent group, destroys the input, event and animation handlers if present
@@ -438,7 +438,7 @@ Phaser.Image.prototype.destroy = function(destroyChildren) {
438438
this.mask = null;
439439
this.game = null;
440440

441-
}
441+
};
442442

443443
/**
444444
* Resets the Image. This places the Image at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true.
@@ -461,7 +461,7 @@ Phaser.Image.prototype.reset = function(x, y) {
461461

462462
return this;
463463

464-
}
464+
};
465465

466466
/**
467467
* Brings the Image to the top of the display list it is a child of. Images that are members of a Phaser.Group are only
@@ -480,7 +480,7 @@ Phaser.Image.prototype.bringToTop = function() {
480480

481481
return this;
482482

483-
}
483+
};
484484

485485
/**
486486
* Indicates the rotation of the Image, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

src/gameobjects/RenderTexture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Phaser.RenderTexture.prototype.renderXY = function (displayObject, x, y, clear)
5858

5959
this.render(displayObject, this._temp, clear);
6060

61-
}
61+
};
6262

6363
// Documentation stubs
6464

src/gameobjects/RetroFont.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Phaser.RetroFont.prototype.setFixedWidth = function (width, lineAlignment) {
274274
this.fixedWidth = width;
275275
this.align = lineAlignment;
276276

277-
}
277+
};
278278

279279
/**
280280
* A helper function that quickly sets lots of variables at once, and then updates the text.
@@ -309,7 +309,7 @@ Phaser.RetroFont.prototype.setText = function (content, multiLine, characterSpac
309309
this.text = content;
310310
}
311311

312-
}
312+
};
313313

314314
/**
315315
* Over rides the default PIXI.RenderTexture resize event as we need our baseTexture resized as well.
@@ -335,7 +335,7 @@ Phaser.RetroFont.prototype.resize = function (width, height) {
335335

336336
var gl = this.renderer.gl;
337337
gl.bindTexture(gl.TEXTURE_2D, this.baseTexture._glTextures[gl.id]);
338-
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
338+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
339339
}
340340
else
341341
{
@@ -344,7 +344,7 @@ Phaser.RetroFont.prototype.resize = function (width, height) {
344344

345345
PIXI.Texture.frameUpdates.push(this);
346346

347-
}
347+
};
348348

349349
/**
350350
* Updates the BitmapData of the Sprite with the text
@@ -435,7 +435,7 @@ Phaser.RetroFont.prototype.buildRetroFontText = function () {
435435
this.pasteLine(this._text, cx, 0, this.customSpacingX);
436436
}
437437

438-
}
438+
};
439439

440440
/**
441441
* Internal function that takes a single line of text (2nd parameter) and pastes it into the BitmapData at the given coordinates.
@@ -477,7 +477,7 @@ Phaser.RetroFont.prototype.pasteLine = function (line, x, y, customSpacingX) {
477477
}
478478
}
479479
}
480-
}
480+
};
481481

482482
/**
483483
* Works out the longest line of text in _text and returns its length
@@ -504,7 +504,7 @@ Phaser.RetroFont.prototype.getLongestLine = function () {
504504
}
505505

506506
return longestLine;
507-
}
507+
};
508508

509509
/**
510510
* Internal helper function that removes all unsupported characters from the _text String, leaving only characters contained in the font set.
@@ -531,7 +531,7 @@ Phaser.RetroFont.prototype.removeUnsupportedCharacters = function (stripCR) {
531531
}
532532

533533
return newString;
534-
}
534+
};
535535

536536
/**
537537
* @name Phaser.BitmapText#text

0 commit comments

Comments
 (0)