package TextTagEntity import Entity import public Colors public class TextTagEntity extends Entity FText ftext real dur colorA col construct(vec3 pos, vec3 vel, string text, real size, real duration, colorA col ) super(DUMMY_PLAYER, pos, 0) sleeps = false this.dur = duration this.vel = vel this.col = col ftext = createFText(pos, text, size, duration, ZERO2, col) override function update() vel.z += gravity pos += vel * speedFactor ftext.tt.setPos(pos) ftext.tt.setColor(col) dur -= ANIMATION_PERIOD if dur <= 0 terminate()