mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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)))
|
using (var input = new BufferedStream(Microsoft.Xna.Framework.TitleContainer.OpenStream(path)))
|
||||||
{
|
{
|
||||||
#else
|
#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
|
#endif
|
||||||
SkeletonData skeletonData = ReadSkeletonData(input);
|
SkeletonData skeletonData = ReadSkeletonData(input);
|
||||||
skeletonData.name = Path.GetFileNameWithoutExtension(path);
|
skeletonData.name = Path.GetFileNameWithoutExtension(path);
|
||||||
|
|||||||
@ -18,7 +18,11 @@ public class RaggedySpineboy : MonoBehaviour {
|
|||||||
|
|
||||||
void AddRigidbody () {
|
void AddRigidbody () {
|
||||||
var rb = gameObject.AddComponent<Rigidbody2D>();
|
var rb = gameObject.AddComponent<Rigidbody2D>();
|
||||||
|
#if UNITY_5_1
|
||||||
|
rb.freezeRotation = true;
|
||||||
|
#else
|
||||||
rb.fixedAngle = true;
|
rb.fixedAngle = true;
|
||||||
|
#endif
|
||||||
naturalCollider.enabled = true;
|
naturalCollider.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -280,7 +280,7 @@ public class SkeletonRagdoll2D : MonoBehaviour {
|
|||||||
if (colliders.Count == 0) {
|
if (colliders.Count == 0) {
|
||||||
var box = go.AddComponent<BoxCollider2D>();
|
var box = go.AddComponent<BoxCollider2D>();
|
||||||
box.size = new Vector2(length, thickness);
|
box.size = new Vector2(length, thickness);
|
||||||
#if UNITY_5_0
|
#if UNITY_5
|
||||||
box.offset = new Vector2((b.WorldFlipX ? -length : length) / 2, 0);
|
box.offset = new Vector2((b.WorldFlipX ? -length : length) / 2, 0);
|
||||||
#else
|
#else
|
||||||
box.center = new Vector2((b.WorldFlipX ? -length : length) / 2, 0);
|
box.center = new Vector2((b.WorldFlipX ? -length : length) / 2, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user