Exemplo n.º 1
0
        public override void Draw()
        {
            Mesh mesh = MeshPool.GridPlane(this.def.graphicData.drawSize);

            Graphics.DrawMesh(mesh, this.DrawPos, this.ExactRotation, this.def.DrawMatSingle, 0);
            base.Comps_PostDraw();
        }
Exemplo n.º 2
0
        public virtual Mesh MeshAt(Rot4 rot)
        {
            Mesh result;

            if (this.ShouldDrawRotated)
            {
                result = MeshPool.GridPlane(this.drawSize);
            }
            else
            {
                Vector2 vector = this.drawSize;
                if (rot.IsHorizontal)
                {
                    vector = vector.Rotated();
                }
                if (rot == Rot4.West && this.WestFlipped)
                {
                    result = MeshPool.GridPlaneFlip(vector);
                }
                else
                {
                    result = MeshPool.GridPlane(vector);
                }
            }
            return(result);
        }
Exemplo n.º 3
0
        public override void Draw()
        {
            float   num      = ArcHeightFactor * GenMath.InverseParabola(DistanceCoveredFraction);
            Vector3 drawPos  = DrawPos;
            Vector3 position = drawPos + new Vector3(0f, 0f, 1f) * num;

            if (def.projectile.shadowSize > 0f)
            {
                DrawShadow(drawPos, num);
            }
            Graphics.DrawMesh(MeshPool.GridPlane(def.graphicData.drawSize), position, ExactRotation, def.DrawMatSingle, 0);
            Comps_PostDraw();
        }
Exemplo n.º 4
0
        public virtual Mesh MeshAt(Rot4 rot)
        {
            Vector2 vector = drawSize;

            if (rot.IsHorizontal && !ShouldDrawRotated)
            {
                vector = vector.Rotated();
            }
            if ((rot == Rot4.West && WestFlipped) || (rot == Rot4.East && EastFlipped))
            {
                return(MeshPool.GridPlaneFlip(vector));
            }
            return(MeshPool.GridPlane(vector));
        }
Exemplo n.º 5
0
        public virtual Mesh MeshAt(Rot4 rot)
        {
            if (this.ShouldDrawRotated)
            {
                return(MeshPool.GridPlane(this.drawSize));
            }
            Vector2 vector = this.drawSize;

            if (rot.IsHorizontal)
            {
                vector = vector.Rotated();
            }
            if (rot == Rot4.West && (this.data == null || this.data.allowFlip))
            {
                return(MeshPool.GridPlaneFlip(vector));
            }
            return(MeshPool.GridPlane(vector));
        }
Exemplo n.º 6
0
 public override void Draw()
 {
     Graphics.DrawMesh(MeshPool.GridPlane(def.graphicData.drawSize), DrawPos, ExactRotation, def.DrawMatSingle, 0);
     Comps_PostDraw();
 }