//========================== class Missile extends Entity{ float tx,ty,tz; int damage, splash; float vx,vy,vz, speed = 6f; float[][] trail; Missile(float x, float y, float z, Enemy target, int damage, int splash){ this.x = x; this.y = y; this.z = z; tx = target.x; ty = target.y; tz = target.z; vx = tx-x; vy = ty-y; vz = tz-z; float factor = speed/mag(vx,vy,vz); vx *= factor; vy *= factor; vz *= factor; this.damage = damage; this.splash = splash; trail = new float[5][3]; for(int i=0;idelay && ((timer-delay) % frequency)==0 && amount>0 ) spawnEnemies(); } //--------------- void visualize(){ stroke(255, 64); noFill(); if(isVisible) for(int i=0;i