Skip to content

Commit

Permalink
-moved Utils classes into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
daseyb committed Jun 1, 2014
1 parent 45193c9 commit 9583728
Show file tree
Hide file tree
Showing 32 changed files with 293 additions and 211 deletions.
2 changes: 1 addition & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/BoneRef.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/Entity.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/File.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/Folder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/Key.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
6 changes: 1 addition & 5 deletions Assets/ThirdParty/Spriter2Unity/Editor/Spriter/KeyElem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -20,10 +20,6 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace Assets.ThirdParty.Spriter2Unity.Editor.Spriter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
3 changes: 2 additions & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/ObjectRef.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -20,6 +20,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/Ref.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion Assets/ThirdParty/Spriter2Unity/Editor/Spriter/Timeline.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
26 changes: 16 additions & 10 deletions Assets/ThirdParty/Spriter2Unity/Editor/Spriter/TimelineKey.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -20,6 +20,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -28,10 +29,24 @@ THE SOFTWARE.

namespace Assets.ThirdParty.Spriter2Unity.Editor.Spriter
{
/// <summary>
/// Base class for all timeline keys.
/// </summary>
public class TimelineKey : Key
{
/// <summary>
/// Reference to the timeline the key is on.
/// </summary>
public Timeline Timeline { get; private set; }

/// <summary>
/// The interpolation type to use for this key.
/// </summary>
public CurveType CurveType { get; private set; }

/// <summary>
/// Parameters to use for interpolation (quadratic and qubic at the moment)
/// </summary>
public float[] CurveParams { get; private set; }

public TimelineKey(XmlElement element, Timeline timeline)
Expand Down Expand Up @@ -85,15 +100,6 @@ void GetCurveParams(XmlElement element)
CurveParams = curveParams
.Select(attr => float.Parse(attr.Value))
.ToArray();
/*
//Debug Output - consider using #ifdef instead
if(curveParams.Count > 0)
{
var curveParamString = curveParams.OfType<XmlAttribute>()
.Select(attr => "\"" + attr.Name + "\":" + attr.Value)
.Aggregate((current,next)=> current + ";" + next);
UnityEngine.Debug.Log(string.Format("Found {0} curve parameters on timeline {1}, key {2} curvetype {3} ({4})", curveParams.Count, Timeline.Name, Id, CurveType, curveParamString));
}*/
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Andrew Jones
Copyright (c) 2014 Andrew Jones, Dario Seyb
Based on 'Spriter2Unity' python code by Malhavok
Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
5 changes: 5 additions & 0 deletions Assets/ThirdParty/Spriter2Unity/Editor/Utils.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9583728

Please sign in to comment.