public Car() { SteeringWheel = new RotatableMesh(); SteeringWheel.ZScale = -5; VelocityNeedle = new RotatableMesh(); RPMNeedle = new RotatableMesh(); GearRatio = new float[] { -1, 1 }; PrimaryColors = new Color4[] { Color4.White}; CurrentGear = 1; FrontWheel = new Node(); RearWheel = new Node(); }
public ObjectReference() : base() { Position = new Node(); Object = ""; }
private void MapNodes(Node[] points, string basePath, string arrayPath) { string path; Vector3 prevNode = new Vector3(); for (int j = 0; j < points.Length; j++) { path = basePath + arrayPath + j; Vector3 n = points[j].Location; UpdateNode(n, path); if (j > 0) { path = basePath + (j - 1) + "-" + j; if (!MapObjects.Keys.Contains(path)) { Line l = new Line(); l.StrokeThickness = Thickness; l.Stroke = Brushes.DarkGray; map.Children.Add(l); MapObjects.Add(path, l); } ((Line)MapObjects[path]).X1 = prevNode.X * PixelScale; ((Line)MapObjects[path]).Y1 = prevNode.Z * PixelScale; ((Line)MapObjects[path]).X2 = n.X * PixelScale; ((Line)MapObjects[path]).Y2 = n.Z * PixelScale; Canvas.SetZIndex(((Line)MapObjects[path]), -1); } prevNode = n; } }
public Object() { ObjectMesh = new MeshReference(); RoadEndpoints = new Node[0]; }
public Field() { Meshes = new MeshReference[0]; Polygon = new Node[0]; }
public MovableMesh() { Mesh = ""; Offset = new Node(); }