2018-02-12 15:15:47 +01:00
|
|
|
if (!this.entityLoaded) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!this.initialized) {
|
|
|
|
|
2018-02-16 11:18:26 +01:00
|
|
|
this.currentImageIndex = 0;
|
2018-02-15 13:59:15 +01:00
|
|
|
|
2018-02-12 15:15:47 +01:00
|
|
|
this.initialized = true;
|
|
|
|
|
|
|
|
console.log('key up initialized');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (data.code === 'KeyL') {
|
2018-02-16 11:18:26 +01:00
|
|
|
|
|
|
|
if (this.currentImageIndex === this.images.length) {
|
|
|
|
this.currentImageIndex = 0;
|
|
|
|
};
|
2018-02-12 15:15:47 +01:00
|
|
|
|
2018-02-16 11:18:26 +01:00
|
|
|
var attributeData = this.generateAttributeData(this.currentImageIndex, 128, 128);
|
2018-02-12 15:15:47 +01:00
|
|
|
|
2018-02-16 11:18:26 +01:00
|
|
|
this.currentImageIndex++;
|
2018-02-12 15:15:47 +01:00
|
|
|
|
2018-02-16 11:18:26 +01:00
|
|
|
this.startAnimation(attributeData);
|
2018-02-12 15:15:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//@ sourceURL=ccKeyUp.js
|