diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoGetMode.cs b/Assets/IsoTools/PlayMaker/Actions/IsoGetMode.cs index e38a5f7..fa07f75 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoGetMode.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoGetMode.cs @@ -3,7 +3,8 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Gets the Mode of a IsoObject and stores it in a Enum Variable")] + [HutongGames.PlayMaker.Tooltip( + "Gets the Mode of a IsoObject and stores it in a Enum Variable")] public class IsoGetMode : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoGetPosition.cs b/Assets/IsoTools/PlayMaker/Actions/IsoGetPosition.cs index d2a1b43..fa11378 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoGetPosition.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoGetPosition.cs @@ -3,7 +3,9 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Gets the Position of a IsoObject and stores it in a Vector3 Variable or each Axis in a Float Variable")] + [HutongGames.PlayMaker.Tooltip( + "Gets the Position of a IsoObject and stores it " + + "in a Vector3 Variable or each Axis in a Float Variable")] public class IsoGetPosition : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoGetSize.cs b/Assets/IsoTools/PlayMaker/Actions/IsoGetSize.cs index 995abef..76a8db4 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoGetSize.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoGetSize.cs @@ -3,7 +3,9 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Gets the Size of a IsoObject and stores it in a Vector3 Variable or each Axis in a Float Variable")] + [HutongGames.PlayMaker.Tooltip( + "Gets the Size of a IsoObject and stores it " + + "in a Vector3 Variable or each Axis in a Float Variable")] public class IsoGetSize : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoResize.cs b/Assets/IsoTools/PlayMaker/Actions/IsoResize.cs index 352f595..68fac3c 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoResize.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoResize.cs @@ -3,22 +3,36 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Resizes a IsoObject. Use a Vector3 variable and/or XYZ components. To leave any axis unchanged, set variable to 'None'.")] + [HutongGames.PlayMaker.Tooltip( + "Resizes a IsoObject. " + + "Use a Vector3 variable and/or XYZ components. " + + "To leave any axis unchanged, set variable to 'None'.")] public class IsoResize : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] + [HutongGames.PlayMaker.Tooltip("The IsoObject to resize.")] public FsmOwnerDefault gameObject; [UIHint(UIHint.Variable)] + [HutongGames.PlayMaker.Tooltip( + "Use a stored resize Vector3, " + + "and/or set individual axis below.")] public FsmVector3 vector; public FsmFloat x; public FsmFloat y; public FsmFloat z; + [HutongGames.PlayMaker.Tooltip("Resize over one second")] public bool perSecond; + + [HutongGames.PlayMaker.Tooltip("Repeat every frame.")] public bool everyFrame; + + [HutongGames.PlayMaker.Tooltip("Perform the resize in LateUpdate.")] public bool lateUpdate; + + [HutongGames.PlayMaker.Tooltip("Perform the resize in FixedUpdate.")] public bool fixedUpdate; public override void Reset() { @@ -71,22 +85,12 @@ namespace IsoTools.PlayMaker.Actions { void DoAction() { var go = Fsm.GetOwnerDefaultTarget(gameObject); if ( UpdateCache(go) ) { - var value = vector.IsNone - ? Vector3.zero - : vector.Value; - - if ( !x.IsNone ) { - value.x = x.Value; - } - if ( !y.IsNone ) { - value.y = y.Value; - } - if ( !z.IsNone ) { - value.z = z.Value; - } - + var value = vector.IsNone ? Vector3.zero : vector.Value; + if ( !x.IsNone ) { value.x = x.Value; } + if ( !y.IsNone ) { value.y = y.Value; } + if ( !z.IsNone ) { value.z = z.Value; } isoObject.size += - value * (perSecond ? Time.deltaTime : 1.0f); + perSecond ? value * Time.deltaTime : value; } } } diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoSetMode.cs b/Assets/IsoTools/PlayMaker/Actions/IsoSetMode.cs index cd1c82b..35c7033 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoSetMode.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoSetMode.cs @@ -3,10 +3,12 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Sets the Mode of a IsoObject.")] + [HutongGames.PlayMaker.Tooltip( + "Sets the Mode of a IsoObject.")] public class IsoSetMode : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] + [HutongGames.PlayMaker.Tooltip("The IsoObject to mode.")] public FsmOwnerDefault gameObject; [RequiredField] diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoSetPosition.cs b/Assets/IsoTools/PlayMaker/Actions/IsoSetPosition.cs index 6635140..bcea4a3 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoSetPosition.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoSetPosition.cs @@ -3,21 +3,32 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Sets the Position of a IsoObject. To leave any axis unchanged, set variable to 'None'.")] + [HutongGames.PlayMaker.Tooltip( + "Sets the Position of a IsoObject. " + + "To leave any axis unchanged, set variable to 'None'.")] public class IsoSetPosition : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] + [HutongGames.PlayMaker.Tooltip("The IsoObject to position.")] public FsmOwnerDefault gameObject; [UIHint(UIHint.Variable)] + [HutongGames.PlayMaker.Tooltip( + "Use a stored Vector3 position, " + + "and/or set individual axis below.")] public FsmVector3 vector; public FsmFloat x; public FsmFloat y; public FsmFloat z; + [HutongGames.PlayMaker.Tooltip("Repeat every frame.")] public bool everyFrame; + + [HutongGames.PlayMaker.Tooltip("Perform in LateUpdate.")] public bool lateUpdate; + + [HutongGames.PlayMaker.Tooltip("Perform in FixedUpdate.")] public bool fixedUpdate; public override void Reset() { @@ -69,20 +80,10 @@ namespace IsoTools.PlayMaker.Actions { void DoAction() { var go = Fsm.GetOwnerDefaultTarget(gameObject); if ( UpdateCache(go) ) { - var value = vector.IsNone - ? isoObject.position - : vector.Value; - - if ( !x.IsNone ) { - value.x = x.Value; - } - if ( !y.IsNone ) { - value.y = y.Value; - } - if ( !z.IsNone ) { - value.z = z.Value; - } - + var value = vector.IsNone ? isoObject.position : vector.Value; + if ( !x.IsNone ) { value.x = x.Value; } + if ( !y.IsNone ) { value.y = y.Value; } + if ( !z.IsNone ) { value.z = z.Value; } isoObject.position = value; } } diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoSetSize.cs b/Assets/IsoTools/PlayMaker/Actions/IsoSetSize.cs index db4f438..cc86fe9 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoSetSize.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoSetSize.cs @@ -3,21 +3,32 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Sets the Size of a IsoObject. To leave any axis unchanged, set variable to 'None'.")] + [HutongGames.PlayMaker.Tooltip( + "Sets the Size of a IsoObject. " + + "To leave any axis unchanged, set variable to 'None'.")] public class IsoSetSize : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] + [HutongGames.PlayMaker.Tooltip("The IsoObject to size.")] public FsmOwnerDefault gameObject; [UIHint(UIHint.Variable)] + [HutongGames.PlayMaker.Tooltip( + "Use a stored Vector3 size, " + + "and/or set individual axis below.")] public FsmVector3 vector; public FsmFloat x; public FsmFloat y; public FsmFloat z; + [HutongGames.PlayMaker.Tooltip("Repeat every frame.")] public bool everyFrame; + + [HutongGames.PlayMaker.Tooltip("Perform in LateUpdate.")] public bool lateUpdate; + + [HutongGames.PlayMaker.Tooltip("Perform in FixedUpdate.")] public bool fixedUpdate; public override void Reset() { @@ -69,20 +80,10 @@ namespace IsoTools.PlayMaker.Actions { void DoAction() { var go = Fsm.GetOwnerDefaultTarget(gameObject); if ( UpdateCache(go) ) { - var value = vector.IsNone - ? isoObject.size - : vector.Value; - - if ( !x.IsNone ) { - value.x = x.Value; - } - if ( !y.IsNone ) { - value.y = y.Value; - } - if ( !z.IsNone ) { - value.z = z.Value; - } - + var value = vector.IsNone ? isoObject.size : vector.Value; + if ( !x.IsNone ) { value.x = x.Value; } + if ( !y.IsNone ) { value.y = y.Value; } + if ( !z.IsNone ) { value.z = z.Value; } isoObject.size = value; } } diff --git a/Assets/IsoTools/PlayMaker/Actions/IsoTranslate.cs b/Assets/IsoTools/PlayMaker/Actions/IsoTranslate.cs index 1ca3bfd..6160b13 100644 --- a/Assets/IsoTools/PlayMaker/Actions/IsoTranslate.cs +++ b/Assets/IsoTools/PlayMaker/Actions/IsoTranslate.cs @@ -3,22 +3,36 @@ using HutongGames.PlayMaker; namespace IsoTools.PlayMaker.Actions { [ActionCategory("IsoTools")] - [HutongGames.PlayMaker.Tooltip("Translates a IsoObject. Use a Vector3 variable and/or XYZ components. To leave any axis unchanged, set variable to 'None'.")] + [HutongGames.PlayMaker.Tooltip( + "Translates a IsoObject. " + + "Use a Vector3 variable and/or XYZ components. " + + "To leave any axis unchanged, set variable to 'None'.")] public class IsoTranslate : IsoComponentAction { [RequiredField] [CheckForComponent(typeof(IsoObject))] + [HutongGames.PlayMaker.Tooltip("The IsoObject to translate.")] public FsmOwnerDefault gameObject; [UIHint(UIHint.Variable)] + [HutongGames.PlayMaker.Tooltip( + "Use a stored translation Vector3, " + + "and/or set individual axis below.")] public FsmVector3 vector; public FsmFloat x; public FsmFloat y; public FsmFloat z; + [HutongGames.PlayMaker.Tooltip("Translate over one second")] public bool perSecond; + + [HutongGames.PlayMaker.Tooltip("Repeat every frame.")] public bool everyFrame; + + [HutongGames.PlayMaker.Tooltip("Perform the translate in LateUpdate.")] public bool lateUpdate; + + [HutongGames.PlayMaker.Tooltip("Perform the translate in FixedUpdate.")] public bool fixedUpdate; public override void Reset() { @@ -71,22 +85,12 @@ namespace IsoTools.PlayMaker.Actions { void DoAction() { var go = Fsm.GetOwnerDefaultTarget(gameObject); if ( UpdateCache(go) ) { - var value = vector.IsNone - ? Vector3.zero - : vector.Value; - - if ( !x.IsNone ) { - value.x = x.Value; - } - if ( !y.IsNone ) { - value.y = y.Value; - } - if ( !z.IsNone ) { - value.z = z.Value; - } - + var value = vector.IsNone ? Vector3.zero : vector.Value; + if ( !x.IsNone ) { value.x = x.Value; } + if ( !y.IsNone ) { value.y = y.Value; } + if ( !z.IsNone ) { value.z = z.Value; } isoObject.position += - value * (perSecond ? Time.deltaTime : 1.0f); + perSecond ? value * Time.deltaTime : value; } } }