[spine-unity] 3.3 changes to TK2D code + better default scale.

This commit is contained in:
pharan 2016-07-04 13:58:34 +08:00
parent fca7c478e2
commit ebd8831a17
3 changed files with 11 additions and 21 deletions

View File

@ -39,9 +39,11 @@ namespace Spine.Unity {
public AtlasAsset[] atlasAssets;
#if SPINE_TK2D
public tk2dSpriteCollectionData spriteCollection;
public float scale = 1f;
#else
public float scale = 0.01f;
#endif
public TextAsset skeletonJSON;
public float scale = 0.01f;
public String[] fromAnimation;
public String[] toAnimation;
public float[] duration;

View File

@ -154,7 +154,11 @@ namespace Spine.Unity.Editor {
static Dictionary<int, BoundingBoxFollower> boundingBoxFollowerTable;
const string DEFAULT_MIX_KEY = "SPINE_DEFAULT_MIX";
#if SPINE_TK2D
public static float defaultScale = 1f;
#else
public static float defaultScale = 0.01f;
#endif
public static float defaultMix = 0.2f;
public static string defaultShader = "Spine/Skeleton";

View File

@ -138,29 +138,13 @@ namespace Spine.Unity.TK2D {
return mesh;
}
public WeightedMeshAttachment NewWeightedMeshAttachment (Skin skin, String name, String path) {
ProcessSpriteDefinition(path);
WeightedMeshAttachment mesh = new WeightedMeshAttachment(name);
mesh.Path = path;
mesh.RendererObject = material;
mesh.RegionU = u;
mesh.RegionV = v;
mesh.RegionU2 = u2;
mesh.RegionV2 = v2;
mesh.RegionRotate = regionRotated;
mesh.RegionOriginalWidth = regionOriginalWidth;
mesh.RegionOriginalHeight = regionOriginalHeight;
mesh.RegionWidth = regionWidth;
mesh.RegionHeight = regionHeight;
mesh.RegionOffsetX = regionOffsetX;
mesh.RegionOffsetY = regionOffsetY;
return mesh;
}
public BoundingBoxAttachment NewBoundingBoxAttachment (Skin skin, String name) {
return new BoundingBoxAttachment(name);
}
public PathAttachment NewPathAttachment (Skin skin, string name) {
return new PathAttachment(name);
}
}
}
#endif