public override void Update(TimeSpan elapsed, Vector3 position, Matrix4 transform) { if (sysr == null) { return; } World = transform; if (Spin != Vector3.Zero) { spinX += elapsed.TotalSeconds * Spin.X; if (spinX > (2 * Math.PI)) { spinX -= 2 * Math.PI; } spinY += elapsed.TotalSeconds * Spin.Y; if (spinY > (2 * Math.PI)) { spinY -= 2 * Math.PI; } spinZ += elapsed.TotalSeconds * Spin.Z; if (spinZ > (2 * Math.PI)) { spinZ -= 2 * Math.PI; } } if (Nebula == null || pos != position && sysr != null) { pos = position; Nebula = sysr.ObjectInNebula(position); } }
public override void Update(TimeSpan elapsed, Vector3 position, Matrix4 transform) { if (sysr == null) { return; } World = transform; if (Nebula == null || pos != position && sysr != null) { pos = position; Nebula = sysr.ObjectInNebula(position); } }