mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 19:11:36 +08:00
[spine-unity] 3.3 changes to TK2D code + better default scale.
This commit is contained in:
parent
fca7c478e2
commit
ebd8831a17
@ -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;
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user