Ejemplo n.º 1
0
        public override void Draw()
        {
            base.Rotation = Building_Door.DoorRotationAt(base.Position, base.Map);
            float num = Mathf.Clamp01((float)this.visualTicksOpen / (float)this.VisualTicksToOpen);
            float d   = (float)(0.44999998807907104 * num);

            for (int i = 0; i < 2; i++)
            {
                Vector3 vector = default(Vector3);
                Mesh    mesh;
                if (i == 0)
                {
                    vector = new Vector3(0f, 0f, -1f);
                    mesh   = MeshPool.plane10;
                }
                else
                {
                    vector = new Vector3(0f, 0f, 1f);
                    mesh   = MeshPool.plane10Flip;
                }
                Rot4 rotation = base.Rotation;
                rotation.Rotate(RotationDirection.Clockwise);
                vector = rotation.AsQuat * vector;
                Vector3 vector2 = this.DrawPos;
                vector2.y = Altitudes.AltitudeFor(AltitudeLayer.DoorMoveable);
                vector2  += vector * d;
                Graphics.DrawMesh(mesh, vector2, base.Rotation.AsQuat, this.Graphic.MatAt(base.Rotation, null), 0);
            }
            base.Comps_PostDraw();
        }
Ejemplo n.º 2
0
 public override void Draw()
 {
     base.Rotation = Building_Door.DoorRotationAt(base.Position, base.Map);
     base.Draw();
 }