From e7938219a41b940d75a0a3407dc1c234641dd790 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 28 Oct 2014 14:05:09 +0000 Subject: [PATCH] Added tooltips for all Fungus command properties --- Assets/Examples/JumpingPrax/JumpingPrax.unity | 4 ++-- Assets/Fungus/Animation/Commands/SetAnimBool.cs | 5 +++++ Assets/Fungus/Animation/Commands/SetAnimFloat.cs | 5 +++++ Assets/Fungus/Animation/Commands/SetAnimInteger.cs | 5 +++++ Assets/Fungus/Animation/Commands/SetAnimTrigger.cs | 3 +++ Assets/Fungus/Audio/Commands/PlayMusic.cs | 1 + Assets/Fungus/Audio/Commands/PlaySound.cs | 2 ++ Assets/Fungus/Audio/Commands/SetAudioVolume.cs | 2 ++ Assets/Fungus/Camera/Commands/FadeScreen.cs | 9 +++++++++ Assets/Fungus/Camera/Commands/FadeToView.cs | 9 +++++++++ Assets/Fungus/Camera/Commands/MoveToView.cs | 5 +++++ Assets/Fungus/Camera/Commands/ShakeCamera.cs | 5 +++++ Assets/Fungus/Camera/Commands/StartSwipe.cs | 5 +++++ Assets/Fungus/Dialog/Commands/AddOption.cs | 5 +++++ Assets/Fungus/Dialog/Commands/Choose.cs | 8 ++++++++ Assets/Fungus/Dialog/Commands/Say.cs | 10 ++++++++++ Assets/Fungus/FungusScript/Commands/Call.cs | 1 + Assets/Fungus/FungusScript/Commands/Comment.cs | 1 + Assets/Fungus/FungusScript/Commands/If.cs | 6 ++++++ Assets/Fungus/FungusScript/Commands/LoadGlobals.cs | 1 + Assets/Fungus/FungusScript/Commands/LoadScene.cs | 2 ++ Assets/Fungus/FungusScript/Commands/Reset.cs | 5 +++++ Assets/Fungus/FungusScript/Commands/RunScript.cs | 2 ++ Assets/Fungus/FungusScript/Commands/SaveGlobals.cs | 1 + Assets/Fungus/FungusScript/Commands/SetActive.cs | 2 ++ Assets/Fungus/FungusScript/Commands/SetVariable.cs | 6 ++++++ Assets/Fungus/FungusScript/Commands/Wait.cs | 1 + Assets/Fungus/iTween/Commands/LookFrom.cs | 5 +++++ Assets/Fungus/iTween/Commands/LookTo.cs | 5 +++++ Assets/Fungus/iTween/Commands/MoveAdd.cs | 3 +++ Assets/Fungus/iTween/Commands/MoveFrom.cs | 5 +++++ Assets/Fungus/iTween/Commands/MoveTo.cs | 5 +++++ Assets/Fungus/iTween/Commands/PunchPosition.cs | 3 +++ Assets/Fungus/iTween/Commands/PunchRotation.cs | 3 +++ Assets/Fungus/iTween/Commands/PunchScale.cs | 1 + Assets/Fungus/iTween/Commands/RotateAdd.cs | 3 +++ Assets/Fungus/iTween/Commands/RotateFrom.cs | 5 +++++ Assets/Fungus/iTween/Commands/RotateTo.cs | 5 +++++ Assets/Fungus/iTween/Commands/ScaleAdd.cs | 1 + Assets/Fungus/iTween/Commands/ScaleFrom.cs | 3 +++ Assets/Fungus/iTween/Commands/ScaleTo.cs | 3 +++ Assets/Fungus/iTween/Commands/ShakePosition.cs | 5 +++++ Assets/Fungus/iTween/Commands/ShakeRotation.cs | 3 +++ Assets/Fungus/iTween/Commands/ShakeScale.cs | 1 + Assets/Fungus/iTween/Commands/StopTween.cs | 1 + Assets/Fungus/iTween/Commands/iTweenCommand.cs | 11 +++++++++++ 46 files changed, 180 insertions(+), 2 deletions(-) diff --git a/Assets/Examples/JumpingPrax/JumpingPrax.unity b/Assets/Examples/JumpingPrax/JumpingPrax.unity index 39f6b15d..8a6e643c 100644 --- a/Assets/Examples/JumpingPrax/JumpingPrax.unity +++ b/Assets/Examples/JumpingPrax/JumpingPrax.unity @@ -232,7 +232,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} m_Name: m_EditorClassIdentifier: - scrollPos: {x: 678.026611, y: 27.0280762} + scrollPos: {x: 659.026611, y: 230.028076} zoom: 1 scrollViewRect: serializedVersion: 2 @@ -242,7 +242,7 @@ MonoBehaviour: height: 1416 selectedSequence: {fileID: 1947290628} selectedCommands: - - {fileID: 1947290641} + - {fileID: 1947290640} variables: - {fileID: 16019625} startSequence: {fileID: 1947290628} diff --git a/Assets/Fungus/Animation/Commands/SetAnimBool.cs b/Assets/Fungus/Animation/Commands/SetAnimBool.cs index 3ce038b6..3d5ec65d 100644 --- a/Assets/Fungus/Animation/Commands/SetAnimBool.cs +++ b/Assets/Fungus/Animation/Commands/SetAnimBool.cs @@ -9,8 +9,13 @@ namespace Fungus "Sets a boolean parameter on an Animator component to control a Unity animation")] public class SetAnimBool : Command { + [Tooltip("Reference to an Animator component in a game object")] public Animator animator; + + [Tooltip("Name of the boolean Animator parameter that will have its value changed")] public string parameterName; + + [Tooltip("The boolean value to set the parameter to")] public BooleanData value; public override void OnEnter() diff --git a/Assets/Fungus/Animation/Commands/SetAnimFloat.cs b/Assets/Fungus/Animation/Commands/SetAnimFloat.cs index 5c04f2f0..f8e2d6d0 100644 --- a/Assets/Fungus/Animation/Commands/SetAnimFloat.cs +++ b/Assets/Fungus/Animation/Commands/SetAnimFloat.cs @@ -9,8 +9,13 @@ namespace Fungus "Sets a float parameter on an Animator component to control a Unity animation")] public class SetAnimFloat : Command { + [Tooltip("Reference to an Animator component in a game object")] public Animator animator; + + [Tooltip("Name of the float Animator parameter that will have its value changed")] public string parameterName; + + [Tooltip("The float value to set the parameter to")] public FloatData value; public override void OnEnter() diff --git a/Assets/Fungus/Animation/Commands/SetAnimInteger.cs b/Assets/Fungus/Animation/Commands/SetAnimInteger.cs index aa4d247f..8a2a735b 100644 --- a/Assets/Fungus/Animation/Commands/SetAnimInteger.cs +++ b/Assets/Fungus/Animation/Commands/SetAnimInteger.cs @@ -9,8 +9,13 @@ namespace Fungus "Sets an integer parameter on an Animator component to control a Unity animation")] public class SetAnimInteger : Command { + [Tooltip("Reference to an Animator component in a game object")] public Animator animator; + + [Tooltip("Name of the integer Animator parameter that will have its value changed")] public string parameterName; + + [Tooltip("The integer value to set the parameter to")] public IntegerData value; public override void OnEnter() diff --git a/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs b/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs index 1c2419a4..04bb3ffa 100644 --- a/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs +++ b/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs @@ -9,7 +9,10 @@ namespace Fungus "Sets a trigger parameter on an Animator component to control a Unity animation")] public class SetAnimTrigger : Command { + [Tooltip("Reference to an Animator component in a game object")] public Animator animator; + + [Tooltip("Name of the trigger Animator parameter that will have its value changed")] public string parameterName; public override void OnEnter() diff --git a/Assets/Fungus/Audio/Commands/PlayMusic.cs b/Assets/Fungus/Audio/Commands/PlayMusic.cs index b5b31435..e46b874c 100644 --- a/Assets/Fungus/Audio/Commands/PlayMusic.cs +++ b/Assets/Fungus/Audio/Commands/PlayMusic.cs @@ -8,6 +8,7 @@ namespace Fungus "Plays looping game music. If any game music is already playing, it is stopped. Game music will continue playing across scene loads.")] public class PlayMusic : Command { + [Tooltip("Music sound clip to play")] public AudioClip musicClip; [Tooltip("Time to begin playing in seconds. If the audio file is compressed, the time index may be inaccurate.")] diff --git a/Assets/Fungus/Audio/Commands/PlaySound.cs b/Assets/Fungus/Audio/Commands/PlaySound.cs index ea153a2c..8d6ea863 100644 --- a/Assets/Fungus/Audio/Commands/PlaySound.cs +++ b/Assets/Fungus/Audio/Commands/PlaySound.cs @@ -8,9 +8,11 @@ namespace Fungus "Plays a once-off sound effect. Multiple sound effects can be played at the same time.")] public class PlaySound : Command { + [Tooltip("Sound effect clip to play")] public AudioClip soundClip; [Range(0,1)] + [Tooltip("Volume level of the sound effect")] public float volume = 1; public override void OnEnter() diff --git a/Assets/Fungus/Audio/Commands/SetAudioVolume.cs b/Assets/Fungus/Audio/Commands/SetAudioVolume.cs index e83ad729..1230ebcc 100644 --- a/Assets/Fungus/Audio/Commands/SetAudioVolume.cs +++ b/Assets/Fungus/Audio/Commands/SetAudioVolume.cs @@ -9,9 +9,11 @@ namespace Fungus public class SetAudioVolume : Command { [Range(0,1)] + [Tooltip("Global volume level for audio played using Play Music and Play Sound")] public float volume = 1; [Range(0,30)] + [Tooltip("Time to fade between current volume level and target volume level.")] public float fadeDuration; public override void OnEnter() diff --git a/Assets/Fungus/Camera/Commands/FadeScreen.cs b/Assets/Fungus/Camera/Commands/FadeScreen.cs index 389cf4a4..73b1e22a 100644 --- a/Assets/Fungus/Camera/Commands/FadeScreen.cs +++ b/Assets/Fungus/Camera/Commands/FadeScreen.cs @@ -10,10 +10,19 @@ namespace Fungus "If no Fade Texture is provided then a default flat color texture is used.")] public class FadeScreen : Command { + [Tooltip("Time for fade effect to complete")] public float duration = 1f; + + [Tooltip("Current target alpha transparency value. The fade gradually adjusts the alpha to approach this target value.")] public float targetAlpha = 1f; + + [Tooltip("Wait until the fade has finished before executing next command")] public bool waitUntilFinished = true; + + [Tooltip("Color to render fullscreen fade texture with when screen is obscured.")] public Color fadeColor = Color.black; + + [Tooltip("Optional texture to use when rendering the fullscreen fade effect.")] public Texture2D fadeTexture; public override void OnEnter() diff --git a/Assets/Fungus/Camera/Commands/FadeToView.cs b/Assets/Fungus/Camera/Commands/FadeToView.cs index ef384332..be0b82c5 100644 --- a/Assets/Fungus/Camera/Commands/FadeToView.cs +++ b/Assets/Fungus/Camera/Commands/FadeToView.cs @@ -9,10 +9,19 @@ namespace Fungus "Fades the camera out and in again at a position specified by a View object. Select [Game Object > Fungus > Camera > View] to create a View object.")] public class FadeToView : Command { + [Tooltip("Time for fade effect to complete")] public float duration = 1f; + + [Tooltip("View to transition to when Fade is complete")] public Fungus.View targetView; + + [Tooltip("Wait until the fade has finished before executing next command")] public bool waitUntilFinished = true; + + [Tooltip("Color to render fullscreen fade texture with when screen is obscured.")] public Color fadeColor = Color.black; + + [Tooltip("Optional texture to use when rendering the fullscreen fade effect.")] public Texture2D fadeTexture; public override void OnEnter() diff --git a/Assets/Fungus/Camera/Commands/MoveToView.cs b/Assets/Fungus/Camera/Commands/MoveToView.cs index 33d1b387..1f1e9b7d 100644 --- a/Assets/Fungus/Camera/Commands/MoveToView.cs +++ b/Assets/Fungus/Camera/Commands/MoveToView.cs @@ -9,8 +9,13 @@ namespace Fungus "Moves the camera to a location specified by a View object. Select [Game Object > Fungus > Camera > View] to create a View object.")] public class MoveToView : Command { + [Tooltip("Time for move effect to complete")] public float duration = 1; + + [Tooltip("View to transition to when move is complete")] public Fungus.View targetView; + + [Tooltip("Wait until the fade has finished before executing next command")] public bool waitUntilFinished = true; public override void OnEnter() diff --git a/Assets/Fungus/Camera/Commands/ShakeCamera.cs b/Assets/Fungus/Camera/Commands/ShakeCamera.cs index e0919e19..c4f91757 100644 --- a/Assets/Fungus/Camera/Commands/ShakeCamera.cs +++ b/Assets/Fungus/Camera/Commands/ShakeCamera.cs @@ -9,8 +9,13 @@ namespace Fungus "Applies a camera shake effect to the main camera.")] public class ShakeCamera : Command { + [Tooltip("Time for camera shake effect to complete")] public float duration = 0.5f; + + [Tooltip("Magnitude of shake effect in x & y axes")] public Vector2 amount = new Vector2(1, 1); + + [Tooltip("Wait until the shake effect has finished before executing next command")] public bool waitUntilFinished; public override void OnEnter() diff --git a/Assets/Fungus/Camera/Commands/StartSwipe.cs b/Assets/Fungus/Camera/Commands/StartSwipe.cs index 3f554e0b..fbeb8b88 100644 --- a/Assets/Fungus/Camera/Commands/StartSwipe.cs +++ b/Assets/Fungus/Camera/Commands/StartSwipe.cs @@ -9,8 +9,13 @@ namespace Fungus "Activates swipe panning mode where the player can pan the camera within the area between viewA & viewB.")] public class StartSwipe : Command { + [Tooltip("Defines one extreme of the scrollable area that the player can pan around")] public View viewA; + + [Tooltip("Defines one extreme of the scrollable area that the player can pan around")] public View viewB; + + [Tooltip("Time to move the camera to a valid starting position between the two views")] public float duration = 0.5f; public override void OnEnter() diff --git a/Assets/Fungus/Dialog/Commands/AddOption.cs b/Assets/Fungus/Dialog/Commands/AddOption.cs index 1aa73490..f1e6811f 100644 --- a/Assets/Fungus/Dialog/Commands/AddOption.cs +++ b/Assets/Fungus/Dialog/Commands/AddOption.cs @@ -11,10 +11,15 @@ namespace Fungus "You can specify another sequence to call and/or a variable to set when the options is selected.")] public class AddOption : SetVariable { + [Tooltip("Option text to display when presenting the option to the player")] public string optionText; + + [Tooltip("Sequence to execute when the player selects this option")] public Sequence targetSequence; + [Tooltip("Hide this option once it has been selected so that it won't appear again even if executed again")] public bool hideOnSelected; + protected bool wasSelected; public override void OnEnter() diff --git a/Assets/Fungus/Dialog/Commands/Choose.cs b/Assets/Fungus/Dialog/Commands/Choose.cs index 8452b202..d755d2e2 100644 --- a/Assets/Fungus/Dialog/Commands/Choose.cs +++ b/Assets/Fungus/Dialog/Commands/Choose.cs @@ -21,12 +21,20 @@ namespace Fungus static public List