public void Draw(LineBatch3D lineBatch, PointBatch3D pointBatch) { if (Alive) { lineBatch.Draw(Position, Position - Velocity * 2.0f, 10.0f, lineColor); pointBatch.Draw(Position - Velocity / 2, 5.0f, lightColor); } }
protected override void Initialize() { for (int i = 0; i < StartingLinesCount; i++) { AddNewLine(); } this.lineBatch = this.RenderManager.FindLayer(WaveContent.RenderLayers.Debug).LineBatch3D; }
protected override void Initialize() { base.Initialize(); this.lineBatch = this.RenderManager.FindLayer(DefaultLayers.Opaque).LineBatch3D; this.lines = new List <Line>(); this.line = new Line(); float maxLinesOverTwo = MAXLINES / 2; // X Axis for (int x = 0; x <= MAXLINES; x++) { // Start this.line.StartPoint.X = -maxLinesOverTwo + x; this.line.StartPoint.Y = 0; this.line.StartPoint.Z = -maxLinesOverTwo; // End this.line.EndPoint.X = -maxLinesOverTwo + x; this.line.EndPoint.Y = 0; this.line.EndPoint.Z = maxLinesOverTwo; this.line.Color = (x == maxLinesOverTwo) ? Color.Blue : Color.DarkGray; this.lines.Add(this.line); } // Z Axis for (int z = 0; z <= MAXLINES; z++) { // Start this.line.StartPoint.X = -maxLinesOverTwo; this.line.StartPoint.Y = 0; this.line.StartPoint.Z = -maxLinesOverTwo + z; // End this.line.EndPoint.X = maxLinesOverTwo; this.line.EndPoint.Y = 0; this.line.EndPoint.Z = -maxLinesOverTwo + z; this.line.Color = (z == maxLinesOverTwo) ? Color.Red : Color.DarkGray; this.lines.Add(this.line); } }
/// <summary> /// Initialize this instance. /// </summary> protected override void Initialize() { base.Initialize(); this.leapService = WaveServices.GetService <LeapMotionService>(); if (this.leapService == null) { Console.WriteLine("You need to register the LeapMotion service."); } if (!this.leapService.IsReady) { Console.WriteLine("You need to call to start method before."); } this.lineBatch = this.RenderManager.FindLayer(DefaultLayers.Opaque).LineBatch3D; }
protected override void Initialize() { base.Initialize(); this.lineBatch = this.RenderManager.FindLayer(DefaultLayers.Opaque).LineBatch3D; }