add keyCode api to EventCustom

This commit is contained in:
knoxHuang
2018-01-17 15:57:50 +08:00
parent 441cbfc93f
commit 8a35363eaa
+15
View File
@@ -326,6 +326,21 @@ EventCustom.prototype.getUserData = function () {
EventCustom.prototype.getEventName = cc.Event.prototype.getType;
/**
* !#en
* The keyCode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key. </br>
* This is usually the decimal ASCII (RFC 20) or Windows 1252 code corresponding to the key.</br>
* If the key can't be identified, this value is 0.</br>
*
* !#zh
* keyCode 是只读属性它表示一个系统和依赖于实现的数字代码,可以识别按键的未修改值。</br>
* 这通常是十进制 ASCII (RFC20) 或者 Windows 1252 代码,所对应的密钥。</br>
* 如果无法识别该键,则该值为 0。
*
* @property keyCode
* @type {Number}
*/
var MAX_POOL_SIZE = 10;
var _eventPool = new JS.Pool(MAX_POOL_SIZE);
EventCustom.put = function (event) {