public virtual void SetWindingOrder(SpriteRoot.WINDING_ORDER winding) { /* Commented out because this should now be taken care of * by the fact we now reverse the x position of the vertices. * * if (winding == SpriteRoot.WINDING_ORDER.CCW) * { * // Counter-clockwise: * m_faces[0] = 0; // 0_ 2 0 ___ 3 * m_faces[1] = 1; // | / Verts: | /| * m_faces[2] = 3; // 1|/ 1|/__|2 * * m_faces[3] = 3; // 3 * m_faces[4] = 1; // /| * m_faces[5] = 2; // 4/_|5 * } * else */ { // Clock-wise: m_faces[0] = 0; // 0_ 1 0 ___ 3 m_faces[1] = 3; // | / Verts: | /| m_faces[2] = 1; // 2|/ 1|/__|2 m_faces[3] = 3; // 3 m_faces[4] = 2; // /| m_faces[5] = 1; // 5/_|4 } if (m_mesh != null) { m_mesh.triangles = m_faces; } }
public void SetWindingOrder(SpriteRoot.WINDING_ORDER order) { this.winding = order; if (!this.managed && this.m_spriteMesh != null) { ((SpriteMesh)this.m_spriteMesh).SetWindingOrder(order); } }
public virtual void SetWindingOrder(SpriteRoot.WINDING_ORDER winding) { this.m_faces[0] = 0; this.m_faces[1] = 3; this.m_faces[2] = 1; this.m_faces[3] = 3; this.m_faces[4] = 2; this.m_faces[5] = 1; if (this.m_mesh != null) { this.m_mesh.triangles = this.m_faces; } }
public virtual void Copy(SpriteRoot s) { if (!this.managed) { if (this.m_spriteMesh != null && s.spriteMesh != null) { ((SpriteMesh)this.m_spriteMesh).material = s.spriteMesh.material; } else if (!s.managed) { base.renderer.sharedMaterial = s.renderer.sharedMaterial; } } this.drawLayer = s.drawLayer; if (s.renderCamera != null) { this.SetCamera(s.renderCamera); } if (this.renderCamera == null) { this.renderCamera = Camera.main; } if (this.m_spriteMesh != null) { if (this.m_spriteMesh.texture != null) { this.SetPixelToUV(this.m_spriteMesh.texture); } else if (!this.managed) { ((SpriteMesh)this.m_spriteMesh).material = base.renderer.sharedMaterial; this.SetPixelToUV(this.m_spriteMesh.texture); } } this.plane = s.plane; this.winding = s.winding; this.offset = s.offset; this.anchor = s.anchor; this.bleedCompensation = s.bleedCompensation; this.autoResize = s.autoResize; this.pixelPerfect = s.pixelPerfect; this.uvRect = s.uvRect; this.scaleFactor = s.scaleFactor; this.topLeftOffset = s.topLeftOffset; this.bottomRightOffset = s.bottomRightOffset; this.width = s.width; this.height = s.height; this.m_sprTile = s.m_sprTile; this.m_v3TotalVertices = s.m_v3TotalVertices; this.SetColor(s.color); }
public virtual void Mirror(SpriteRoot s) { this.managed = s.managed; this.manager = s.manager; this.drawLayer = s.drawLayer; this.plane = s.plane; this.winding = s.winding; this.width = s.width; this.height = s.height; this.bleedCompensation = s.bleedCompensation; this.anchor = s.anchor; this.offset = s.offset; this.color = s.color; this.pixelPerfect = s.pixelPerfect; this.autoResize = s.autoResize; this.renderCamera = s.renderCamera; this.hideAtStart = s.hideAtStart; }