mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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;
|
public AtlasAsset[] atlasAssets;
|
||||||
#if SPINE_TK2D
|
#if SPINE_TK2D
|
||||||
public tk2dSpriteCollectionData spriteCollection;
|
public tk2dSpriteCollectionData spriteCollection;
|
||||||
|
public float scale = 1f;
|
||||||
|
#else
|
||||||
|
public float scale = 0.01f;
|
||||||
#endif
|
#endif
|
||||||
public TextAsset skeletonJSON;
|
public TextAsset skeletonJSON;
|
||||||
public float scale = 0.01f;
|
|
||||||
public String[] fromAnimation;
|
public String[] fromAnimation;
|
||||||
public String[] toAnimation;
|
public String[] toAnimation;
|
||||||
public float[] duration;
|
public float[] duration;
|
||||||
|
|||||||
@ -154,7 +154,11 @@ namespace Spine.Unity.Editor {
|
|||||||
static Dictionary<int, BoundingBoxFollower> boundingBoxFollowerTable;
|
static Dictionary<int, BoundingBoxFollower> boundingBoxFollowerTable;
|
||||||
|
|
||||||
const string DEFAULT_MIX_KEY = "SPINE_DEFAULT_MIX";
|
const string DEFAULT_MIX_KEY = "SPINE_DEFAULT_MIX";
|
||||||
|
#if SPINE_TK2D
|
||||||
|
public static float defaultScale = 1f;
|
||||||
|
#else
|
||||||
public static float defaultScale = 0.01f;
|
public static float defaultScale = 0.01f;
|
||||||
|
#endif
|
||||||
public static float defaultMix = 0.2f;
|
public static float defaultMix = 0.2f;
|
||||||
public static string defaultShader = "Spine/Skeleton";
|
public static string defaultShader = "Spine/Skeleton";
|
||||||
|
|
||||||
|
|||||||
@ -138,29 +138,13 @@ namespace Spine.Unity.TK2D {
|
|||||||
return mesh;
|
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) {
|
public BoundingBoxAttachment NewBoundingBoxAttachment (Skin skin, String name) {
|
||||||
return new BoundingBoxAttachment(name);
|
return new BoundingBoxAttachment(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PathAttachment NewPathAttachment (Skin skin, string name) {
|
||||||
|
return new PathAttachment(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user