コード例 #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();
        }
コード例 #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);
        }
コード例 #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();
        }
コード例 #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));
        }
コード例 #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));
        }
コード例 #6
0
 public override void Draw()
 {
     Graphics.DrawMesh(MeshPool.GridPlane(def.graphicData.drawSize), DrawPos, ExactRotation, def.DrawMatSingle, 0);
     Comps_PostDraw();
 }