33 public static void spawnMote(SectorEntityToken from) {
34 if (!from.isInCurrentLocation())
return;
35 float dur = 1f + 2f * (float) Math.random();
37 float size = 3f + (float) Math.random() * 5f;
39 Color color =
new Color(255,100,255,175);
41 Vector2f loc = Misc.getPointWithinRadius(from.getLocation(), from.getRadius());
42 Vector2f vel = Misc.getUnitVectorAtDegreeAngle((
float) Math.random() * 360f);
43 vel.scale(5f + (
float) Math.random() * 10f);
45 Vector2f.add(vel, from.getVelocity(), vel);
46 Misc.addGlowyParticle(from.getContainingLocation(), loc, vel, size, 0.5f, dur, color);