Skip to content

Commit 8d92675

Browse files
committed
Fixed lint issues in Gamepad and GamepadManager.
1 parent 786d206 commit 8d92675

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

src/input/gamepad/Gamepad.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var EventEmitter = require('eventemitter3');
1212
/**
1313
* @classdesc
1414
* A single Gamepad.
15-
*
15+
*
1616
* These are created, updated and managed by the Gamepad Manager.
1717
*
1818
* @class Gamepad
@@ -54,13 +54,13 @@ var Gamepad = new Class({
5454

5555
/**
5656
* A string containing some information about the controller.
57-
*
57+
*
5858
* This is not strictly specified, but in Firefox it will contain three pieces of information
5959
* separated by dashes (-): two 4-digit hexadecimal strings containing the USB vendor and
6060
* product id of the controller, and the name of the controller as provided by the driver.
6161
* In Chrome it will contain the name of the controller as provided by the driver,
6262
* followed by vendor and product 4-digit hexadecimal strings.
63-
*
63+
*
6464
* @name Phaser.Input.Gamepad.Gamepad#id
6565
* @type {string}
6666
* @since 3.0.0
@@ -142,7 +142,7 @@ var Gamepad = new Class({
142142
* @private
143143
* @since 3.10.0
144144
*/
145-
this._LCRight = (buttons[15]) ? buttons[15] : _noButton;;
145+
this._LCRight = (buttons[15]) ? buttons[15] : _noButton;
146146

147147
/**
148148
* A reference to the Top Button in the Left Cluster.
@@ -152,7 +152,7 @@ var Gamepad = new Class({
152152
* @private
153153
* @since 3.10.0
154154
*/
155-
this._LCTop = (buttons[12]) ? buttons[12] : _noButton;;
155+
this._LCTop = (buttons[12]) ? buttons[12] : _noButton;
156156

157157
/**
158158
* A reference to the Bottom Button in the Left Cluster.
@@ -162,7 +162,7 @@ var Gamepad = new Class({
162162
* @private
163163
* @since 3.10.0
164164
*/
165-
this._LCBottom = (buttons[13]) ? buttons[13] : _noButton;;
165+
this._LCBottom = (buttons[13]) ? buttons[13] : _noButton;
166166

167167
/**
168168
* A reference to the Left Button in the Right Cluster.
@@ -172,7 +172,7 @@ var Gamepad = new Class({
172172
* @private
173173
* @since 3.10.0
174174
*/
175-
this._RCLeft = (buttons[2]) ? buttons[2] : _noButton;;
175+
this._RCLeft = (buttons[2]) ? buttons[2] : _noButton;
176176

177177
/**
178178
* A reference to the Right Button in the Right Cluster.
@@ -182,7 +182,7 @@ var Gamepad = new Class({
182182
* @private
183183
* @since 3.10.0
184184
*/
185-
this._RCRight = (buttons[1]) ? buttons[1] : _noButton;;
185+
this._RCRight = (buttons[1]) ? buttons[1] : _noButton;
186186

187187
/**
188188
* A reference to the Top Button in the Right Cluster.
@@ -192,7 +192,7 @@ var Gamepad = new Class({
192192
* @private
193193
* @since 3.10.0
194194
*/
195-
this._RCTop = (buttons[3]) ? buttons[3] : _noButton;;
195+
this._RCTop = (buttons[3]) ? buttons[3] : _noButton;
196196

197197
/**
198198
* A reference to the Bottom Button in the Right Cluster.
@@ -202,7 +202,7 @@ var Gamepad = new Class({
202202
* @private
203203
* @since 3.10.0
204204
*/
205-
this._RCBottom = (buttons[0]) ? buttons[0] : _noButton;;
205+
this._RCBottom = (buttons[0]) ? buttons[0] : _noButton;
206206

207207
/**
208208
* A reference to the Top Left Front Button (L1 Shoulder Button)
@@ -212,7 +212,7 @@ var Gamepad = new Class({
212212
* @private
213213
* @since 3.10.0
214214
*/
215-
this._FBLeftTop = (buttons[4]) ? buttons[4] : _noButton;;
215+
this._FBLeftTop = (buttons[4]) ? buttons[4] : _noButton;
216216

217217
/**
218218
* A reference to the Bottom Left Front Button (L2 Shoulder Button)
@@ -222,7 +222,7 @@ var Gamepad = new Class({
222222
* @private
223223
* @since 3.10.0
224224
*/
225-
this._FBLeftBottom = (buttons[6]) ? buttons[6] : _noButton;;
225+
this._FBLeftBottom = (buttons[6]) ? buttons[6] : _noButton;
226226

227227
/**
228228
* A reference to the Top Right Front Button (R1 Shoulder Button)
@@ -232,7 +232,7 @@ var Gamepad = new Class({
232232
* @private
233233
* @since 3.10.0
234234
*/
235-
this._FBRightTop = (buttons[5]) ? buttons[5] : _noButton;;
235+
this._FBRightTop = (buttons[5]) ? buttons[5] : _noButton;
236236

237237
/**
238238
* A reference to the Bottom Right Front Button (R2 Shoulder Button)
@@ -242,7 +242,7 @@ var Gamepad = new Class({
242242
* @private
243243
* @since 3.10.0
244244
*/
245-
this._FBRightBottom = (buttons[7]) ? buttons[7] : _noButton;;
245+
this._FBRightBottom = (buttons[7]) ? buttons[7] : _noButton;
246246

247247
var _noAxis = { value: 0 };
248248

@@ -290,7 +290,7 @@ var Gamepad = new Class({
290290
/**
291291
* Gets the value of a button based on the given index.
292292
* The index must be valid within the range of buttons supported by this Gamepad.
293-
*
293+
*
294294
* The return value will be either 0 or 1 for an analogue button, or a float between 0 and 1
295295
* for a pressure-sensitive digital button, such as the shoulder buttons on a Dual Shock.
296296
*

src/input/gamepad/GamepadManager.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ var Gamepad = require('./Gamepad');
2323
/**
2424
* @classdesc
2525
* The Gamepad Manager is a helper class that belongs to the Input Manager.
26-
*
26+
*
2727
* Its role is to listen for native DOM Gamepad Events and then process them.
28-
*
28+
*
2929
* You do not need to create this class directly, the Input Manager will create an instance of it automatically.
30-
*
30+
*
3131
* You can access it from within a Scene using `this.input.gamepad`. For example, you can do:
3232
*
3333
* ```javascript
@@ -227,7 +227,7 @@ var GamepadManager = new Class({
227227

228228
/**
229229
* Refreshes the list of connected Gamepads.
230-
*
230+
*
231231
* This is called automatically when a gamepad is connected or disconnected,
232232
* and during the update loop.
233233
*
@@ -264,7 +264,7 @@ var GamepadManager = new Class({
264264
if (!currentPad)
265265
{
266266
// A new Gamepad, not currently stored locally
267-
var newPad = new Gamepad(this, livePad);
267+
var newPad = new Gamepad(this, livePad);
268268

269269
currentPads[index] = newPad;
270270

@@ -350,7 +350,7 @@ var GamepadManager = new Class({
350350

351351
/**
352352
* The internal update loop. Refreshes all connected gamepads and processes their events.
353-
*
353+
*
354354
* Called automatically by the Input Manager, invoked from the Game step.
355355
*
356356
* @method Phaser.Input.Gamepad.GamepadManager#update
@@ -447,7 +447,7 @@ var GamepadManager = new Class({
447447

448448
/**
449449
* A reference to the first connected Gamepad.
450-
*
450+
*
451451
* This will be undefined if either no pads are connected, or the browser
452452
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
453453
* is plugged in, but hasn't yet had any buttons pressed on it.
@@ -467,7 +467,7 @@ var GamepadManager = new Class({
467467

468468
/**
469469
* A reference to the second connected Gamepad.
470-
*
470+
*
471471
* This will be undefined if either no pads are connected, or the browser
472472
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
473473
* is plugged in, but hasn't yet had any buttons pressed on it.
@@ -487,7 +487,7 @@ var GamepadManager = new Class({
487487

488488
/**
489489
* A reference to the third connected Gamepad.
490-
*
490+
*
491491
* This will be undefined if either no pads are connected, or the browser
492492
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
493493
* is plugged in, but hasn't yet had any buttons pressed on it.
@@ -507,7 +507,7 @@ var GamepadManager = new Class({
507507

508508
/**
509509
* A reference to the fourth connected Gamepad.
510-
*
510+
*
511511
* This will be undefined if either no pads are connected, or the browser
512512
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
513513
* is plugged in, but hasn't yet had any buttons pressed on it.

0 commit comments

Comments
 (0)