Browse Source

Replaced serialisation callback due to threading warning

master
chrisgregan 9 years ago
parent
commit
4fddc9e420
  1. 8
      Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs
  2. 8
      Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs
  3. 8
      Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs
  4. 8
      Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs
  5. 8
      Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs
  6. 8
      Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs
  7. 8
      Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs
  8. 8
      Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs
  9. 8
      Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs
  10. 8
      Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
  11. 8
      Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs
  12. 8
      Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs
  13. 8
      Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs
  14. 8
      Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs
  15. 8
      Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs
  16. 8
      Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs
  17. 8
      Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs
  18. 10
      Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs
  19. 10
      Assets/Fungus/iTween/Scripts/Commands/LookTo.cs
  20. 10
      Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs
  21. 10
      Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs
  22. 10
      Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs
  23. 10
      Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs
  24. 10
      Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs
  25. 10
      Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs
  26. 10
      Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs
  27. 10
      Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs
  28. 10
      Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs
  29. 10
      Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs
  30. 10
      Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs
  31. 10
      Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs
  32. 10
      Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs
  33. 10
      Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs
  34. 10
      Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs
  35. 8
      Assets/Fungus/iTween/Scripts/Commands/StopTween.cs
  36. 10
      Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs

8
Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs

@ -9,7 +9,8 @@ namespace Fungus
"Reset Anim Trigger",
"Resets a trigger parameter on an Animator component.")]
[AddComponentMenu("")]
public class ResetAnimTrigger : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ResetAnimTrigger : Command
{
[Tooltip("Reference to an Animator component in a game object")]
public AnimatorData _animator;
@ -47,10 +48,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (animatorOLD != null)
{

8
Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs

@ -9,7 +9,8 @@ namespace Fungus
"Set Anim Bool",
"Sets a boolean parameter on an Animator component to control a Unity animation")]
[AddComponentMenu("")]
public class SetAnimBool : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SetAnimBool : Command
{
[Tooltip("Reference to an Animator component in a game object")]
public AnimatorData _animator;
@ -50,10 +51,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (animatorOLD != null)
{

8
Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs

@ -9,7 +9,8 @@ namespace Fungus
"Set Anim Float",
"Sets a float parameter on an Animator component to control a Unity animation")]
[AddComponentMenu("")]
public class SetAnimFloat : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SetAnimFloat : Command
{
[Tooltip("Reference to an Animator component in a game object")]
public AnimatorData _animator;
@ -50,10 +51,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (animatorOLD != null)
{

8
Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs

@ -9,7 +9,8 @@ namespace Fungus
"Set Anim Integer",
"Sets an integer parameter on an Animator component to control a Unity animation")]
[AddComponentMenu("")]
public class SetAnimInteger : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SetAnimInteger : Command
{
[Tooltip("Reference to an Animator component in a game object")]
public AnimatorData _animator;
@ -50,10 +51,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (animatorOLD != null)
{

8
Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs

@ -9,7 +9,8 @@ namespace Fungus
"Set Anim Trigger",
"Sets a trigger parameter on an Animator component to control a Unity animation")]
[AddComponentMenu("")]
public class SetAnimTrigger : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SetAnimTrigger : Command
{
[Tooltip("Reference to an Animator component in a game object")]
public AnimatorData _animator;
@ -47,10 +48,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
public void OnBeforeSerialize()
{}
public void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (animatorOLD != null)
{

8
Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs

@ -7,7 +7,8 @@ namespace Fungus
[CommandInfo("Audio",
"Control Audio",
"Plays, loops, or stops an audiosource. Any AudioSources with the same tag as the target Audio Source will automatically be stoped.")]
public class ControlAudio : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ControlAudio : Command
{
public enum controlType
{
@ -262,10 +263,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("audioSource")] public AudioSource audioSourceOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (audioSourceOLD != null)
{

8
Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs

@ -7,7 +7,8 @@
"Play Usfxr Sound",
"Plays a usfxr synth sound. Use the usfxr editor [Tools > Fungus > Utilities > Generate usfxr Sound Effects] to create the SettingsString. Set a ParentTransform if using positional sound. See https://github.com/zeh/usfxr for more information about usfxr.")]
[AddComponentMenu("")]
public class PlayUsfxrSound : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class PlayUsfxrSound : Command
{
protected SfxrSynth _synth = new SfxrSynth();
@ -69,10 +70,7 @@
[HideInInspector] [FormerlySerializedAs("SettingsString")] public String SettingsStringOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (SettingsStringOLD != "")
{

8
Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs

@ -9,7 +9,8 @@ namespace Fungus
"Destroy",
"Destroys a specified game object in the scene.")]
[AddComponentMenu("")]
public class Destroy : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class Destroy : Command
{
[Tooltip("Reference to game object to destroy")]
public GameObjectData _targetGameObject;
@ -43,10 +44,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("targetGameObject")] public GameObject targetGameObjectOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (targetGameObjectOLD != null)
{

8
Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs

@ -12,7 +12,8 @@ namespace Fungus
"usage. Previously loaded assets will be released before loading the scene to free up memory." +
"The scene to be loaded must be added to the scene list in Build Settings.")]
[AddComponentMenu("")]
public class LoadScene : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class LoadScene : Command
{
[Tooltip("Name of the scene to load. The scene must also be added to the build settings.")]
public StringData _sceneName = new StringData("");
@ -44,10 +45,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("sceneName")] public string sceneNameOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (sceneNameOLD != "")
{

8
Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs

@ -8,7 +8,8 @@ namespace Fungus
"Send Message",
"Sends a message to either the owner Flowchart or all Flowcharts in the scene. Blocks can listen for this message using a Message Received event handler.")]
[AddComponentMenu("")]
public class SendMessage : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SendMessage : Command
{
public enum MessageTarget
{
@ -72,10 +73,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("message")] public string messageOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (messageOLD != "")
{

8
Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs

@ -9,7 +9,8 @@ namespace Fungus
"Set Active",
"Sets a game object in the scene to be active / inactive.")]
[AddComponentMenu("")]
public class SetActive : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SetActive : Command
{
[Tooltip("Reference to game object to enable / disable")]
public GameObjectData _targetGameObject;
@ -46,10 +47,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("targetGameObject")] public GameObject targetGameObjectOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (targetGameObjectOLD != null)
{

8
Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs

@ -11,7 +11,8 @@ namespace Fungus
"Spawn Object",
"Spawns a new object based on a reference to a scene or prefab game object.")]
[AddComponentMenu("")]
public class SpawnObject : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SpawnObject : Command
{
[Tooltip("Game object to copy when spawning. Can be a scene object or a prefab.")]
public GameObjectData _sourceObject;
@ -67,10 +68,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("spawnPosition")] public Vector3 spawnPositionOLD;
[HideInInspector] [FormerlySerializedAs("spawnRotation")] public Vector3 spawnRotationOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (sourceObjectOLD != null)
{

8
Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs

@ -9,7 +9,8 @@ namespace Fungus
"Wait",
"Waits for period of time before executing the next command in the block.")]
[AddComponentMenu("")]
public class Wait : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class Wait : Command
{
[Tooltip("Duration to wait for")]
public FloatData _duration = new FloatData(1);
@ -38,10 +39,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("duration")] public float durationOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (durationOLD != default(float))
{

8
Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs

@ -11,7 +11,8 @@ namespace Fungus
"Menu Timer",
"Displays a timer bar and executes a target block if the player fails to select a menu option in time.")]
[AddComponentMenu("")]
public class MenuTimer : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class MenuTimer : Command
{
[Tooltip("Length of time to display the timer for")]
public FloatData _duration = new FloatData(1);
@ -60,10 +61,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("duration")] public float durationOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (durationOLD != default(float))
{

8
Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs

@ -8,7 +8,8 @@ namespace Fungus
"Set Language",
"Set the active language for the scene. A Localization object with a localization file must be present in the scene.")]
[AddComponentMenu("")]
public class SetLanguage : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class SetLanguage : Command
{
[Tooltip("Code of the language to set. e.g. ES, DE, JA")]
public StringData _languageCode = new StringData();
@ -44,10 +45,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("languageCode")] public string languageCodeOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (languageCodeOLD != "")
{

8
Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs

@ -9,7 +9,8 @@ namespace Fungus
"Fade Sprite",
"Fades a sprite to a target color over a period of time.")]
[AddComponentMenu("")]
public class FadeSprite : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class FadeSprite : Command
{
[Tooltip("Sprite object to be faded")]
public SpriteRenderer spriteRenderer;
@ -72,10 +73,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("duration")] public float durationOLD;
[HideInInspector] [FormerlySerializedAs("targetColor")] public Color targetColorOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (durationOLD != default(float))
{

8
Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs

@ -9,7 +9,8 @@ namespace Fungus
"Show Sprite",
"Makes a sprite visible / invisible by setting the color alpha.")]
[AddComponentMenu("")]
public class ShowSprite : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ShowSprite : Command
{
[Tooltip("Sprite object to be made visible / invisible")]
public SpriteRenderer spriteRenderer;
@ -67,10 +68,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("visible")] public bool visibleOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (visibleOLD != default(bool))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Look From",
"Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time.")]
[AddComponentMenu("")]
public class LookFrom : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class LookFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will look at")]
public TransformData _fromTransform;
@ -57,12 +58,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromPosition")] public Vector3 fromPositionOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (fromTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Look To",
"Rotates a GameObject to look at a supplied Transform or Vector3 over time.")]
[AddComponentMenu("")]
public class LookTo : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class LookTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will look at")]
public TransformData _toTransform;
@ -57,12 +58,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toPosition")] public Vector3 toPositionOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (toTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Move Add",
"Moves a game object by a specified offset over time.")]
[AddComponentMenu("")]
public class MoveAdd : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class MoveAdd : iTweenCommand
{
[Tooltip("A translation offset in space the GameObject will animate to")]
public Vector3Data _offset;
@ -35,12 +36,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("offset")] public Vector3 offsetOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (offsetOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"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).")]
[AddComponentMenu("")]
public class MoveFrom : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class MoveFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will move from")]
public TransformData _fromTransform;
@ -46,12 +47,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromPosition")] public Vector3 fromPositionOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (fromTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"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).")]
[AddComponentMenu("")]
public class MoveTo : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class MoveTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will move to")]
public TransformData _toTransform;
@ -46,12 +47,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toPosition")] public Vector3 toPositionOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (toTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Punch Position",
"Applies a jolt of force to a GameObject's position and wobbles it back to its initial position.")]
[AddComponentMenu("")]
public class PunchPosition : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class PunchPosition : iTweenCommand
{
[Tooltip("A translation offset in space the GameObject will animate to")]
public Vector3Data _amount;
@ -35,12 +36,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (amountOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Punch Rotation",
"Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation.")]
[AddComponentMenu("")]
public class PunchRotation : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class PunchRotation : iTweenCommand
{
[Tooltip("A rotation offset in space the GameObject will animate to")]
public Vector3Data _amount;
@ -35,12 +36,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (amountOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Punch Scale",
"Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale.")]
[AddComponentMenu("")]
public class PunchScale : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class PunchScale : iTweenCommand
{
[Tooltip("A scale offset in space the GameObject will animate to")]
public Vector3Data _amount;
@ -31,12 +32,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (amountOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Rotate Add",
"Rotates a game object by the specified angles over time.")]
[AddComponentMenu("")]
public class RotateAdd : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class RotateAdd : iTweenCommand
{
[Tooltip("A rotation offset in space the GameObject will animate to")]
public Vector3Data _offset;
@ -35,12 +36,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("offset")] public Vector3 offsetOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (offsetOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Rotate From",
"Rotates a game object from the specified angles back to its starting orientation over time.")]
[AddComponentMenu("")]
public class RotateFrom : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class RotateFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will rotate from")]
public TransformData _fromTransform;
@ -46,12 +47,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromRotation")] public Vector3 fromRotationOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (fromTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Rotate To",
"Rotates a game object to the specified angles over time.")]
[AddComponentMenu("")]
public class RotateTo : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class RotateTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will rotate to")]
public TransformData _toTransform;
@ -46,12 +47,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toRotation")] public Vector3 toRotationOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (toTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Scale Add",
"Changes a game object's scale by a specified offset over time.")]
[AddComponentMenu("")]
public class ScaleAdd : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ScaleAdd : iTweenCommand
{
[Tooltip("A scale offset in space the GameObject will animate to")]
public Vector3Data _offset;
@ -31,12 +32,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("offset")] public Vector3 offsetOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (offsetOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Scale From",
"Changes a game object's scale to the specified value and back to its original scale over time.")]
[AddComponentMenu("")]
public class ScaleFrom : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ScaleFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will scale from")]
public TransformData _fromTransform;
@ -42,12 +43,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("fromTransform")] public Transform fromTransformOLD;
[HideInInspector] [FormerlySerializedAs("fromScale")] public Vector3 fromScaleOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (fromTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Scale To",
"Changes a game object's scale to a specified value over time.")]
[AddComponentMenu("")]
public class ScaleTo : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ScaleTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will scale to")]
public TransformData _toTransform;
@ -42,12 +43,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("toTransform")] public Transform toTransformOLD;
[HideInInspector] [FormerlySerializedAs("toScale")] public Vector3 toScaleOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (toTransformOLD != null)
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Shake Position",
"Randomly shakes a GameObject's position by a diminishing amount over time.")]
[AddComponentMenu("")]
public class ShakePosition : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ShakePosition : iTweenCommand
{
[Tooltip("A translation offset in space the GameObject will animate to")]
public Vector3Data _amount;
@ -50,12 +51,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (amountOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Shake Rotation",
"Randomly shakes a GameObject's rotation by a diminishing amount over time.")]
[AddComponentMenu("")]
public class ShakeRotation : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ShakeRotation : iTweenCommand
{
[Tooltip("A rotation offset in space the GameObject will animate to")]
public Vector3Data _amount;
@ -35,12 +36,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (amountOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Shake Scale",
"Randomly shakes a GameObject's rotation by a diminishing amount over time.")]
[AddComponentMenu("")]
public class ShakeScale : iTweenCommand, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class ShakeScale : iTweenCommand
{
[Tooltip("A scale offset in space the GameObject will animate to")]
public Vector3Data _amount;
@ -31,12 +32,9 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("amount")] public Vector3 amountOLD;
public override void OnBeforeSerialize()
{}
public override void OnAfterDeserialize()
protected override void OnEnable()
{
base.OnAfterDeserialize();
base.OnEnable();
if (amountOLD != default(Vector3))
{

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

@ -8,7 +8,8 @@ namespace Fungus
"Stop Tween",
"Stops an active iTween by name.")]
[AddComponentMenu("")]
public class StopTween : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public class StopTween : Command
{
[Tooltip("Stop and destroy any Tweens in current scene with the supplied name")]
public StringData _tweenName;
@ -23,10 +24,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (tweenNameOLD != "")
{

10
Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs

@ -13,7 +13,8 @@ namespace Fungus
Z
}
public abstract class iTweenCommand : Command, ISerializationCallbackReceiver
[ExecuteInEditMode]
public abstract class iTweenCommand : Command
{
[Tooltip("Target game object to apply the Tween to")]
public GameObjectData _targetObject;
@ -98,10 +99,7 @@ namespace Fungus
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD;
[HideInInspector] [FormerlySerializedAs("duration")] public float durationOLD;
public virtual void OnBeforeSerialize()
{}
public virtual void OnAfterDeserialize()
protected virtual void OnEnable()
{
if (targetObjectOLD != null)
{
@ -113,7 +111,7 @@ namespace Fungus
{
_duration.Value = durationOLD;
durationOLD = default(float);
}
}
}
#endregion

Loading…
Cancel
Save