diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index c2a79267..f834742c 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -528,7 +528,9 @@ namespace Fungus.EditorUtils // Output the commands in each category foreach (string category in commandCategories) { - string markdown = "# " + category + " commands {#" + category.ToLower() + "_commands}\n\n"; + string markdown = "# " + category + " commands # {#" + category.ToLower() + "_commands}\n\n"; + markdown += "[TOC]\n"; + foreach(var keyPair in filteredAttributes) { CommandInfoAttribute info = keyPair.Value; @@ -536,7 +538,7 @@ namespace Fungus.EditorUtils if (info.Category == category || info.Category == "" && category == "Scripting") { - markdown += "## " + info.CommandName + "\n"; + markdown += "# " + info.CommandName + " # {#" + info.CommandName.Replace(" ", "") + "}\n"; markdown += info.HelpText + "\n\n"; markdown += "Defined in " + keyPair.Key.FullName + "\n"; markdown += GetPropertyInfo(keyPair.Key); @@ -570,7 +572,8 @@ namespace Fungus.EditorUtils // Output the commands in each category foreach (string category in eventHandlerCategories) { - string markdown = "# " + category + " event handlers {#" + category.ToLower() + "_events}\n\n"; + string markdown = "# " + category + " event handlers # {#" + category.ToLower() + "_events}\n\n"; + markdown += "[TOC]\n"; foreach (System.Type type in eventHandlerTypes) { @@ -580,7 +583,7 @@ namespace Fungus.EditorUtils info.Category == category || info.Category == "" && category == "Core") { - markdown += "## " + info.EventHandlerName + "\n"; + markdown += "# " + info.EventHandlerName + " # {#" + info.EventHandlerName.Replace(" ", "") + "}\n"; markdown += info.HelpText + "\n\n"; markdown += "Defined in " + type.FullName + "\n"; markdown += GetPropertyInfo(type); diff --git a/Docs/command_ref/animation_commands.md b/Docs/command_ref/animation_commands.md index a4a7de64..e10d98b5 100644 --- a/Docs/command_ref/animation_commands.md +++ b/Docs/command_ref/animation_commands.md @@ -1,6 +1,7 @@ -# Animation commands {#animation_commands} +# Animation commands # {#animation_commands} -## Play Anim State +[TOC] +# Play Anim State # {#PlayAnimState} Plays a state of an animator according to the state name Defined in Fungus.Commands.PlayAnimState @@ -12,7 +13,7 @@ State Name | Fungus.Variables.StringData | Name of the state you want to play Layer | Fungus.Variables.IntegerData | Layer to play animation on Time | Fungus.Variables.FloatData | Start time of animation -## Reset Anim Trigger +# Reset Anim Trigger # {#ResetAnimTrigger} Resets a trigger parameter on an Animator component. Defined in Fungus.Commands.ResetAnimTrigger @@ -22,7 +23,7 @@ Property | Type | Description _animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object _parameter Name | Fungus.Variables.StringData | Name of the trigger Animator parameter that will be reset -## Set Anim Bool +# Set Anim Bool # {#SetAnimBool} Sets a boolean parameter on an Animator component to control a Unity animation Defined in Fungus.Commands.SetAnimBool @@ -33,7 +34,7 @@ _animator | Fungus.Variables.AnimatorData | Reference to an Animator component i _parameter Name | Fungus.Variables.StringData | Name of the boolean Animator parameter that will have its value changed Value | Fungus.Variables.BooleanData | The boolean value to set the parameter to -## Set Anim Float +# Set Anim Float # {#SetAnimFloat} Sets a float parameter on an Animator component to control a Unity animation Defined in Fungus.Commands.SetAnimFloat @@ -44,7 +45,7 @@ _animator | Fungus.Variables.AnimatorData | Reference to an Animator component i _parameter Name | Fungus.Variables.StringData | Name of the float Animator parameter that will have its value changed Value | Fungus.Variables.FloatData | The float value to set the parameter to -## Set Anim Integer +# Set Anim Integer # {#SetAnimInteger} Sets an integer parameter on an Animator component to control a Unity animation Defined in Fungus.Commands.SetAnimInteger @@ -55,7 +56,7 @@ _animator | Fungus.Variables.AnimatorData | Reference to an Animator component i _parameter Name | Fungus.Variables.StringData | Name of the integer Animator parameter that will have its value changed Value | Fungus.Variables.IntegerData | The integer value to set the parameter to -## Set Anim Trigger +# Set Anim Trigger # {#SetAnimTrigger} Sets a trigger parameter on an Animator component to control a Unity animation Defined in Fungus.Commands.SetAnimTrigger diff --git a/Docs/command_ref/audio_commands.md b/Docs/command_ref/audio_commands.md index 95e97df3..6aa611cb 100644 --- a/Docs/command_ref/audio_commands.md +++ b/Docs/command_ref/audio_commands.md @@ -1,6 +1,7 @@ -# Audio commands {#audio_commands} +# Audio commands # {#audio_commands} -## Control Audio +[TOC] +# Control Audio # {#ControlAudio} Plays, loops, or stops an audiosource. Any AudioSources with the same tag as the target Audio Source will automatically be stoped. Defined in Fungus.Commands.ControlAudio @@ -14,7 +15,7 @@ End Volume | System.Single | End audio at this volume Fade Duration | System.Single | Time to fade between current volume level and target volume level. Wait Until Finished | System.Boolean | Wait until this command has finished before executing the next command. -## Play Music +# Play Music # {#PlayMusic} Plays looping game music. If any game music is already playing, it is stopped. Game music will continue playing across scene loads. Defined in Fungus.Commands.PlayMusic @@ -26,7 +27,7 @@ At Time | System.Single | Time to begin playing in seconds. If the audio file is Loop | System.Boolean | The music will start playing again at end. Fade Duration | System.Single | Length of time to fade out previous playing music. -## Play Sound +# Play Sound # {#PlaySound} Plays a once-off sound effect. Multiple sound effects can be played at the same time. Defined in Fungus.Commands.PlaySound @@ -37,7 +38,7 @@ Sound Clip | UnityEngine.AudioClip | Sound effect clip to play Volume | System.Single | Volume level of the sound effect Wait Until Finished | System.Boolean | Wait until the sound has finished playing before continuing execution. -## Play Usfxr Sound +# Play Usfxr Sound # {#PlayUsfxrSound} 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. Defined in Fungus.Commands.PlayUsfxrSound @@ -48,7 +49,7 @@ Parent Transform | UnityEngine.Transform | Transform to use for positional audio _ Settings String | Fungus.Variables.StringDataMulti | Settings string which describes the audio Wait Duration | System.Single | Time to wait before executing the next command -## Set Audio Pitch +# Set Audio Pitch # {#SetAudioPitch} Sets the global pitch level for audio played with Play Music and Play Sound commands. Defined in Fungus.Commands.SetAudioPitch @@ -59,7 +60,7 @@ Pitch | System.Single | Global pitch level for audio played using the Play Music Fade Duration | System.Single | Time to fade between current pitch level and target pitch level. Wait Until Finished | System.Boolean | Wait until the pitch change has finished before executing next command -## Set Audio Volume +# Set Audio Volume # {#SetAudioVolume} Sets the global volume level for audio played with Play Music and Play Sound commands. Defined in Fungus.Commands.SetAudioVolume @@ -70,7 +71,7 @@ Volume | System.Single | Global volume level for audio played using Play Music a Fade Duration | System.Single | Time to fade between current volume level and target volume level. Wait Until Finished | System.Boolean | Wait until the volume fade has completed before continuing. -## Stop Music +# Stop Music # {#StopMusic} Stops the currently playing game music. Defined in Fungus.Commands.StopMusic diff --git a/Docs/command_ref/camera_commands.md b/Docs/command_ref/camera_commands.md index 9d02d0f9..b5c6eb49 100644 --- a/Docs/command_ref/camera_commands.md +++ b/Docs/command_ref/camera_commands.md @@ -1,6 +1,7 @@ -# Camera commands {#camera_commands} +# Camera commands # {#camera_commands} -## Fade Screen +[TOC] +# Fade Screen # {#FadeScreen} Draws a fullscreen texture over the scene to give a fade effect. Setting Target Alpha to 1 will obscure the screen, alpha 0 will reveal the screen. If no Fade Texture is provided then a default flat color texture is used. Defined in Fungus.Commands.FadeScreen @@ -13,7 +14,7 @@ Wait Until Finished | System.Boolean | Wait until the fade has finished before e Fade Color | UnityEngine.Color | Color to render fullscreen fade texture with when screen is obscured. Fade Texture | UnityEngine.Texture2D | Optional texture to use when rendering the fullscreen fade effect. -## Fade To View +# Fade To View # {#FadeToView} Fades the camera out and in again at a position specified by a View object. Defined in Fungus.Commands.FadeToView @@ -28,11 +29,11 @@ Fade Color | UnityEngine.Color | Color to render fullscreen fade texture with wh Fade Texture | UnityEngine.Texture2D | Optional texture to use when rendering the fullscreen fade effect. Target Camera | UnityEngine.Camera | Camera to use for the fade. Will use main camera if set to none. -## Fullscreen +# Fullscreen # {#Fullscreen} Sets the application to fullscreen, windowed or toggles the current state. Defined in Fungus.Commands.Fullscreen -## Move To View +# Move To View # {#MoveToView} Moves the camera to a location specified by a View object. Defined in Fungus.Commands.MoveToView @@ -44,7 +45,7 @@ Target View | Fungus.View | View to transition to when move is complete Wait Until Finished | System.Boolean | Wait until the fade has finished before executing next command Target Camera | UnityEngine.Camera | Camera to use for the pan. Will use main camera if set to none. -## Shake Camera +# Shake Camera # {#ShakeCamera} Applies a camera shake effect to the main camera. Defined in Fungus.Commands.ShakeCamera @@ -55,7 +56,7 @@ Duration | System.Single | Time for camera shake effect to complete Amount | UnityEngine.Vector2 | Magnitude of shake effect in x & y axes Wait Until Finished | System.Boolean | Wait until the shake effect has finished before executing next command -## Start Swipe +# Start Swipe # {#StartSwipe} Activates swipe panning mode where the player can pan the camera within the area between viewA & viewB. Defined in Fungus.Commands.StartSwipe @@ -68,7 +69,7 @@ Duration | System.Single | Time to move the camera to a valid starting position Speed Multiplier | System.Single | Multiplier factor for speed of swipe pan Target Camera | UnityEngine.Camera | Camera to use for the pan. Will use main camera if set to none. -## Stop Swipe +# Stop Swipe # {#StopSwipe} Deactivates swipe panning mode. Defined in Fungus.Commands.StopSwipe diff --git a/Docs/command_ref/core_events.md b/Docs/command_ref/core_events.md index 11384bd3..adda0c22 100644 --- a/Docs/command_ref/core_events.md +++ b/Docs/command_ref/core_events.md @@ -1,14 +1,15 @@ -# Core event handlers {#core_events} +# Core event handlers # {#core_events} -## Flowchart Enabled +[TOC] +# Flowchart Enabled # {#FlowchartEnabled} The block will execute when the Flowchart game object is enabled. Defined in Fungus.EventHandlers.FlowchartEnabled -## Game Started +# Game Started # {#GameStarted} The block will execute when the game starts playing. Defined in Fungus.EventHandlers.GameStarted -## Message Received +# Message Received # {#MessageReceived} The block will execute when the specified message is received from a Send Message command. Defined in Fungus.EventHandlers.MessageReceived diff --git a/Docs/command_ref/flow_commands.md b/Docs/command_ref/flow_commands.md index 58e01d6e..77bb6ff8 100644 --- a/Docs/command_ref/flow_commands.md +++ b/Docs/command_ref/flow_commands.md @@ -1,10 +1,11 @@ -# Flow commands {#flow_commands} +# Flow commands # {#flow_commands} -## Break +[TOC] +# Break # {#Break} Force a loop to terminate immediately. Defined in Fungus.Commands.Break -## Call +# Call # {#Call} Execute another block in the same Flowchart as the command, or in a different Flowchart. Defined in Fungus.Commands.Call @@ -16,11 +17,11 @@ Target Block | Fungus.Block | Block to start executing Start Index | System.Int32 | Command index to start executing Call Mode | Fungus.Commands.CallMode | Select if the calling block should stop or continue executing commands, or wait until the called block finishes. -## Else +# Else # {#Else} Marks the start of a command block to be executed when the preceding If statement is False. Defined in Fungus.Commands.Else -## Else If +# Else If # {#ElseIf} Marks the start of a command block to be executed when the preceding If statement is False and the test expression is true. Defined in Fungus.Commands.ElseIf @@ -34,11 +35,11 @@ Float Data | Fungus.Variables.FloatData | Float value to compare against String Data | Fungus.Variables.StringDataMulti | String value to compare against Compare Operator | Fungus.CompareOperator | The type of comparison to be performed -## End +# End # {#End} Marks the end of a conditional block. Defined in Fungus.Commands.End -## If +# If # {#If} If the test expression is true, execute the following command block. Defined in Fungus.Commands.If @@ -52,7 +53,7 @@ Float Data | Fungus.Variables.FloatData | Float value to compare against String Data | Fungus.Variables.StringDataMulti | String value to compare against Compare Operator | Fungus.CompareOperator | The type of comparison to be performed -## Jump +# Jump # {#Jump} Move execution to a specific Label command in the same block Defined in Fungus.Commands.Jump @@ -61,7 +62,7 @@ Property | Type | Description --- | --- | --- _target Label | Fungus.Variables.StringData | Name of a label in this block to jump to -## Label +# Label # {#Label} Marks a position in the command list for execution to jump to. Defined in Fungus.Commands.Label @@ -70,7 +71,7 @@ Property | Type | Description --- | --- | --- Key | System.String | Display name for the label -## Load Scene +# Load Scene # {#LoadScene} Loads a new Unity scene and displays an optional loading image. This is useful for splitting a large game across multiple scene files to reduce peak memory 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. Defined in Fungus.Commands.LoadScene @@ -80,11 +81,11 @@ Property | Type | Description _scene Name | Fungus.Variables.StringData | Name of the scene to load. The scene must also be added to the build settings. Loading Image | UnityEngine.Texture2D | Image to display while loading the scene -## Quit +# Quit # {#Quit} Quits the application. Does not work in Editor or Webplayer builds. Shouldn't generally be used on iOS. Defined in Fungus.Commands.Quit -## Send Message +# Send Message # {#SendMessage} 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. Defined in Fungus.Commands.SendMessage @@ -94,11 +95,11 @@ Property | Type | Description Message Target | Fungus.Commands.MessageTarget | Target flowchart(s) to send the message to _message | Fungus.Variables.StringData | Name of the message to send -## Stop +# Stop # {#Stop} Stop executing the Block that contains this command. Defined in Fungus.Commands.Stop -## Stop Block +# Stop Block # {#StopBlock} Stops executing the named Block Defined in Fungus.Commands.StopBlock @@ -108,7 +109,7 @@ Property | Type | Description Flowchart | Fungus.Flowchart | Flowchart containing the Block. If none is specified, the parent Flowchart is used. Block Name | Fungus.Variables.StringData | Name of the Block to stop -## Stop Flowchart +# Stop Flowchart # {#StopFlowchart} Stops execution of all Blocks in a Flowchart Defined in Fungus.Commands.StopFlowchart @@ -118,7 +119,7 @@ Property | Type | Description Stop Parent Flowchart | System.Boolean | Stop all executing Blocks in the Flowchart that contains this command Target Flowcharts | System.Collections.Generic.List`1[Fungus.Flowchart] | Stop all executing Blocks in a list of target Flowcharts -## Wait +# Wait # {#Wait} Waits for period of time before executing the next command in the block. Defined in Fungus.Commands.Wait @@ -127,7 +128,7 @@ Property | Type | Description --- | --- | --- _duration | Fungus.Variables.FloatData | Duration to wait for -## WaitInput +# WaitInput # {#WaitInput} Waits for a period of time or for player input before executing the next command in the block. Defined in WaitInput @@ -136,7 +137,7 @@ Property | Type | Description --- | --- | --- Duration | System.Single | Duration to wait for. If negative will wait until player input occurs. -## While +# While # {#While} Continuously loop through a block of commands while the condition is true. Use the Break command to force the loop to terminate immediately. Defined in Fungus.Commands.While diff --git a/Docs/command_ref/input_events.md b/Docs/command_ref/input_events.md index 2d57afd8..4075c80a 100644 --- a/Docs/command_ref/input_events.md +++ b/Docs/command_ref/input_events.md @@ -1,6 +1,7 @@ -# Input event handlers {#input_events} +# Input event handlers # {#input_events} -## Key Pressed +[TOC] +# Key Pressed # {#KeyPressed} The block will execute when a key press event occurs. Defined in Fungus.EventHandlers.KeyPressed diff --git a/Docs/command_ref/itween_commands.md b/Docs/command_ref/itween_commands.md index 40f8aa9f..6edc90fd 100644 --- a/Docs/command_ref/itween_commands.md +++ b/Docs/command_ref/itween_commands.md @@ -1,6 +1,7 @@ -# iTween commands {#itween_commands} +# iTween commands # {#itween_commands} -## Look From +[TOC] +# Look From # {#LookFrom} Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time. Defined in Fungus.Commands.LookFrom @@ -18,7 +19,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Look To +# Look To # {#LookTo} Rotates a GameObject to look at a supplied Transform or Vector3 over time. Defined in Fungus.Commands.LookTo @@ -36,7 +37,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Move Add +# Move Add # {#MoveAdd} Moves a game object by a specified offset over time. Defined in Fungus.Commands.MoveAdd @@ -53,7 +54,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Move From +# Move From # {#MoveFrom} 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). Defined in Fungus.Commands.MoveFrom @@ -71,7 +72,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Move To +# Move To # {#MoveTo} 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). Defined in Fungus.Commands.MoveTo @@ -89,7 +90,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Punch Position +# Punch Position # {#PunchPosition} Applies a jolt of force to a GameObject's position and wobbles it back to its initial position. Defined in Fungus.Commands.PunchPosition @@ -106,7 +107,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Punch Rotation +# Punch Rotation # {#PunchRotation} Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation. Defined in Fungus.Commands.PunchRotation @@ -123,7 +124,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Punch Scale +# Punch Scale # {#PunchScale} Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale. Defined in Fungus.Commands.PunchScale @@ -139,7 +140,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Rotate Add +# Rotate Add # {#RotateAdd} Rotates a game object by the specified angles over time. Defined in Fungus.Commands.RotateAdd @@ -156,7 +157,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Rotate From +# Rotate From # {#RotateFrom} Rotates a game object from the specified angles back to its starting orientation over time. Defined in Fungus.Commands.RotateFrom @@ -174,7 +175,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Rotate To +# Rotate To # {#RotateTo} Rotates a game object to the specified angles over time. Defined in Fungus.Commands.RotateTo @@ -192,7 +193,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Scale Add +# Scale Add # {#ScaleAdd} Changes a game object's scale by a specified offset over time. Defined in Fungus.Commands.ScaleAdd @@ -208,7 +209,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Scale From +# Scale From # {#ScaleFrom} Changes a game object's scale to the specified value and back to its original scale over time. Defined in Fungus.Commands.ScaleFrom @@ -225,7 +226,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Scale To +# Scale To # {#ScaleTo} Changes a game object's scale to a specified value over time. Defined in Fungus.Commands.ScaleTo @@ -242,7 +243,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Shake Position +# Shake Position # {#ShakePosition} Randomly shakes a GameObject's position by a diminishing amount over time. Defined in Fungus.Commands.ShakePosition @@ -260,7 +261,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Shake Rotation +# Shake Rotation # {#ShakeRotation} Randomly shakes a GameObject's rotation by a diminishing amount over time. Defined in Fungus.Commands.ShakeRotation @@ -277,7 +278,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Shake Scale +# Shake Scale # {#ShakeScale} Randomly shakes a GameObject's rotation by a diminishing amount over time. Defined in Fungus.Commands.ShakeScale @@ -293,7 +294,7 @@ Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animatio Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -## Stop Tween +# Stop Tween # {#StopTween} Stops an active iTween by name. Defined in Fungus.Commands.StopTween @@ -302,7 +303,7 @@ Property | Type | Description --- | --- | --- _tween Name | Fungus.Variables.StringData | Stop and destroy any Tweens in current scene with the supplied name -## Stop Tweens +# Stop Tweens # {#StopTweens} Stop all active iTweens in the current scene. Defined in Fungus.Commands.StopTweens diff --git a/Docs/command_ref/narrative_commands.md b/Docs/command_ref/narrative_commands.md index f1bb1656..8863db7f 100644 --- a/Docs/command_ref/narrative_commands.md +++ b/Docs/command_ref/narrative_commands.md @@ -1,6 +1,7 @@ -# Narrative commands {#narrative_commands} +# Narrative commands # {#narrative_commands} -## Clear Menu +[TOC] +# Clear Menu # {#ClearMenu} Clears the options from a menu dialogue Defined in Fungus.Commands.ClearMenu @@ -9,7 +10,7 @@ Property | Type | Description --- | --- | --- Menu Dialog | Fungus.MenuDialog | Menu Dialog to clear the options on -## Control Stage +# Control Stage # {#ControlStage} Controls the stage on which character portraits are displayed. Defined in Fungus.Commands.ControlStage @@ -23,11 +24,11 @@ Fade Duration | System.Single | Fade Duration Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command Display | Fungus.Commands.StageDisplayType | Display type -## Conversation +# Conversation # {#Conversation} Do multiple say and portrait commands in a single block of text. Format is: [character] [portrait] [stage position] [: Story text] Defined in Fungus.Commands.Conversation -## Menu +# Menu # {#Menu} Displays a button in a multiple choice menu Defined in Fungus.Commands.Menu @@ -41,7 +42,7 @@ Hide If Visited | System.Boolean | Hide this option if the target block has been Interactable | Fungus.Variables.BooleanData | If false, the menu option will be displayed but will not be selectable Set Menu Dialog | Fungus.MenuDialog | A custom Menu Dialog to use to display this menu. All subsequent Menu commands will use this dialog. -## Menu Timer +# Menu Timer # {#MenuTimer} Displays a timer bar and executes a target block if the player fails to select a menu option in time. Defined in Fungus.Commands.MenuTimer @@ -51,7 +52,7 @@ Property | Type | Description _duration | Fungus.Variables.FloatData | Length of time to display the timer for Target Block | Fungus.Block | Block to execute when the timer expires -## Portrait +# Portrait # {#Portrait} Controls a character portrait. Defined in Fungus.Commands.Portrait @@ -75,7 +76,7 @@ Shift Into Place | System.Boolean | Start from offset Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command Display | Fungus.DisplayType | Display type -## Say +# Say # {#Say} Writes text in a dialog box. Defined in Fungus.Commands.Say @@ -94,7 +95,7 @@ Wait For Click | System.Boolean | Wait for player to click before continuing. Stop Voiceover | System.Boolean | Stop playing voiceover when text finishes writing. Set Say Dialog | Fungus.SayDialog | Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog. -## Set Language +# Set Language # {#SetLanguage} Set the active language for the scene. A Localization object with a localization file must be present in the scene. Defined in Fungus.Commands.SetLanguage @@ -103,7 +104,7 @@ Property | Type | Description --- | --- | --- _language Code | Fungus.Variables.StringData | Code of the language to set. e.g. ES, DE, JA -## Set Menu Dialog +# Set Menu Dialog # {#SetMenuDialog} Sets a custom menu dialog to use when displaying multiple choice menus Defined in Fungus.Commands.SetMenuDialog @@ -112,7 +113,7 @@ Property | Type | Description --- | --- | --- Menu Dialog | Fungus.MenuDialog | The Menu Dialog to use for displaying menu buttons -## Set Say Dialog +# Set Say Dialog # {#SetSayDialog} Sets a custom say dialog to use when displaying story text Defined in Fungus.Commands.SetSayDialog diff --git a/Docs/command_ref/scripting_commands.md b/Docs/command_ref/scripting_commands.md index a8489ce0..853ac0b5 100644 --- a/Docs/command_ref/scripting_commands.md +++ b/Docs/command_ref/scripting_commands.md @@ -1,6 +1,7 @@ -# Scripting commands {#scripting_commands} +# Scripting commands # {#scripting_commands} -## Comment +[TOC] +# Comment # {#Comment} Use comments to record design notes and reminders about your game. Defined in Fungus.Commands.Comment @@ -10,7 +11,7 @@ Property | Type | Description Commenter Name | System.String | Name of Commenter Comment Text | System.String | Text to display for this comment -## Call Method +# Call Method # {#CallMethod} Calls a named method on a GameObject using the GameObject.SendMessage() system. Defined in Fungus.Commands.CallMethod @@ -21,7 +22,7 @@ Target Object | UnityEngine.GameObject | Target monobehavior which contains the Method Name | System.String | Name of the method to call Delay | System.Single | Delay (in seconds) before the method will be called -## Debug Log +# Debug Log # {#DebugLog} Writes a log message to the debug console. Defined in Fungus.Commands.DebugLog @@ -31,7 +32,7 @@ Property | Type | Description Log Type | Fungus.Commands.DebugLogType | Display type of debug log info Log Message | Fungus.Variables.StringDataMulti | Text to write to the debug log. Supports variable substitution, e.g. {$Myvar} -## Destroy +# Destroy # {#Destroy} Destroys a specified game object in the scene. Defined in Fungus.Commands.Destroy @@ -40,7 +41,7 @@ Property | Type | Description --- | --- | --- _target Game Object | Fungus.Variables.GameObjectData | Reference to game object to destroy -## Execute Lua +# Execute Lua # {#ExecuteLua} Executes a Lua code chunk using a Lua Environment. Defined in Fungus.Commands.ExecuteLua @@ -54,7 +55,7 @@ Run As Coroutine | System.Boolean | Execute this Lua script as a Lua coroutine Wait Until Finished | System.Boolean | Pause command execution until the Lua script has finished execution Return Variable | Fungus.Variable | A Flowchart variable to store the returned value in. -## Invoke Event +# Invoke Event # {#InvokeEvent} Calls a list of component methods via the Unity Event System (as used in the Unity UI). This command is more efficient than the Invoke Method command but can only pass a single parameter and doesn't support return values. Defined in Fungus.Commands.InvokeEvent @@ -72,7 +73,7 @@ Float Event | Fungus.Commands.InvokeEvent+FloatEvent | List of methods to call. String Parameter | Fungus.Variables.StringDataMulti | String parameter to pass to the invoked methods. String Event | Fungus.Commands.InvokeEvent+StringEvent | List of methods to call. Supports methods with one string parameter. -## Invoke Method +# Invoke Method # {#InvokeMethod} Invokes a method of a component via reflection. Supports passing multiple parameters and storing returned values in a Fungus variable. Defined in Fungus.Commands.InvokeMethod @@ -92,7 +93,7 @@ Return Value Type | System.String | The type of the return value Show Inherited | System.Boolean | If true, list all inherited methods for the component Call Mode | Fungus.Commands.CallMode | The coroutine call behavior for methods that return IEnumerator -## Open URL +# Open URL # {#OpenURL} Opens the specified URL in the browser. Defined in Fungus.Commands.LinkToWebsite @@ -101,7 +102,7 @@ Property | Type | Description --- | --- | --- Url | Fungus.Variables.StringData | URL to open in the browser -## Set Active +# Set Active # {#SetActive} Sets a game object in the scene to be active / inactive. Defined in Fungus.Commands.SetActive @@ -111,7 +112,7 @@ Property | Type | Description _target Game Object | Fungus.Variables.GameObjectData | Reference to game object to enable / disable Active State | Fungus.Variables.BooleanData | Set to true to enable the game object -## Spawn Object +# Spawn Object # {#SpawnObject} Spawns a new object based on a reference to a scene or prefab game object. Defined in Fungus.Commands.SpawnObject diff --git a/Docs/command_ref/sprite_commands.md b/Docs/command_ref/sprite_commands.md index 26ff919e..16e024ee 100644 --- a/Docs/command_ref/sprite_commands.md +++ b/Docs/command_ref/sprite_commands.md @@ -1,6 +1,7 @@ -# Sprite commands {#sprite_commands} +# Sprite commands # {#sprite_commands} -## Fade Sprite +[TOC] +# Fade Sprite # {#FadeSprite} Fades a sprite to a target color over a period of time. Defined in Fungus.Commands.FadeSprite @@ -12,7 +13,7 @@ _duration | Fungus.Variables.FloatData | Length of time to perform the fade _target Color | Fungus.Variables.ColorData | Target color to fade to. To only fade transparency level, set the color to white and set the alpha to required transparency. Wait Until Finished | System.Boolean | Wait until the fade has finished before executing the next command -## Set Clickable 2D +# Set Clickable 2D # {#SetClickable2D} Sets a Clickable2D component to be clickable / non-clickable. Defined in Fungus.Commands.SetClickable2D @@ -22,7 +23,7 @@ Property | Type | Description Target Clickable2 D | Fungus.Clickable2D | Reference to Clickable2D component on a gameobject Active State | Fungus.Variables.BooleanData | Set to true to enable the component -## Set Collider +# Set Collider # {#SetCollider} Sets all collider (2d or 3d) components on the target objects to be active / inactive Defined in Fungus.Commands.SetCollider @@ -33,7 +34,7 @@ Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | A l Target Tag | System.String | All objects with this tag will have their collider set active / inactive Active State | Fungus.Variables.BooleanData | Set to true to enable the collider components -## Set Draggable 2D +# Set Draggable 2D # {#SetDraggable2D} Sets a Draggable2D component to be draggable / non-draggable. Defined in Fungus.Commands.SetDraggable2D @@ -43,7 +44,7 @@ Property | Type | Description Target Draggable2 D | Fungus.Draggable2D | Reference to Draggable2D component on a gameobject Active State | Fungus.Variables.BooleanData | Set to true to enable the component -## Set Mouse Cursor +# Set Mouse Cursor # {#SetMouseCursor} Sets the mouse cursor sprite. Defined in Fungus.Commands.SetMouseCursor @@ -53,7 +54,7 @@ Property | Type | Description Cursor Texture | UnityEngine.Texture2D | Texture to use for cursor. Will use default mouse cursor if no sprite is specified Hot Spot | UnityEngine.Vector2 | The offset from the top left of the texture to use as the target point -## Set Sorting Layer +# Set Sorting Layer # {#SetSortingLayer} Sets the Renderer sorting layer of every child of a game object. Applies to all Renderers (including mesh, skinned mesh, and sprite). Defined in Fungus.Commands.SetSortingLayer @@ -63,7 +64,7 @@ Property | Type | Description Target Object | UnityEngine.GameObject | Root Object that will have the Sorting Layer set. Any children will also be affected Sorting Layer | System.String | The New Layer Name to apply -## Set Sprite Order +# Set Sprite Order # {#SetSpriteOrder} Controls the render order of sprites by setting the Order In Layer property of a list of sprites. Defined in Fungus.Commands.SetSpriteOrder @@ -73,7 +74,7 @@ Property | Type | Description Target Sprites | System.Collections.Generic.List`1[UnityEngine.SpriteRenderer] | List of sprites to set the order in layer property on Order In Layer | Fungus.Variables.IntegerData | The order in layer value to set on the target sprites -## Show Sprite +# Show Sprite # {#ShowSprite} Makes a sprite visible / invisible by setting the color alpha. Defined in Fungus.Commands.ShowSprite diff --git a/Docs/command_ref/sprite_events.md b/Docs/command_ref/sprite_events.md index 2a46fc89..26a29b6b 100644 --- a/Docs/command_ref/sprite_events.md +++ b/Docs/command_ref/sprite_events.md @@ -1,6 +1,7 @@ -# Sprite event handlers {#sprite_events} +# Sprite event handlers # {#sprite_events} -## Drag Cancelled +[TOC] +# Drag Cancelled # {#DragCancelled} The block will execute when the player drags an object and releases it without dropping it on a target object. Defined in Fungus.EventHandlers.DragCancelled @@ -9,7 +10,7 @@ Property | Type | Description --- | --- | --- Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on -## Drag Completed +# Drag Completed # {#DragCompleted} The block will execute when the player drags an object and successfully drops it on a target object. Defined in Fungus.EventHandlers.DragCompleted @@ -19,7 +20,7 @@ Property | Type | Description Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on Target Object | UnityEngine.Collider2D | Drag target object to listen for drag events on -## Drag Entered +# Drag Entered # {#DragEntered} The block will execute when the player is dragging an object which starts touching the target object. Defined in Fungus.EventHandlers.DragEntered @@ -29,7 +30,7 @@ Property | Type | Description Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on Target Object | UnityEngine.Collider2D | Drag target object to listen for drag events on -## Drag Exited +# Drag Exited # {#DragExited} The block will execute when the player is dragging an object which stops touching the target object. Defined in Fungus.EventHandlers.DragExited @@ -39,11 +40,11 @@ Property | Type | Description Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on Target Object | UnityEngine.Collider2D | Drag target object to listen for drag events on -## Drag Started +# Drag Started # {#DragStarted} The block will execute when the player starts dragging an object. Defined in Fungus.EventHandlers.DragStarted -## Object Clicked +# Object Clicked # {#ObjectClicked} The block will execute when the user clicks or taps on the clickable object. Defined in Fungus.EventHandlers.ObjectClicked diff --git a/Docs/command_ref/tests_commands.md b/Docs/command_ref/tests_commands.md index be58d7da..3755df33 100644 --- a/Docs/command_ref/tests_commands.md +++ b/Docs/command_ref/tests_commands.md @@ -1,14 +1,15 @@ -# Tests commands {#tests_commands} +# Tests commands # {#tests_commands} -## Fail +[TOC] +# Fail # {#Fail} Fails the current integration test Defined in Fungus.FailTest -## Pass +# Pass # {#Pass} Passes the current integration test Defined in Fungus.PassTest -## TestNarrative +# TestNarrative # {#TestNarrative} Test command for narrative integration tests Defined in NarrativeTests diff --git a/Docs/command_ref/ui_commands.md b/Docs/command_ref/ui_commands.md index c0ac2d1f..b195bcb8 100644 --- a/Docs/command_ref/ui_commands.md +++ b/Docs/command_ref/ui_commands.md @@ -1,6 +1,7 @@ -# UI commands {#ui_commands} +# UI commands # {#ui_commands} -## Fade UI +[TOC] +# Fade UI # {#FadeUI} Fades a UI object Defined in Fungus.Commands.FadeUI @@ -12,7 +13,7 @@ Tween Type | LeanTweenType | Type of tween easing to apply Wait Until Finished | Fungus.Variables.BooleanData | Wait until this command completes before continuing execution Duration | Fungus.Variables.FloatData | Time for the tween to complete -## Get Text +# Get Text # {#GetText} Gets the text property from a UI Text object and stores it in a string variable. Defined in Fungus.Commands.GetText @@ -22,7 +23,7 @@ Property | Type | Description Target Text Object | UnityEngine.GameObject | Text object to get text value from String Variable | Fungus.Variables.StringVariable | String variable to store the text value in -## Set Interactable +# Set Interactable # {#SetInteractable} Set the interactable sate of selectable objects. Defined in Fungus.Commands.SetInteractable @@ -32,7 +33,7 @@ Property | Type | Description Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | List of objects to be affected by the command Interactable State | Fungus.Variables.BooleanData | Controls if the selectable UI object be interactable or not -## Set Slider Value +# Set Slider Value # {#SetSliderValue} Sets the value property of a slider object Defined in Fungus.Commands.SetSliderValue @@ -42,7 +43,7 @@ Property | Type | Description Slider | UnityEngine.UI.Slider | Target slider object to set the value on Value | Fungus.Variables.FloatData | Float value to set the slider value to. -## Set Text +# Set Text # {#SetText} Sets the text property on a UI Text object and/or an Input Field object. Defined in Fungus.Commands.SetText @@ -53,7 +54,7 @@ Target Text Object | UnityEngine.GameObject | Text object to set text on. Can be Text | Fungus.Variables.StringDataMulti | String value to assign to the text object Description | System.String | Notes about this story text for other authors, localization, etc. -## Write +# Write # {#Write} Writes content to a UI Text or Text Mesh object. Defined in Fungus.Commands.Write diff --git a/Docs/command_ref/ui_events.md b/Docs/command_ref/ui_events.md index 6ee82a0b..a01acb0d 100644 --- a/Docs/command_ref/ui_events.md +++ b/Docs/command_ref/ui_events.md @@ -1,6 +1,7 @@ -# UI event handlers {#ui_events} +# UI event handlers # {#ui_events} -## Button Clicked +[TOC] +# Button Clicked # {#ButtonClicked} The block will execute when the user clicks on the target UI button object. Defined in Fungus.EventHandlers.ButtonClicked @@ -9,7 +10,7 @@ Property | Type | Description --- | --- | --- Target Button | UnityEngine.UI.Button | The UI Button that the user can click on -## End Edit +# End Edit # {#EndEdit} The block will execute when the user finishes editing the text in the input field. Defined in Fungus.EventHandlers.EndEdit diff --git a/Docs/command_ref/variable_commands.md b/Docs/command_ref/variable_commands.md index 2a0e4b32..5becc98f 100644 --- a/Docs/command_ref/variable_commands.md +++ b/Docs/command_ref/variable_commands.md @@ -1,6 +1,7 @@ -# Variable commands {#variable_commands} +# Variable commands # {#variable_commands} -## Delete Save Key +[TOC] +# Delete Save Key # {#DeleteSaveKey} Deletes a saved value from permanent storage. Defined in Fungus.Commands.DeleteSaveKey @@ -9,7 +10,7 @@ Property | Type | Description --- | --- | --- Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber} -## Load Variable +# Load Variable # {#LoadVariable} Loads a saved value and stores it in a Boolean, Integer, Float or String variable. If the key is not found then the variable is not modified. Defined in Fungus.Commands.LoadVariable @@ -19,7 +20,7 @@ Property | Type | Description Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber}" Variable | Fungus.Variable | Variable to store the value in. -## Random Float +# Random Float # {#RandomFloat} Sets an float variable to a random value in the defined range. Defined in Fungus.Commands.RandomFloat @@ -30,7 +31,7 @@ Variable | Fungus.Variables.FloatVariable | The variable whos value will be set Min Value | Fungus.Variables.FloatData | Minimum value for random range Max Value | Fungus.Variables.FloatData | Maximum value for random range -## Random Integer +# Random Integer # {#RandomInteger} Sets an integer variable to a random value in the defined range. Defined in Fungus.Commands.RandomInteger @@ -41,7 +42,7 @@ Variable | Fungus.Variables.IntegerVariable | The variable whos value will be se Min Value | Fungus.Variables.IntegerData | Minimum value for random range Max Value | Fungus.Variables.IntegerData | Maximum value for random range -## Read Text File +# Read Text File # {#ReadTextFile} Reads in a text file and stores the contents in a string variable Defined in Fungus.Commands.ReadTextFile @@ -51,7 +52,7 @@ Property | Type | Description Text File | UnityEngine.TextAsset | Text file to read into the string variable String Variable | Fungus.Variables.StringVariable | String variable to store the tex file contents in -## Reset +# Reset # {#Reset} Resets the state of all commands and variables in the Flowchart. Defined in Fungus.Commands.Reset @@ -61,7 +62,7 @@ Property | Type | Description Reset Commands | System.Boolean | Reset state of all commands in the script Reset Variables | System.Boolean | Reset variables back to their default values -## Save Variable +# Save Variable # {#SaveVariable} Save an Boolean, Integer, Float or String variable to persistent storage using a string key. The value can be loaded again later using the Load Variable command. You can also use the Set Save Profile command to manage separate save profiles for multiple players. Defined in Fungus.Commands.SaveVariable @@ -71,7 +72,7 @@ Property | Type | Description Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber} Variable | Fungus.Variable | Variable to read the value from. Only Boolean, Integer, Float and String are supported. -## Set Save Profile +# Set Save Profile # {#SetSaveProfile} Sets the active profile that the Save Variable and Load Variable commands will use. This is useful to crete multiple player save games. Once set, the profile applies across all Flowcharts and will also persist across scene loads. Defined in Fungus.Commands.SetSaveProfile @@ -80,7 +81,7 @@ Property | Type | Description --- | --- | --- Save Profile Name | System.String | Name of save profile to make active. -## Set Variable +# Set Variable # {#SetVariable} Sets a Boolean, Integer, Float or String variable to a new value using a simple arithmetic operation. The value can be a constant or reference another variable of the same type. Defined in Fungus.Commands.SetVariable