|
|
@ -1,6 +1,6 @@ |
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine; |
|
|
|
using System.Collections; |
|
|
|
|
|
|
|
using UnityEngine.Serialization; |
|
|
|
using UnityEngine.Serialization; |
|
|
|
|
|
|
|
using System.Collections; |
|
|
|
|
|
|
|
|
|
|
|
namespace Fungus |
|
|
|
namespace Fungus |
|
|
|
{ |
|
|
|
{ |
|
|
@ -13,18 +13,18 @@ namespace Fungus |
|
|
|
Z |
|
|
|
Z |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public abstract class iTweenCommand : Command, IUpdateable |
|
|
|
public abstract class iTweenCommand : Command, ISerializationCallbackReceiver |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Obsolete: Use _targetObject instead. |
|
|
|
#region Obsolete Properties |
|
|
|
[HideInInspector] |
|
|
|
[HideInInspector] [FormerlySerializedAs("target")] [FormerlySerializedAs("targetObject")] public GameObject targetObjectOLD; |
|
|
|
[FormerlySerializedAs("target")] |
|
|
|
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD; |
|
|
|
public GameObject targetObject; |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("Target game object to apply the Tween to")] |
|
|
|
[Tooltip("Target game object to apply the Tween to")] |
|
|
|
public GameObjectData _targetObject; |
|
|
|
public GameObjectData _targetObject; |
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("An individual name useful for stopping iTweens by name")] |
|
|
|
[Tooltip("An individual name useful for stopping iTweens by name")] |
|
|
|
public string tweenName; |
|
|
|
public StringData _tweenName; |
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("The time in seconds the animation will take to complete")] |
|
|
|
[Tooltip("The time in seconds the animation will take to complete")] |
|
|
|
public float duration = 1f; |
|
|
|
public float duration = 1f; |
|
|
@ -98,17 +98,18 @@ namespace Fungus |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// |
|
|
|
// |
|
|
|
// IUpdateable implementation |
|
|
|
// ISerializationCallbackReceiver implementation |
|
|
|
// |
|
|
|
// |
|
|
|
|
|
|
|
|
|
|
|
public virtual void UpdateToVersion(int oldVersion, int newVersion) |
|
|
|
public void OnBeforeSerialize() |
|
|
|
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void OnAfterDeserialize() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (oldVersion == 0 && |
|
|
|
if (targetObjectOLD != null) |
|
|
|
targetObject != null) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
_targetObject.gameObjectVal = targetObject; |
|
|
|
_targetObject.Value = targetObjectOLD; |
|
|
|
_targetObject.gameObjectRef = null; |
|
|
|
targetObjectOLD = null; |
|
|
|
targetObject = null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|