Skip to content

Conversation

Double-X
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant