@Override public void play(Animation anim) { //Shouldn't interrupt the dieing animation if (curAnim == null || curAnim != die) { super.play(anim); } }
public synchronized void play( Animation anim, boolean force ) { if (!force && (curAnim != null) && (curAnim == anim) && (curAnim.looped || !finished)) { return; } curAnim = anim; curFrame = 0; finished = false; frameTimer = 0; if (anim != null) { frame( anim.frames[curFrame] ); } }
@Override public void kill() { super.kill(); if (emitter != null) emitter.killAndErase(); emitter = null; }
@Override public void revive() { super.revive(); speed.set( 0 ); acc.set( 0 ); dropInterval = 0; heap = null; }
@Override public void update() { super.update(); if (!paused) { updateAnimation(); } }
@Override protected void updateMatrix() { super.updateMatrix(); Matrix.copy(matrix, shadowMatrix); Matrix.translate(shadowMatrix, (width() * (1f - shadowWidth)) / 2f, (height() * (1f - shadowHeight)) + shadowOffset); Matrix.scale(shadowMatrix, shadowWidth, shadowHeight); }
@Override public void draw() { if (texture == null || (!dirty && buffer == null)) return; if (renderShadow) { if (dirty) { verticesBuffer.position(0); verticesBuffer.put(vertices); if (buffer == null) buffer = new Vertexbuffer(verticesBuffer); else buffer.updateVertices(verticesBuffer); dirty = false; } NoosaScript script = script(); texture.bind(); script.camera(camera()); updateMatrix(); script.uModel.valueM4(shadowMatrix); script.lighting( 0, 0, 0, am * .6f, 0, 0, 0, aa * .6f); script.drawQuad(buffer); } super.draw(); }
@Override public void resetColor() { super.resetColor(); if (invisible != null){ alpha(0.4f); } }
@Override public void revive() { super.revive(); speed.set( 0 ); acc.set( 0 ); dropInterval = 0; heap = null; if (emitter != null) { emitter.killAndErase(); emitter = null; } }
@Override public void update() { super.update(); if (!paused) { updateAnimation(); } }
@Override protected void updateMatrix() { super.updateMatrix(); Matrix.copy(matrix, shadowMatrix); Matrix.translate(shadowMatrix, (width() * (1f - shadowWidth)) / 2f, (height() * (1f - shadowHeight)) + shadowOffset); Matrix.scale(shadowMatrix, shadowWidth, shadowHeight); }
@Override public void draw() { if (texture == null || (!dirty && buffer == null)) return; if (renderShadow) { if (dirty) { verticesBuffer.position(0); verticesBuffer.put(vertices); if (buffer == null) buffer = new Vertexbuffer(verticesBuffer); else buffer.updateVertices(verticesBuffer); dirty = false; } NoosaScript script = script(); texture.bind(); script.camera(camera()); updateMatrix(); script.uModel.valueM4(shadowMatrix); script.lighting( 0, 0, 0, am * .6f, 0, 0, 0, aa * .6f); script.drawQuad(buffer); } super.draw(); }
@Override public void resetColor() { super.resetColor(); if (invisible != null){ alpha(0.4f); } }
@Override public void play(Animation anim) { //Shouldn't interrupt the dieing animation if (curAnim == null || curAnim != die) { super.play(anim); } }
public synchronized void play( Animation anim, boolean force ) { if (!force && (curAnim != null) && (curAnim == anim) && (curAnim.looped || !finished)) { return; } curAnim = anim; curFrame = 0; finished = false; frameTimer = 0; if (anim != null) { frame( anim.frames[curFrame] ); } }
@Override public void update() { super.update();
@Override public void kill() { super.kill(); if (emo != null) { emo.killAndErase(); emo = null; } }
@Override public void revive() { super.revive(); speed.set( 0 ); acc.set( 0 ); dropInterval = 0; heap = null; if (emitter != null) { emitter.killAndErase(); emitter = null; } }