mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-12 01:58:45 +08:00
Windows Phone 8 complation fixed (BufferedStream changed to FileStream)
RaggedySpineboy - changed fixedAngle to freezeRotation for Unity 5.1 Changed SkeletonRagdoll2D #if UNITY_5_0 to UNITY_5
This commit is contained in:
parent
876b845d16
commit
14803b4fab
@ -86,7 +86,13 @@ namespace Spine {
|
||||
using (var input = new BufferedStream(Microsoft.Xna.Framework.TitleContainer.OpenStream(path)))
|
||||
{
|
||||
#else
|
||||
using (var input = new BufferedStream(new FileStream(path, FileMode.Open))) {
|
||||
#if UNITY_WP8 || UNITY_WP8_1
|
||||
using (var input = new FileStream(path, FileMode.Open))
|
||||
{
|
||||
#else
|
||||
using (var input = new BufferedStream(new FileStream(path, FileMode.Open)))
|
||||
{
|
||||
#endif
|
||||
#endif
|
||||
SkeletonData skeletonData = ReadSkeletonData(input);
|
||||
skeletonData.name = Path.GetFileNameWithoutExtension(path);
|
||||
|
||||
@ -18,7 +18,11 @@ public class RaggedySpineboy : MonoBehaviour {
|
||||
|
||||
void AddRigidbody () {
|
||||
var rb = gameObject.AddComponent<Rigidbody2D>();
|
||||
#if UNITY_5_1
|
||||
rb.freezeRotation = true;
|
||||
#else
|
||||
rb.fixedAngle = true;
|
||||
#endif
|
||||
naturalCollider.enabled = true;
|
||||
}
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@ public class SkeletonRagdoll2D : MonoBehaviour {
|
||||
if (colliders.Count == 0) {
|
||||
var box = go.AddComponent<BoxCollider2D>();
|
||||
box.size = new Vector2(length, thickness);
|
||||
#if UNITY_5_0
|
||||
#if UNITY_5
|
||||
box.offset = new Vector2((b.WorldFlipX ? -length : length) / 2, 0);
|
||||
#else
|
||||
box.center = new Vector2((b.WorldFlipX ? -length : length) / 2, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user