public override void Draw(ICamera camera, CommandBuffer commands, SystemLighting lights, NebulaRenderer nr) { for (int i = 0; i < renderCount; i++) { var p = toRender[i]; if (p.Data.Munition.ConstEffect_Spear != null) { beams.AddBeamSpear(p.Position, p.Normal.Normalized(), p.Data.Munition.ConstEffect_Spear); } if (p.Data.Munition.ConstEffect_Bolt != null) { beams.AddBeamBolt(p.Position, p.Normal.Normalized(), p.Data.Munition.ConstEffect_Bolt); } } }
public override void Draw(ICamera camera, CommandBuffer commands, SystemLighting lights, NebulaRenderer nr) { for (int i = 0; i < renderCount; i++) { var p = toRender[i]; var currDist = (p.Position - p.Start).Length(); if (p.Data.Munition.ConstEffect_Spear != null) { beams.AddBeamSpear(p.Position, p.Normal.Normalized(), p.Data.Munition.ConstEffect_Spear, currDist); } if (p.Data.Munition.ConstEffect_Bolt != null) { beams.AddBeamBolt(p.Position, p.Normal.Normalized(), p.Data.Munition.ConstEffect_Bolt, currDist); } if (p.Effect != null) { p.Effect.Draw(Matrix4x4.CreateTranslation(p.Position), 0); } } }