public override void Execute(ref WooState state) { if (state._Objects > 0) { state._Objects--; Vector3 val = new Vector3(0.0, 0.5, 0.0); val.y *= state._Scale.y; val.Mul(state._Rotation); Vector3 pos = new Vector3(state._Position.x + val.x, state._Position.y + val.y, state._Position.z + val.z); SphereLight newLight = new SphereLight(state._Diff, pos, (float)(state._Scale.y * 0.5), 2); newLight.CreateElement(state._Parent, pos); } }
public void Add(SphereLight sphereLight) { SurfaceLights.Add(sphereLight); Add((Intersectable)sphereLight); }