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); }
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)); }
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)); }