Browse Source

iTween properties accept variables

master
chrisgregan 9 years ago
parent
commit
9788021f2c
  1. 4
      Assets/Fungus/Flowchart/Editor/VariableEditor.cs
  2. 51
      Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs
  3. 12
      Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs.meta
  4. 42
      Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs
  5. 42
      Assets/Fungus/iTween/Scripts/Commands/LookTo.cs
  6. 27
      Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs
  7. 42
      Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs
  8. 42
      Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs
  9. 27
      Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs
  10. 27
      Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs
  11. 27
      Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs
  12. 27
      Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs
  13. 42
      Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs
  14. 42
      Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs
  15. 27
      Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs
  16. 42
      Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs
  17. 42
      Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs
  18. 29
      Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs
  19. 29
      Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs
  20. 29
      Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs
  21. 27
      Assets/Fungus/iTween/Scripts/Commands/StopTween.cs
  22. 2
      Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs

4
Assets/Fungus/Flowchart/Editor/VariableEditor.cs

@ -323,4 +323,8 @@ namespace Fungus
[CustomPropertyDrawer (typeof(AnimatorData))] [CustomPropertyDrawer (typeof(AnimatorData))]
public class AnimatorDataDrawer : VariableDataDrawer<AnimatorVariable> public class AnimatorDataDrawer : VariableDataDrawer<AnimatorVariable>
{} {}
[CustomPropertyDrawer (typeof(TransformData))]
public class TransformDataDrawer : VariableDataDrawer<TransformVariable>
{}
} }

51
Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs

@ -0,0 +1,51 @@
using UnityEngine;
using System.Collections;
namespace Fungus
{
[VariableInfo("Other", "Transform")]
[AddComponentMenu("")]
public class TransformVariable : VariableBase<Transform>
{}
[System.Serializable]
public struct TransformData
{
[SerializeField]
[VariableProperty("<Value>", typeof(TransformVariable))]
public TransformVariable transformRef;
[SerializeField]
public Transform transformVal;
public TransformData(Transform v)
{
transformVal = v;
transformRef = null;
}
public static implicit operator Transform(TransformData vector3Data)
{
return vector3Data.Value;
}
public Transform Value
{
get { return (transformRef == null) ? transformVal : transformRef.value; }
set { if (transformRef == null) { transformVal = value; } else { transformRef.value = value; } }
}
public string GetDescription()
{
if (transformRef == null)
{
return transformVal.ToString();
}
else
{
return transformRef.key;
}
}
}
}

12
Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 633bea14077b44e19956e8113fbac7a4
timeCreated: 1457893486
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

42
Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,13 +8,18 @@ namespace Fungus
"Look From", "Look From",
"Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time.")] "Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class LookFrom : iTweenCommand public class LookFrom : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromPosition")] public Vector3 fromPositionOLD;
#endregion
[Tooltip("Target transform that the GameObject will look at")] [Tooltip("Target transform that the GameObject will look at")]
public Transform fromTransform; public TransformData _fromTransform;
[Tooltip("Target world position that the GameObject will look at, if no From Transform is set")] [Tooltip("Target world position that the GameObject will look at, if no From Transform is set")]
public Vector3 fromPosition; public Vector3Data _fromPosition;
[Tooltip("Restricts rotation to the supplied axis only")] [Tooltip("Restricts rotation to the supplied axis only")]
public iTweenAxis axis; public iTweenAxis axis;
@ -22,13 +28,13 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (fromTransform == null) if (_fromTransform.Value == null)
{ {
tweenParams.Add("looktarget", fromPosition); tweenParams.Add("looktarget", _fromPosition.Value);
} }
else else
{ {
tweenParams.Add("looktarget", fromTransform); tweenParams.Add("looktarget", _fromTransform.Value);
} }
switch (axis) switch (axis)
{ {
@ -49,7 +55,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.LookFrom(_targetObject.Value, tweenParams); iTween.LookFrom(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (fromTransformOLD != null)
{
_fromTransform.Value = fromTransformOLD;
fromTransformOLD = null;
}
if (fromPositionOLD != default(Vector3))
{
_fromPosition.Value = fromPositionOLD;
fromPositionOLD = default(Vector3);
}
}
} }
} }

42
Assets/Fungus/iTween/Scripts/Commands/LookTo.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,13 +8,18 @@ namespace Fungus
"Look To", "Look To",
"Rotates a GameObject to look at a supplied Transform or Vector3 over time.")] "Rotates a GameObject to look at a supplied Transform or Vector3 over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class LookTo : iTweenCommand public class LookTo : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toPosition")] public Vector3 toPositionOLD;
#endregion
[Tooltip("Target transform that the GameObject will look at")] [Tooltip("Target transform that the GameObject will look at")]
public Transform toTransform; public TransformData _toTransform;
[Tooltip("Target world position that the GameObject will look at, if no From Transform is set")] [Tooltip("Target world position that the GameObject will look at, if no From Transform is set")]
public Vector3 toPosition; public Vector3Data _toPosition;
[Tooltip("Restricts rotation to the supplied axis only")] [Tooltip("Restricts rotation to the supplied axis only")]
public iTweenAxis axis; public iTweenAxis axis;
@ -22,13 +28,13 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (toTransform == null) if (_toTransform.Value == null)
{ {
tweenParams.Add("looktarget", toPosition); tweenParams.Add("looktarget", _toPosition.Value);
} }
else else
{ {
tweenParams.Add("looktarget", toTransform); tweenParams.Add("looktarget", _toTransform.Value);
} }
switch (axis) switch (axis)
{ {
@ -49,7 +55,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.LookTo(_targetObject.Value, tweenParams); iTween.LookTo(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (toTransformOLD != null)
{
_toTransform.Value = toTransformOLD;
toTransformOLD = null;
}
if (toPositionOLD != default(Vector3))
{
_toPosition.Value = toPositionOLD;
toPositionOLD = default(Vector3);
}
}
} }
} }

27
Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,10 +8,14 @@ namespace Fungus
"Move Add", "Move Add",
"Moves a game object by a specified offset over time.")] "Moves a game object by a specified offset over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class MoveAdd : iTweenCommand public class MoveAdd : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("offset")] public Vector3 offsetOLD;
#endregion
[Tooltip("A translation offset in space the GameObject will animate to")] [Tooltip("A translation offset in space the GameObject will animate to")]
public Vector3 offset; public Vector3Data _offset;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")] [Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
public Space space = Space.Self; public Space space = Space.Self;
@ -19,7 +24,7 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", offset); tweenParams.Add("amount", _offset.Value);
tweenParams.Add("space", space); tweenParams.Add("space", space);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -29,6 +34,22 @@ namespace Fungus
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.MoveAdd(_targetObject.Value, tweenParams); iTween.MoveAdd(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (offsetOLD != default(Vector3))
{
_offset.Value = offsetOLD;
offsetOLD = default(Vector3);
}
}
} }
} }

42
Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,13 +8,18 @@ namespace Fungus
"Move From", "Move From",
"Moves a game object from a specified position back to its starting position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).")] "Moves a game object from a specified position back to its starting position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class MoveFrom : iTweenCommand public class MoveFrom : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromPosition")] public Vector3 fromPositionOLD;
#endregion
[Tooltip("Target transform that the GameObject will move from")] [Tooltip("Target transform that the GameObject will move from")]
public Transform fromTransform; public TransformData _fromTransform;
[Tooltip("Target world position that the GameObject will move from, if no From Transform is set")] [Tooltip("Target world position that the GameObject will move from, if no From Transform is set")]
public Vector3 fromPosition; public Vector3Data _fromPosition;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")] [Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
public bool isLocal; public bool isLocal;
@ -22,13 +28,13 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (fromTransform == null) if (_fromTransform.Value == null)
{ {
tweenParams.Add("position", fromPosition); tweenParams.Add("position", _fromPosition.Value);
} }
else else
{ {
tweenParams.Add("position", fromTransform); tweenParams.Add("position", _fromTransform.Value);
} }
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -38,7 +44,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.MoveFrom(_targetObject.Value, tweenParams); iTween.MoveFrom(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (fromTransformOLD != null)
{
_fromTransform.Value = fromTransformOLD;
fromTransformOLD = null;
}
if (fromPositionOLD != default(Vector3))
{
_fromPosition.Value = fromPositionOLD;
fromPositionOLD = default(Vector3);
}
}
} }
} }

42
Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,13 +8,18 @@ namespace Fungus
"Move To", "Move To",
"Moves a game object to a specified position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).")] "Moves a game object to a specified position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class MoveTo : iTweenCommand public class MoveTo : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toPosition")] public Vector3 toPositionOLD;
#endregion
[Tooltip("Target transform that the GameObject will move to")] [Tooltip("Target transform that the GameObject will move to")]
public Transform toTransform; public TransformData _toTransform;
[Tooltip("Target world position that the GameObject will move to, if no From Transform is set")] [Tooltip("Target world position that the GameObject will move to, if no From Transform is set")]
public Vector3 toPosition; public Vector3Data _toPosition;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")] [Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
public bool isLocal; public bool isLocal;
@ -22,13 +28,13 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (toTransform == null) if (_toTransform.Value == null)
{ {
tweenParams.Add("position", toPosition); tweenParams.Add("position", _toPosition.Value);
} }
else else
{ {
tweenParams.Add("position", toTransform); tweenParams.Add("position", _toTransform.Value);
} }
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -38,7 +44,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.MoveTo(_targetObject.Value, tweenParams); iTween.MoveTo(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (toTransformOLD != null)
{
_toTransform.Value = toTransformOLD;
toTransformOLD = null;
}
if (toPositionOLD != default(Vector3))
{
_toPosition.Value = toPositionOLD;
toPositionOLD = default(Vector3);
}
}
} }
} }

27
Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,10 +8,14 @@ namespace Fungus
"Punch Position", "Punch Position",
"Applies a jolt of force to a GameObject's position and wobbles it back to its initial position.")] "Applies a jolt of force to a GameObject's position and wobbles it back to its initial position.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class PunchPosition : iTweenCommand public class PunchPosition : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
#endregion
[Tooltip("A translation offset in space the GameObject will animate to")] [Tooltip("A translation offset in space the GameObject will animate to")]
public Vector3 amount; public Vector3Data _amount;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")] [Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
public Space space = Space.Self; public Space space = Space.Self;
@ -19,7 +24,7 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", amount); tweenParams.Add("amount", _amount.Value);
tweenParams.Add("space", space); tweenParams.Add("space", space);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -29,6 +34,22 @@ namespace Fungus
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.PunchPosition(_targetObject.Value, tweenParams); iTween.PunchPosition(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (amountOLD != default(Vector3))
{
_amount.Value = amountOLD;
amountOLD = default(Vector3);
}
}
} }
} }

27
Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,10 +8,14 @@ namespace Fungus
"Punch Rotation", "Punch Rotation",
"Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation.")] "Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class PunchRotation : iTweenCommand public class PunchRotation : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
#endregion
[Tooltip("A rotation offset in space the GameObject will animate to")] [Tooltip("A rotation offset in space the GameObject will animate to")]
public Vector3 amount; public Vector3Data _amount;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")] [Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
public Space space = Space.Self; public Space space = Space.Self;
@ -19,7 +24,7 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", amount); tweenParams.Add("amount", _amount.Value);
tweenParams.Add("space", space); tweenParams.Add("space", space);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -29,6 +34,22 @@ namespace Fungus
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.PunchRotation(_targetObject.Value, tweenParams); iTween.PunchRotation(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (amountOLD != default(Vector3))
{
_amount.Value = amountOLD;
amountOLD = default(Vector3);
}
}
} }
} }

27
Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,16 +8,20 @@ namespace Fungus
"Punch Scale", "Punch Scale",
"Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale.")] "Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class PunchScale : iTweenCommand public class PunchScale : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
#endregion
[Tooltip("A scale offset in space the GameObject will animate to")] [Tooltip("A scale offset in space the GameObject will animate to")]
public Vector3 amount; public Vector3Data _amount;
public override void DoTween() public override void DoTween()
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", amount); tweenParams.Add("amount", _amount.Value);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
tweenParams.Add("looptype", loopType); tweenParams.Add("looptype", loopType);
@ -25,6 +30,22 @@ namespace Fungus
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.PunchScale(_targetObject.Value, tweenParams); iTween.PunchScale(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (amountOLD != default(Vector3))
{
_amount.Value = amountOLD;
amountOLD = default(Vector3);
}
}
} }
} }

27
Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,10 +8,14 @@ namespace Fungus
"Rotate Add", "Rotate Add",
"Rotates a game object by the specified angles over time.")] "Rotates a game object by the specified angles over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class RotateAdd : iTweenCommand public class RotateAdd : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("offset")] public Vector3 offsetOLD;
#endregion
[Tooltip("A rotation offset in space the GameObject will animate to")] [Tooltip("A rotation offset in space the GameObject will animate to")]
public Vector3 offset; public Vector3Data _offset;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")] [Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
public Space space = Space.Self; public Space space = Space.Self;
@ -19,7 +24,7 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", offset); tweenParams.Add("amount", _offset.Value);
tweenParams.Add("space", space); tweenParams.Add("space", space);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -29,6 +34,22 @@ namespace Fungus
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.RotateAdd(_targetObject.Value, tweenParams); iTween.RotateAdd(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (offsetOLD != default(Vector3))
{
_offset.Value = offsetOLD;
offsetOLD = default(Vector3);
}
}
} }
} }

42
Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,13 +8,18 @@ namespace Fungus
"Rotate From", "Rotate From",
"Rotates a game object from the specified angles back to its starting orientation over time.")] "Rotates a game object from the specified angles back to its starting orientation over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class RotateFrom : iTweenCommand public class RotateFrom : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromRotation")] public Vector3 fromRotationOLD;
#endregion
[Tooltip("Target transform that the GameObject will rotate from")] [Tooltip("Target transform that the GameObject will rotate from")]
public Transform fromTransform; public TransformData _fromTransform;
[Tooltip("Target rotation that the GameObject will rotate from, if no From Transform is set")] [Tooltip("Target rotation that the GameObject will rotate from, if no From Transform is set")]
public Vector3 fromRotation; public Vector3Data _fromRotation;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")] [Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
public bool isLocal; public bool isLocal;
@ -22,13 +28,13 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (fromTransform == null) if (_fromTransform.Value == null)
{ {
tweenParams.Add("rotation", fromRotation); tweenParams.Add("rotation", _fromRotation.Value);
} }
else else
{ {
tweenParams.Add("rotation", fromTransform); tweenParams.Add("rotation", _fromTransform.Value);
} }
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -38,7 +44,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.RotateFrom(_targetObject.Value, tweenParams); iTween.RotateFrom(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (fromTransformOLD != null)
{
_fromTransform.Value = fromTransformOLD;
fromTransformOLD = null;
}
if (fromRotationOLD != default(Vector3))
{
_fromRotation.Value = fromRotationOLD;
fromRotationOLD = default(Vector3);
}
}
} }
} }

42
Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,13 +8,18 @@ namespace Fungus
"Rotate To", "Rotate To",
"Rotates a game object to the specified angles over time.")] "Rotates a game object to the specified angles over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class RotateTo : iTweenCommand public class RotateTo : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toRotation")] public Vector3 toRotationOLD;
#endregion
[Tooltip("Target transform that the GameObject will rotate to")] [Tooltip("Target transform that the GameObject will rotate to")]
public Transform toTransform; public TransformData _toTransform;
[Tooltip("Target rotation that the GameObject will rotate to, if no To Transform is set")] [Tooltip("Target rotation that the GameObject will rotate to, if no To Transform is set")]
public Vector3 toRotation; public Vector3Data _toRotation;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")] [Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
public bool isLocal; public bool isLocal;
@ -22,13 +28,13 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (toTransform == null) if (_toTransform.Value == null)
{ {
tweenParams.Add("rotation", toRotation); tweenParams.Add("rotation", _toRotation.Value);
} }
else else
{ {
tweenParams.Add("rotation", toTransform); tweenParams.Add("rotation", _toTransform.Value);
} }
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -38,7 +44,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.RotateTo(_targetObject.Value, tweenParams); iTween.RotateTo(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (toTransformOLD != null)
{
_toTransform.Value = toTransformOLD;
toTransformOLD = null;
}
if (toRotationOLD != default(Vector3))
{
_toRotation.Value = toRotationOLD;
toRotationOLD = default(Vector3);
}
}
} }
} }

27
Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,16 +8,20 @@ namespace Fungus
"Scale Add", "Scale Add",
"Changes a game object's scale by a specified offset over time.")] "Changes a game object's scale by a specified offset over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class ScaleAdd : iTweenCommand public class ScaleAdd : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("offset")] public Vector3 offsetOLD;
#endregion
[Tooltip("A scale offset in space the GameObject will animate to")] [Tooltip("A scale offset in space the GameObject will animate to")]
public Vector3 offset; public Vector3Data _offset;
public override void DoTween() public override void DoTween()
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", offset); tweenParams.Add("amount", _offset.Value);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
tweenParams.Add("looptype", loopType); tweenParams.Add("looptype", loopType);
@ -25,6 +30,22 @@ namespace Fungus
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.ScaleAdd(_targetObject.Value, tweenParams); iTween.ScaleAdd(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (offsetOLD != default(Vector3))
{
_offset.Value = offsetOLD;
offsetOLD = default(Vector3);
}
}
} }
} }

42
Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,25 +8,30 @@ namespace Fungus
"Scale From", "Scale From",
"Changes a game object's scale to the specified value and back to its original scale over time.")] "Changes a game object's scale to the specified value and back to its original scale over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class ScaleFrom : iTweenCommand public class ScaleFrom : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromScale")] public Vector3 fromScaleOLD;
#endregion
[Tooltip("Target transform that the GameObject will scale from")] [Tooltip("Target transform that the GameObject will scale from")]
public Transform fromTransform; public TransformData _fromTransform;
[Tooltip("Target scale that the GameObject will scale from, if no From Transform is set")] [Tooltip("Target scale that the GameObject will scale from, if no From Transform is set")]
public Vector3 fromScale; public Vector3Data _fromScale;
public override void DoTween() public override void DoTween()
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (fromTransform == null) if (_fromTransform.Value == null)
{ {
tweenParams.Add("scale", fromScale); tweenParams.Add("scale", _fromScale.Value);
} }
else else
{ {
tweenParams.Add("scale", fromTransform); tweenParams.Add("scale", _fromTransform.Value);
} }
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -34,7 +40,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.ScaleFrom(_targetObject.Value, tweenParams); iTween.ScaleFrom(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (fromTransformOLD != null)
{
_fromTransform.Value = fromTransformOLD;
fromTransformOLD = null;
}
if (fromScaleOLD != default(Vector3))
{
_fromScale.Value = fromScaleOLD;
fromScaleOLD = default(Vector3);
}
}
} }
} }

42
Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,25 +8,30 @@ namespace Fungus
"Scale To", "Scale To",
"Changes a game object's scale to a specified value over time.")] "Changes a game object's scale to a specified value over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class ScaleTo : iTweenCommand public class ScaleTo : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toScale")] public Vector3 toScaleOLD;
#endregion
[Tooltip("Target transform that the GameObject will scale to")] [Tooltip("Target transform that the GameObject will scale to")]
public Transform toTransform; public TransformData _toTransform;
[Tooltip("Target scale that the GameObject will scale to, if no To Transform is set")] [Tooltip("Target scale that the GameObject will scale to, if no To Transform is set")]
public Vector3 toScale = new Vector3(1f, 1f, 1f); public Vector3Data _toScale = new Vector3Data(Vector3.one);
public override void DoTween() public override void DoTween()
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
if (toTransform == null) if (_toTransform.Value == null)
{ {
tweenParams.Add("scale", toScale); tweenParams.Add("scale", _toScale.Value);
} }
else else
{ {
tweenParams.Add("scale", toTransform); tweenParams.Add("scale", _toTransform.Value);
} }
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -34,7 +40,29 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.ScaleTo(_targetObject.Value, tweenParams); iTween.ScaleTo(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (toTransformOLD != null)
{
_toTransform.Value = toTransformOLD;
toTransformOLD = null;
}
if (toScaleOLD != default(Vector3))
{
_toScale.Value = toScaleOLD;
toScaleOLD = default(Vector3);
}
}
} }
} }

29
Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,10 +8,14 @@ namespace Fungus
"Shake Position", "Shake Position",
"Randomly shakes a GameObject's position by a diminishing amount over time.")] "Randomly shakes a GameObject's position by a diminishing amount over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class ShakePosition : iTweenCommand public class ShakePosition : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
#endregion
[Tooltip("A translation offset in space the GameObject will animate to")] [Tooltip("A translation offset in space the GameObject will animate to")]
public Vector3 amount; public Vector3Data _amount;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")] [Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
public bool isLocal; public bool isLocal;
@ -22,7 +27,7 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", amount); tweenParams.Add("amount", _amount.Value);
switch (axis) switch (axis)
{ {
case iTweenAxis.X: case iTweenAxis.X:
@ -43,7 +48,23 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.ShakePosition(_targetObject.Value, tweenParams); iTween.ShakePosition(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (amountOLD != default(Vector3))
{
_amount.Value = amountOLD;
amountOLD = default(Vector3);
}
}
} }
} }

29
Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,10 +8,14 @@ namespace Fungus
"Shake Rotation", "Shake Rotation",
"Randomly shakes a GameObject's rotation by a diminishing amount over time.")] "Randomly shakes a GameObject's rotation by a diminishing amount over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class ShakeRotation : iTweenCommand public class ShakeRotation : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
#endregion
[Tooltip("A rotation offset in space the GameObject will animate to")] [Tooltip("A rotation offset in space the GameObject will animate to")]
public Vector3 amount; public Vector3Data _amount;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")] [Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
public Space space = Space.Self; public Space space = Space.Self;
@ -19,7 +24,7 @@ namespace Fungus
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", amount); tweenParams.Add("amount", _amount.Value);
tweenParams.Add("space", space); tweenParams.Add("space", space);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
@ -28,7 +33,23 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.ShakeRotation(_targetObject.Value, tweenParams); iTween.ShakeRotation(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (amountOLD != default(Vector3))
{
_amount.Value = amountOLD;
amountOLD = default(Vector3);
}
}
} }
} }

29
Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,16 +8,20 @@ namespace Fungus
"Shake Scale", "Shake Scale",
"Randomly shakes a GameObject's rotation by a diminishing amount over time.")] "Randomly shakes a GameObject's rotation by a diminishing amount over time.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class ShakeScale : iTweenCommand public class ShakeScale : iTweenCommand, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
#endregion
[Tooltip("A scale offset in space the GameObject will animate to")] [Tooltip("A scale offset in space the GameObject will animate to")]
public Vector3 amount; public Vector3Data _amount;
public override void DoTween() public override void DoTween()
{ {
Hashtable tweenParams = new Hashtable(); Hashtable tweenParams = new Hashtable();
tweenParams.Add("name", _tweenName.Value); tweenParams.Add("name", _tweenName.Value);
tweenParams.Add("amount", amount); tweenParams.Add("amount", _amount.Value);
tweenParams.Add("time", duration); tweenParams.Add("time", duration);
tweenParams.Add("easetype", easeType); tweenParams.Add("easetype", easeType);
tweenParams.Add("looptype", loopType); tweenParams.Add("looptype", loopType);
@ -24,7 +29,23 @@ namespace Fungus
tweenParams.Add("oncompletetarget", gameObject); tweenParams.Add("oncompletetarget", gameObject);
tweenParams.Add("oncompleteparams", this); tweenParams.Add("oncompleteparams", this);
iTween.ShakeScale(_targetObject.Value, tweenParams); iTween.ShakeScale(_targetObject.Value, tweenParams);
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (amountOLD != default(Vector3))
{
_amount.Value = amountOLD;
amountOLD = default(Vector3);
}
}
} }
} }

27
Assets/Fungus/iTween/Scripts/Commands/StopTween.cs

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus
@ -7,16 +8,36 @@ namespace Fungus
"Stop Tween", "Stop Tween",
"Stops an active iTween by name.")] "Stops an active iTween by name.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class StopTween : Command public class StopTween : Command, ISerializationCallbackReceiver
{ {
#region Obsolete Properties
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD;
#endregion
[Tooltip("Stop and destroy any Tweens in current scene with the supplied name")] [Tooltip("Stop and destroy any Tweens in current scene with the supplied name")]
public string tweenName; public StringData _tweenName;
public override void OnEnter() public override void OnEnter()
{ {
iTween.StopByName(tweenName); iTween.StopByName(_tweenName.Value);
Continue(); Continue();
} }
//
// ISerializationCallbackReceiver implementation
//
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
{
if (tweenNameOLD != "")
{
_tweenName.Value = tweenNameOLD;
tweenNameOLD = "";
}
}
} }
} }

2
Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs

@ -7,7 +7,7 @@ namespace Fungus
"Stop Tweens", "Stop Tweens",
"Stop all active iTweens in the current scene.")] "Stop all active iTweens in the current scene.")]
[AddComponentMenu("")] [AddComponentMenu("")]
public class StopTweens : Command public class StopTweens : Command
{ {
public override void OnEnter() public override void OnEnter()
{ {

Loading…
Cancel
Save