Update: CC - Demo New - Entity Loaded (tuby5lj4di.js) 371 bytes modified

beta.r3js.org
-=yb4f310 2018-02-16 12:26:43 +01:00
parent a33eda71cf
commit 1cdf99ecd6
1 changed files with 18 additions and 0 deletions

View File

@ -53,6 +53,8 @@ this.keyUp = GameLib.EntityManager.Instance.findComponentById('ip0443a52d');
*/
this.attributeData = null;
this.updateInformation = [];
this.currentIndex = 0;
this.maxIndex = this.images.length - 1;
/**
* Attributes
@ -194,6 +196,22 @@ GameLib.CustomCode.prototype.updateAttributeArrays = function(alpha) {
console.log('animation : ' + alpha);
}.bind(this);
/**
* Load the next animation
*/
GameLib.CustomCode.prototype.loadNext = function() {
this.currentIndex++
if (this.currentIndex > this.maxIndex) {
this.currentIndex = 0;
};
var attributeData = this.generateAttributeData(this.currentIndex, 128, 128);
this.startAnimation(attributeData);
}
this.buildInstancedGeometry(0);
this.beforeRender.entityLoaded = this;