Пример #1
0
 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();
 }
Пример #2
0
 public ObjectReference()
     : base()
 {
     Position = new Node();
     Object = "";
 }
Пример #3
0
        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;
            }
        }
Пример #4
0
 public Object()
 {
     ObjectMesh = new MeshReference();
     RoadEndpoints = new Node[0];
 }
Пример #5
0
 public Field()
 {
     Meshes = new MeshReference[0];
     Polygon = new Node[0];
 }
Пример #6
0
 public MovableMesh()
 {
     Mesh = "";
     Offset = new Node();
 }