Fixed lint issues in Gamepad and GamepadManager.

This commit is contained in:
Chris Andrew 2018-06-07 16:04:27 +01:00
parent 786d2068a3
commit 8d926754cb
2 changed files with 25 additions and 25 deletions

View file

@ -12,7 +12,7 @@ var EventEmitter = require('eventemitter3');
/**
* @classdesc
* A single Gamepad.
*
*
* These are created, updated and managed by the Gamepad Manager.
*
* @class Gamepad
@ -54,13 +54,13 @@ var Gamepad = new Class({
/**
* A string containing some information about the controller.
*
*
* This is not strictly specified, but in Firefox it will contain three pieces of information
* separated by dashes (-): two 4-digit hexadecimal strings containing the USB vendor and
* product id of the controller, and the name of the controller as provided by the driver.
* In Chrome it will contain the name of the controller as provided by the driver,
* followed by vendor and product 4-digit hexadecimal strings.
*
*
* @name Phaser.Input.Gamepad.Gamepad#id
* @type {string}
* @since 3.0.0
@ -142,7 +142,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._LCRight = (buttons[15]) ? buttons[15] : _noButton;;
this._LCRight = (buttons[15]) ? buttons[15] : _noButton;
/**
* A reference to the Top Button in the Left Cluster.
@ -152,7 +152,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._LCTop = (buttons[12]) ? buttons[12] : _noButton;;
this._LCTop = (buttons[12]) ? buttons[12] : _noButton;
/**
* A reference to the Bottom Button in the Left Cluster.
@ -162,7 +162,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._LCBottom = (buttons[13]) ? buttons[13] : _noButton;;
this._LCBottom = (buttons[13]) ? buttons[13] : _noButton;
/**
* A reference to the Left Button in the Right Cluster.
@ -172,7 +172,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._RCLeft = (buttons[2]) ? buttons[2] : _noButton;;
this._RCLeft = (buttons[2]) ? buttons[2] : _noButton;
/**
* A reference to the Right Button in the Right Cluster.
@ -182,7 +182,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._RCRight = (buttons[1]) ? buttons[1] : _noButton;;
this._RCRight = (buttons[1]) ? buttons[1] : _noButton;
/**
* A reference to the Top Button in the Right Cluster.
@ -192,7 +192,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._RCTop = (buttons[3]) ? buttons[3] : _noButton;;
this._RCTop = (buttons[3]) ? buttons[3] : _noButton;
/**
* A reference to the Bottom Button in the Right Cluster.
@ -202,7 +202,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._RCBottom = (buttons[0]) ? buttons[0] : _noButton;;
this._RCBottom = (buttons[0]) ? buttons[0] : _noButton;
/**
* A reference to the Top Left Front Button (L1 Shoulder Button)
@ -212,7 +212,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._FBLeftTop = (buttons[4]) ? buttons[4] : _noButton;;
this._FBLeftTop = (buttons[4]) ? buttons[4] : _noButton;
/**
* A reference to the Bottom Left Front Button (L2 Shoulder Button)
@ -222,7 +222,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._FBLeftBottom = (buttons[6]) ? buttons[6] : _noButton;;
this._FBLeftBottom = (buttons[6]) ? buttons[6] : _noButton;
/**
* A reference to the Top Right Front Button (R1 Shoulder Button)
@ -232,7 +232,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._FBRightTop = (buttons[5]) ? buttons[5] : _noButton;;
this._FBRightTop = (buttons[5]) ? buttons[5] : _noButton;
/**
* A reference to the Bottom Right Front Button (R2 Shoulder Button)
@ -242,7 +242,7 @@ var Gamepad = new Class({
* @private
* @since 3.10.0
*/
this._FBRightBottom = (buttons[7]) ? buttons[7] : _noButton;;
this._FBRightBottom = (buttons[7]) ? buttons[7] : _noButton;
var _noAxis = { value: 0 };
@ -290,7 +290,7 @@ var Gamepad = new Class({
/**
* Gets the value of a button based on the given index.
* The index must be valid within the range of buttons supported by this Gamepad.
*
*
* The return value will be either 0 or 1 for an analogue button, or a float between 0 and 1
* for a pressure-sensitive digital button, such as the shoulder buttons on a Dual Shock.
*

View file

@ -23,11 +23,11 @@ var Gamepad = require('./Gamepad');
/**
* @classdesc
* The Gamepad Manager is a helper class that belongs to the Input Manager.
*
*
* Its role is to listen for native DOM Gamepad Events and then process them.
*
*
* You do not need to create this class directly, the Input Manager will create an instance of it automatically.
*
*
* You can access it from within a Scene using `this.input.gamepad`. For example, you can do:
*
* ```javascript
@ -227,7 +227,7 @@ var GamepadManager = new Class({
/**
* Refreshes the list of connected Gamepads.
*
*
* This is called automatically when a gamepad is connected or disconnected,
* and during the update loop.
*
@ -264,7 +264,7 @@ var GamepadManager = new Class({
if (!currentPad)
{
// A new Gamepad, not currently stored locally
var newPad = new Gamepad(this, livePad);
var newPad = new Gamepad(this, livePad);
currentPads[index] = newPad;
@ -350,7 +350,7 @@ var GamepadManager = new Class({
/**
* The internal update loop. Refreshes all connected gamepads and processes their events.
*
*
* Called automatically by the Input Manager, invoked from the Game step.
*
* @method Phaser.Input.Gamepad.GamepadManager#update
@ -447,7 +447,7 @@ var GamepadManager = new Class({
/**
* A reference to the first connected Gamepad.
*
*
* This will be undefined if either no pads are connected, or the browser
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
* is plugged in, but hasn't yet had any buttons pressed on it.
@ -467,7 +467,7 @@ var GamepadManager = new Class({
/**
* A reference to the second connected Gamepad.
*
*
* This will be undefined if either no pads are connected, or the browser
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
* is plugged in, but hasn't yet had any buttons pressed on it.
@ -487,7 +487,7 @@ var GamepadManager = new Class({
/**
* A reference to the third connected Gamepad.
*
*
* This will be undefined if either no pads are connected, or the browser
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
* is plugged in, but hasn't yet had any buttons pressed on it.
@ -507,7 +507,7 @@ var GamepadManager = new Class({
/**
* A reference to the fourth connected Gamepad.
*
*
* This will be undefined if either no pads are connected, or the browser
* has not yet issued a gamepadconnect, which can happen even if a Gamepad
* is plugged in, but hasn't yet had any buttons pressed on it.