diff --git a/v3/src/input/keyboard/combo/KeyCombo.js b/v3/src/input/keyboard/combo/KeyCombo.js index d4192ddb1..3b71736b0 100644 --- a/v3/src/input/keyboard/combo/KeyCombo.js +++ b/v3/src/input/keyboard/combo/KeyCombo.js @@ -4,7 +4,7 @@ var ProcessKeyCombo = require('./ProcessKeyCombo'); var KeyComboMatchEvent = require('./KeyComboMatchEvent'); // Keys can be either: -// +// // A string (ATARI) // An array of either integers (key codes) or strings, or a mixture of both // An array of objects (such as Key objects) with a public 'keyCode' property @@ -123,4 +123,20 @@ KeyCombo.prototype = { }; +Object.defineProperties(KeyCombo.prototype, { + + progress: { + + enumerable: true, + + // How far complete is this combo? A value between 0 and 1. + get: function () + { + return this.index / this.size; + } + + } + +}); + module.exports = KeyCombo;