Update: CC - Demo New - Entity Loaded (tuby5lj4di.js) 371 bytes modified
parent
a33eda71cf
commit
1cdf99ecd6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue