Skip to content

Commit

Permalink
Change rotation's data type to float in XML.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoguzhu committed Jul 3, 2018
1 parent ac5d359 commit 6f6db79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Scripts/UI/GObject.cs
Expand Up @@ -1739,7 +1739,7 @@ virtual public void Setup_BeforeAdd(XML xml)

str = xml.GetAttribute("rotation");
if (str != null)
this.rotation = int.Parse(str);
this.rotation = float.Parse(str);

arr = xml.GetAttributeArray("pivot");
if (arr != null)
Expand Down
4 changes: 2 additions & 2 deletions Source/Scripts/UI/Transition.cs
Expand Up @@ -360,7 +360,7 @@ public void SetValue(string label, params object[] aParams)
break;

case TransitionActionType.Rotation:
value.f1 = Convert.ToInt32(aParams[0]);
value.f1 = Convert.ToSingle(aParams[0]);
break;

case TransitionActionType.Color:
Expand Down Expand Up @@ -1022,7 +1022,7 @@ void DecodeValue(TransitionItem item, string str, TransitionValue value)
break;

case TransitionActionType.Rotation:
value.f1 = int.Parse(str);
value.f1 = float.Parse(str);
break;

case TransitionActionType.Scale:
Expand Down

0 comments on commit 6f6db79

Please sign in to comment.