Open Double-X opened 4 years ago
Added this._isReleased = {}; in Input.clear
Added the following in Input.update: else if (this._previousState[name] && !this._currentState[name]) { this._isReleased[name] = true; } else { this._isReleased[name] = false; } Right after: if (this._currentState[name] && !this._previousState[name]) { this._latestButton = name; this._pressedTime = 0; this._date = Date.now(); }
Added Input.isReleased
Added this._isReleased = {}; in Input.clear
Added the following in Input.update: else if (this._previousState[name] && !this._currentState[name]) { this._isReleased[name] = true; } else { this._isReleased[name] = false; } Right after: if (this._currentState[name] && !this._previousState[name]) { this._latestButton = name; this._pressedTime = 0; this._date = Date.now(); }
Added Input.isReleased