Initial Commit: Texture Flame Particle Process (dysneuk1ox.js)
parent
d0974bd7f3
commit
defcafb0da
|
@ -0,0 +1,46 @@
|
||||||
|
var texture = GameLib.EntityManager.Instance.findComponentById('gm3fvv45dl');
|
||||||
|
|
||||||
|
if (this.initialized) {
|
||||||
|
this.forward = true;
|
||||||
|
this.processNextLine = false;
|
||||||
|
texture.offset.x = 0;
|
||||||
|
texture.offset.y = 0;
|
||||||
|
texture.updateInstance();
|
||||||
|
this.initialized = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.forward) {
|
||||||
|
texture.offset.x += 0.1;
|
||||||
|
if (texture.offset.x === 1) {
|
||||||
|
if (texture.offset.y === 0.8) {
|
||||||
|
texture.offset.x = 0.9;
|
||||||
|
this.forward = false;
|
||||||
|
} else {
|
||||||
|
texture.offset.x = 0;
|
||||||
|
texture.offset.y = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
texture.offset.y += 0.2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.forward) {
|
||||||
|
texture.offset.x -= 0.1;
|
||||||
|
if (texture.offset.x < 0) {
|
||||||
|
if (texture.offset.y < 0) {
|
||||||
|
texture.offset.x = 0;
|
||||||
|
this.forward = true;
|
||||||
|
} else {
|
||||||
|
texture.offset.x = 0.9;
|
||||||
|
texture.offset.y = 0.8;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
texture.offset.y -= 0.2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texture.updateInstance();
|
||||||
|
|
||||||
|
return null;
|
||||||
|
//@ sourceURL=textureBeforeRender.js
|
Loading…
Reference in New Issue