Spine.Atlas.FlipV C# (CSharp) Method

FlipV() public method

public FlipV ( ) : void
return void
		public void FlipV () {
			for (int i = 0, n = regions.Count; i < n; i++) {
				AtlasRegion region = regions[i];
				region.v = 1 - region.v;
				region.v2 = 1 - region.v2;
			}
		}

Usage Example

コード例 #1
0
    /// <returns>The atlas or null if it could not be loaded.</returns>
    public Atlas GetAtlas()
    {
        if (atlasFile == null) {
            Debug.LogError("Atlas file not set for atlas asset: " + name, this);
            Clear();
            return null;
        }

        if (materials == null || materials.Length == 0) {
            Debug.LogError("Materials not set for atlas asset: " + name, this);
            Clear();
            return null;
        }

        if (atlas != null)
            return atlas;

        try {
            atlas = new Atlas(new StringReader(atlasFile.text), "", new MaterialsTextureLoader(this));
            atlas.FlipV();
            return atlas;
        } catch (Exception ex) {
            Debug.LogError("Error reading atlas file for atlas asset: " + name + "\n" + ex.Message + "\n" + ex.StackTrace, this);
            return null;
        }
    }
All Usage Examples Of Spine.Atlas::FlipV