protected void DrawNPC(System.Drawing.Graphics graphics, Common.Motion.NPC npc, Color color) { throw new NotImplementedException(); //DrawUnit(graphics, npc, color); //float zoom = 50f; //var circleWorldPos = npc.DebugCirclePosition * zoom + npc.Position; //var circleScreenPos = WorldToScreen(circleWorldPos); //var whiteLinePos = WorldToScreen(npc.DebugWhiteLine * zoom + circleWorldPos); //graphics.DrawEllipse(Pens.White, circleScreenPos.X - 1 * zoom, circleScreenPos.Y - 1 * zoom, 2 * zoom, 2 * zoom); //graphics.DrawLine(Pens.White, new Point((int)circleScreenPos.X, (int)circleScreenPos.Y), new Point((int)whiteLinePos.X, (int)whiteLinePos.Y)); }
private MotionEntity CreateNPC(Vector2 position) { var unit = CreateUnit(position); var npc = new Common.Motion.NPC() { LocalBounding = unit.MotionObject.LocalBounding, Position = unit.MotionObject.Position, RunSpeed = 1.0f, SteeringEnabled = true }; unit.MotionObject = npc; npcs.Add(npc); return(unit); }
private MotionEntity CreateNPC(Vector2 position) { var unit = CreateUnit(position); var npc = new Common.Motion.NPC() { LocalBounding = unit.MotionObject.LocalBounding, Position = unit.MotionObject.Position, RunSpeed = 1.0f, SteeringEnabled = true }; unit.MotionObject = npc; npcs.Add(npc); return unit; }