diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index 162edbd3..58f86f05 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -532,7 +532,7 @@ namespace Fungus.EditorUtils // Output the commands in each category foreach (string category in commandCategories) { - string markdown = ""; + string markdown = "# " + category + " commands {#" + category.ToLower() + "_commands}\n\n"; foreach(var keyPair in filteredAttributes) { CommandInfoAttribute info = keyPair.Value; @@ -546,7 +546,7 @@ namespace Fungus.EditorUtils } } - string filePath = path + "/commands/" + category.ToLower() + "_commands.md"; + string filePath = path + "/command_ref/" + category.ToLower() + "_commands.md"; Directory.CreateDirectory(Path.GetDirectoryName(filePath)); File.WriteAllText(filePath, markdown); @@ -573,8 +573,8 @@ namespace Fungus.EditorUtils // Output the commands in each category foreach (string category in eventHandlerCategories) { - string markdown = ""; - + string markdown = "# " + category + " event handlers {#" + category.ToLower() + "_events}\n\n"; + foreach (System.Type type in eventHandlerTypes) { EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type); @@ -589,7 +589,7 @@ namespace Fungus.EditorUtils } } - string filePath = path + "/event_handlers/" + category.ToLower() + "_events.md"; + string filePath = path + "/command_ref/" + category.ToLower() + "_events.md"; Directory.CreateDirectory(Path.GetDirectoryName(filePath)); File.WriteAllText(filePath, markdown); diff --git a/Docs/command_ref/animation_commands.md b/Docs/command_ref/animation_commands.md new file mode 100644 index 00000000..41587cf9 --- /dev/null +++ b/Docs/command_ref/animation_commands.md @@ -0,0 +1,55 @@ +# Animation commands {#animation_commands} + +## Play Anim State +Plays a state of an animator according to the state name + +Property | Type | Description + --- | --- | --- +Animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object +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 +Resets a trigger parameter on an Animator component. + +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 +Sets a boolean parameter on an Animator component to control a Unity animation + +Property | Type | Description + --- | --- | --- +_animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object +_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 +Sets a float parameter on an Animator component to control a Unity animation + +Property | Type | Description + --- | --- | --- +_animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object +_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 +Sets an integer parameter on an Animator component to control a Unity animation + +Property | Type | Description + --- | --- | --- +_animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object +_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 +Sets a trigger parameter on an Animator component to control a Unity animation + +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 have its value changed + diff --git a/Docs/commands/audio_commands.md b/Docs/command_ref/audio_commands.md similarity index 91% rename from Docs/commands/audio_commands.md rename to Docs/command_ref/audio_commands.md index 3531a676..be2c461e 100644 --- a/Docs/commands/audio_commands.md +++ b/Docs/command_ref/audio_commands.md @@ -1,10 +1,12 @@ +# Audio commands {#audio_commands} + ## Control Audio Plays, loops, or stops an audiosource. Any AudioSources with the same tag as the target Audio Source will automatically be stoped. Property | Type | Description --- | --- | --- -Control | Fungus.ControlAudio+ControlType | What to do to audio -_audio Source | Fungus.AudioSourceData | Audio clip to play +Control | Fungus.Commands.ControlAudioType | What to do to audio +_audio Source | Fungus.Variables.AudioSourceData | Audio clip to play Start Volume | System.Single | Start audio at this volume End Volume | System.Single | End audio at this volume Fade Duration | System.Single | Time to fade between current volume level and target volume level. @@ -35,7 +37,7 @@ Plays a usfxr synth sound. Use the usfxr editor [Tools > Fungus > Utilities > Ge Property | Type | Description --- | --- | --- Parent Transform | UnityEngine.Transform | Transform to use for positional audio -_ Settings String | Fungus.StringDataMulti | Settings string which describes the 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 diff --git a/Docs/commands/camera_commands.md b/Docs/command_ref/camera_commands.md similarity index 98% rename from Docs/commands/camera_commands.md rename to Docs/command_ref/camera_commands.md index 4942788a..8343714f 100644 --- a/Docs/commands/camera_commands.md +++ b/Docs/command_ref/camera_commands.md @@ -1,3 +1,5 @@ +# Camera commands {#camera_commands} + ## Fade Screen 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. diff --git a/Docs/commands/event_handlers/core_events.md b/Docs/command_ref/core_events.md similarity index 90% rename from Docs/commands/event_handlers/core_events.md rename to Docs/command_ref/core_events.md index 6fcb67c2..16baa98a 100644 --- a/Docs/commands/event_handlers/core_events.md +++ b/Docs/command_ref/core_events.md @@ -1,3 +1,5 @@ +# Core event handlers {#core_events} + ## Flowchart Enabled The block will execute when the Flowchart game object is enabled. ## Game Started diff --git a/Docs/commands/flow_commands.md b/Docs/command_ref/flow_commands.md similarity index 69% rename from Docs/commands/flow_commands.md rename to Docs/command_ref/flow_commands.md index 78052452..be131c58 100644 --- a/Docs/commands/flow_commands.md +++ b/Docs/command_ref/flow_commands.md @@ -1,3 +1,5 @@ +# Flow commands {#flow_commands} + ## Break Force a loop to terminate immediately. ## Call @@ -8,7 +10,7 @@ Property | Type | Description Target Flowchart | Fungus.Flowchart | Flowchart which contains the block to execute. If none is specified then the current Flowchart is used. Target Block | Fungus.Block | Block to start executing Start Index | System.Int32 | Command index to start executing -Call Mode | Fungus.Call+CallMode | Select if the calling block should stop or continue executing commands, or wait until the called block finishes. +Call Mode | Fungus.Commands.CallMode | Select if the calling block should stop or continue executing commands, or wait until the called block finishes. ## Else Marks the start of a command block to be executed when the preceding If statement is False. @@ -18,10 +20,10 @@ Marks the start of a command block to be executed when the preceding If statemen Property | Type | Description --- | --- | --- Variable | Fungus.Variable | Variable to use in expression -Boolean Data | Fungus.BooleanData | Boolean value to compare against -Integer Data | Fungus.IntegerData | Integer value to compare against -Float Data | Fungus.FloatData | Float value to compare against -String Data | Fungus.StringDataMulti | String value to compare against +Boolean Data | Fungus.Variables.BooleanData | Boolean value to compare against +Integer Data | Fungus.Variables.IntegerData | Integer value to compare against +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 @@ -32,10 +34,10 @@ If the test expression is true, execute the following command block. Property | Type | Description --- | --- | --- Variable | Fungus.Variable | Variable to use in expression -Boolean Data | Fungus.BooleanData | Boolean value to compare against -Integer Data | Fungus.IntegerData | Integer value to compare against -Float Data | Fungus.FloatData | Float value to compare against -String Data | Fungus.StringDataMulti | String value to compare against +Boolean Data | Fungus.Variables.BooleanData | Boolean value to compare against +Integer Data | Fungus.Variables.IntegerData | Integer value to compare against +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 @@ -43,7 +45,7 @@ Move execution to a specific Label command in the same block Property | Type | Description --- | --- | --- -_target Label | Fungus.StringData | Name of a label in this block to jump to +_target Label | Fungus.Variables.StringData | Name of a label in this block to jump to ## Label Marks a position in the command list for execution to jump to. @@ -57,7 +59,7 @@ Loads a new Unity scene and displays an optional loading image. This is useful f Property | Type | Description --- | --- | --- -_scene Name | Fungus.StringData | Name of the scene to load. The scene must also be added to the build settings. +_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 @@ -67,8 +69,8 @@ Sends a message to either the owner Flowchart or all Flowcharts in the scene. Bl Property | Type | Description --- | --- | --- -Message Target | Fungus.SendMessage+MessageTarget | Target flowchart(s) to send the message to -_message | Fungus.StringData | Name of the message to send +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 executing the Block that contains this command. @@ -78,7 +80,7 @@ Stops executing the named Block Property | Type | Description --- | --- | --- Flowchart | Fungus.Flowchart | Flowchart containing the Block. If none is specified, the parent Flowchart is used. -Block Name | Fungus.StringData | Name of the Block to stop +Block Name | Fungus.Variables.StringData | Name of the Block to stop ## Stop Flowchart Stops execution of all Blocks in a Flowchart @@ -93,7 +95,7 @@ Waits for period of time before executing the next command in the block. Property | Type | Description --- | --- | --- -_duration | Fungus.FloatData | Duration to wait for +_duration | Fungus.Variables.FloatData | Duration to wait for ## WaitInput Waits for a period of time or for player input before executing the next command in the block. @@ -108,9 +110,9 @@ Continuously loop through a block of commands while the condition is true. Use t Property | Type | Description --- | --- | --- Variable | Fungus.Variable | Variable to use in expression -Boolean Data | Fungus.BooleanData | Boolean value to compare against -Integer Data | Fungus.IntegerData | Integer value to compare against -Float Data | Fungus.FloatData | Float value to compare against -String Data | Fungus.StringDataMulti | String value to compare against +Boolean Data | Fungus.Variables.BooleanData | Boolean value to compare against +Integer Data | Fungus.Variables.IntegerData | Integer value to compare against +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 diff --git a/Docs/commands/event_handlers/input_events.md b/Docs/command_ref/input_events.md similarity index 58% rename from Docs/commands/event_handlers/input_events.md rename to Docs/command_ref/input_events.md index ed4f78c5..2d8ab6b7 100644 --- a/Docs/commands/event_handlers/input_events.md +++ b/Docs/command_ref/input_events.md @@ -1,8 +1,10 @@ +# Input event handlers {#input_events} + ## Key Pressed The block will execute when a key press event occurs. Property | Type | Description --- | --- | --- -Key Press Type | Fungus.KeyPressed+KeyPressType | The type of keypress to activate on +Key Press Type | Fungus.EventHandlers.KeyPressType | The type of keypress to activate on Key Code | UnityEngine.KeyCode | Keycode of the key to activate on diff --git a/Docs/commands/itween_commands.md b/Docs/command_ref/itween_commands.md similarity index 57% rename from Docs/commands/itween_commands.md rename to Docs/command_ref/itween_commands.md index c83acea9..ad65670a 100644 --- a/Docs/commands/itween_commands.md +++ b/Docs/command_ref/itween_commands.md @@ -1,14 +1,16 @@ +# iTween commands {#itween_commands} + ## Look From Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time. Property | Type | Description --- | --- | --- -_from Transform | Fungus.TransformData | Target transform that the GameObject will look at -_from Position | Fungus.Vector3Data | Target world position that the GameObject will look at, if no From Transform is set -Axis | Fungus.iTweenAxis | Restricts rotation to the supplied axis only -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will look at +_from Position | Fungus.Variables.Vector3Data | Target world position that the GameObject will look at, if no From Transform is set +Axis | Fungus.Commands.iTweenAxis | Restricts rotation to the supplied axis only +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -19,12 +21,12 @@ Rotates a GameObject to look at a supplied Transform or Vector3 over time. Property | Type | Description --- | --- | --- -_to Transform | Fungus.TransformData | Target transform that the GameObject will look at -_to Position | Fungus.Vector3Data | Target world position that the GameObject will look at, if no From Transform is set -Axis | Fungus.iTweenAxis | Restricts rotation to the supplied axis only -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will look at +_to Position | Fungus.Variables.Vector3Data | Target world position that the GameObject will look at, if no From Transform is set +Axis | Fungus.Commands.iTweenAxis | Restricts rotation to the supplied axis only +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -35,11 +37,11 @@ Moves a game object by a specified offset over time. Property | Type | Description --- | --- | --- -_offset | Fungus.Vector3Data | A translation offset in space the GameObject will animate to +_offset | Fungus.Variables.Vector3Data | A translation offset in space the GameObject will animate to Space | UnityEngine.Space | Apply the transformation in either the world coordinate or local cordinate system -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -50,12 +52,12 @@ Moves a game object from a specified position back to its starting position over Property | Type | Description --- | --- | --- -_from Transform | Fungus.TransformData | Target transform that the GameObject will move from -_from Position | Fungus.Vector3Data | Target world position that the GameObject will move from, if no From Transform is set +_from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will move from +_from Position | Fungus.Variables.Vector3Data | Target world position that the GameObject will move from, if no From Transform is set Is Local | System.Boolean | Whether to animate in world space or relative to the parent. False by default. -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -66,12 +68,12 @@ Moves a game object to a specified position over time. The position can be defin Property | Type | Description --- | --- | --- -_to Transform | Fungus.TransformData | Target transform that the GameObject will move to -_to Position | Fungus.Vector3Data | Target world position that the GameObject will move to, if no From Transform is set +_to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will move to +_to Position | Fungus.Variables.Vector3Data | Target world position that the GameObject will move to, if no From Transform is set Is Local | System.Boolean | Whether to animate in world space or relative to the parent. False by default. -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -82,11 +84,11 @@ Applies a jolt of force to a GameObject's position and wobbles it back to its in Property | Type | Description --- | --- | --- -_amount | Fungus.Vector3Data | A translation offset in space the GameObject will animate to +_amount | Fungus.Variables.Vector3Data | A translation offset in space the GameObject will animate to Space | UnityEngine.Space | Apply the transformation in either the world coordinate or local cordinate system -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -97,11 +99,11 @@ Applies a jolt of force to a GameObject's rotation and wobbles it back to its in Property | Type | Description --- | --- | --- -_amount | Fungus.Vector3Data | A rotation offset in space the GameObject will animate to +_amount | Fungus.Variables.Vector3Data | A rotation offset in space the GameObject will animate to Space | UnityEngine.Space | Apply the transformation in either the world coordinate or local cordinate system -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -112,10 +114,10 @@ Applies a jolt of force to a GameObject's scale and wobbles it back to its initi Property | Type | Description --- | --- | --- -_amount | Fungus.Vector3Data | A scale offset in space the GameObject will animate to -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_amount | Fungus.Variables.Vector3Data | A scale offset in space the GameObject will animate to +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -126,11 +128,11 @@ Rotates a game object by the specified angles over time. Property | Type | Description --- | --- | --- -_offset | Fungus.Vector3Data | A rotation offset in space the GameObject will animate to +_offset | Fungus.Variables.Vector3Data | A rotation offset in space the GameObject will animate to Space | UnityEngine.Space | Apply the transformation in either the world coordinate or local cordinate system -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -141,12 +143,12 @@ Rotates a game object from the specified angles back to its starting orientation Property | Type | Description --- | --- | --- -_from Transform | Fungus.TransformData | Target transform that the GameObject will rotate from -_from Rotation | Fungus.Vector3Data | Target rotation that the GameObject will rotate from, if no From Transform is set +_from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will rotate from +_from Rotation | Fungus.Variables.Vector3Data | Target rotation that the GameObject will rotate from, if no From Transform is set Is Local | System.Boolean | Whether to animate in world space or relative to the parent. False by default. -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -157,12 +159,12 @@ Rotates a game object to the specified angles over time. Property | Type | Description --- | --- | --- -_to Transform | Fungus.TransformData | Target transform that the GameObject will rotate to -_to Rotation | Fungus.Vector3Data | Target rotation that the GameObject will rotate to, if no To Transform is set +_to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will rotate to +_to Rotation | Fungus.Variables.Vector3Data | Target rotation that the GameObject will rotate to, if no To Transform is set Is Local | System.Boolean | Whether to animate in world space or relative to the parent. False by default. -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -173,10 +175,10 @@ Changes a game object's scale by a specified offset over time. Property | Type | Description --- | --- | --- -_offset | Fungus.Vector3Data | A scale offset in space the GameObject will animate to -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_offset | Fungus.Variables.Vector3Data | A scale offset in space the GameObject will animate to +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -187,11 +189,11 @@ Changes a game object's scale to the specified value and back to its original sc Property | Type | Description --- | --- | --- -_from Transform | Fungus.TransformData | Target transform that the GameObject will scale from -_from Scale | Fungus.Vector3Data | Target scale that the GameObject will scale from, if no From Transform is set -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will scale from +_from Scale | Fungus.Variables.Vector3Data | Target scale that the GameObject will scale from, if no From Transform is set +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -202,11 +204,11 @@ Changes a game object's scale to a specified value over time. Property | Type | Description --- | --- | --- -_to Transform | Fungus.TransformData | Target transform that the GameObject will scale to -_to Scale | Fungus.Vector3Data | Target scale that the GameObject will scale to, if no To Transform is set -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will scale to +_to Scale | Fungus.Variables.Vector3Data | Target scale that the GameObject will scale to, if no To Transform is set +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -217,12 +219,12 @@ Randomly shakes a GameObject's position by a diminishing amount over time. Property | Type | Description --- | --- | --- -_amount | Fungus.Vector3Data | A translation offset in space the GameObject will animate to +_amount | Fungus.Variables.Vector3Data | A translation offset in space the GameObject will animate to Is Local | System.Boolean | Whether to animate in world space or relative to the parent. False by default. -Axis | Fungus.iTweenAxis | Restricts rotation to the supplied axis only -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +Axis | Fungus.Commands.iTweenAxis | Restricts rotation to the supplied axis only +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -233,11 +235,11 @@ Randomly shakes a GameObject's rotation by a diminishing amount over time. Property | Type | Description --- | --- | --- -_amount | Fungus.Vector3Data | A rotation offset in space the GameObject will animate to +_amount | Fungus.Variables.Vector3Data | A rotation offset in space the GameObject will animate to Space | UnityEngine.Space | Apply the transformation in either the world coordinate or local cordinate system -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -248,10 +250,10 @@ Randomly shakes a GameObject's rotation by a diminishing amount over time. Property | Type | Description --- | --- | --- -_amount | Fungus.Vector3Data | A scale offset in space the GameObject will animate to -_target Object | Fungus.GameObjectData | Target game object to apply the Tween to -_tween Name | Fungus.StringData | An individual name useful for stopping iTweens by name -_duration | Fungus.FloatData | The time in seconds the animation will take to complete +_amount | Fungus.Variables.Vector3Data | A scale offset in space the GameObject will animate to +_target Object | Fungus.Variables.GameObjectData | Target game object to apply the Tween to +_tween Name | Fungus.Variables.StringData | An individual name useful for stopping iTweens by name +_duration | Fungus.Variables.FloatData | The time in seconds the animation will take to complete Ease Type | Fungus.iTween+EaseType | The shape of the easing curve applied to the animation Loop Type | Fungus.iTween+LoopType | The type of loop to apply once the animation has completed Stop Previous Tweens | System.Boolean | Stop any previously added iTweens on this object before adding this iTween @@ -262,7 +264,7 @@ Stops an active iTween by name. Property | Type | Description --- | --- | --- -_tween Name | Fungus.StringData | Stop and destroy any Tweens in current scene with the supplied name +_tween Name | Fungus.Variables.StringData | Stop and destroy any Tweens in current scene with the supplied name ## Stop Tweens Stop all active iTweens in the current scene. diff --git a/Docs/commands/narrative_commands.md b/Docs/command_ref/narrative_commands.md similarity index 91% rename from Docs/commands/narrative_commands.md rename to Docs/command_ref/narrative_commands.md index c670bf5a..d78e6c97 100644 --- a/Docs/commands/narrative_commands.md +++ b/Docs/command_ref/narrative_commands.md @@ -1,3 +1,5 @@ +# Narrative commands {#narrative_commands} + ## Clear Menu Clears the options from a menu dialogue @@ -15,7 +17,7 @@ Replaced Stage | Fungus.Stage | Stage to swap with Use Default Settings | System.Boolean | Use Default Settings Fade Duration | System.Single | Fade Duration Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command -Display | Fungus.StageDisplayType | Display type +Display | Fungus.Commands.StageDisplayType | Display type ## Conversation Do multiple say and portrait commands in a single block of text. Format is: [character] [portrait] [stage position] [: Story text] @@ -28,7 +30,7 @@ Text | System.String | Text to display on the menu button Description | System.String | Notes about the option text for other authors, localization, etc. Target Block | Fungus.Block | Block to execute when this option is selected Hide If Visited | System.Boolean | Hide this option if the target block has been executed previously -Interactable | Fungus.BooleanData | If false, the menu option will be displayed but will not be selectable +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 @@ -36,7 +38,7 @@ Displays a timer bar and executes a target block if the player fails to select a Property | Type | Description --- | --- | --- -_duration | Fungus.FloatData | Length of time to display the timer for +_duration | Fungus.Variables.FloatData | Length of time to display the timer for Target Block | Fungus.Block | Block to execute when the timer expires ## Portrait @@ -83,7 +85,7 @@ Set the active language for the scene. A Localization object with a localization Property | Type | Description --- | --- | --- -_language Code | Fungus.StringData | Code of the language to set. e.g. ES, DE, JA +_language Code | Fungus.Variables.StringData | Code of the language to set. e.g. ES, DE, JA ## Set Menu Dialog Sets a custom menu dialog to use when displaying multiple choice menus diff --git a/Docs/commands/scripting_commands.md b/Docs/command_ref/scripting_commands.md similarity index 62% rename from Docs/commands/scripting_commands.md rename to Docs/command_ref/scripting_commands.md index 90d3cca2..00ac598d 100644 --- a/Docs/commands/scripting_commands.md +++ b/Docs/command_ref/scripting_commands.md @@ -1,3 +1,5 @@ +# Scripting commands {#scripting_commands} + ## Comment Use comments to record design notes and reminders about your game. @@ -20,15 +22,15 @@ Writes a log message to the debug console. Property | Type | Description --- | --- | --- -Log Type | Fungus.DebugLog+DebugLogType | Display type of debug log info -Log Message | Fungus.StringDataMulti | Text to write to the debug log. Supports variable substitution, e.g. {$Myvar} +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 Destroys a specified game object in the scene. Property | Type | Description --- | --- | --- -_target Game Object | Fungus.GameObjectData | Reference to game object to destroy +_target Game Object | Fungus.Variables.GameObjectData | Reference to game object to destroy ## Execute Lua Executes a Lua code chunk using a Lua Environment. @@ -49,14 +51,14 @@ Property | Type | Description --- | --- | --- Delay | System.Single | Delay (in seconds) before the methods will be called Static Event | UnityEngine.Events.UnityEvent | List of methods to call. Supports methods with no parameters or exactly one string, int, float or object parameter. -Boolean Parameter | Fungus.BooleanData | Boolean parameter to pass to the invoked methods. -Boolean Event | Fungus.InvokeEvent+BooleanEvent | List of methods to call. Supports methods with one boolean parameter. -Integer Parameter | Fungus.IntegerData | Integer parameter to pass to the invoked methods. -Integer Event | Fungus.InvokeEvent+IntegerEvent | List of methods to call. Supports methods with one integer parameter. -Float Parameter | Fungus.FloatData | Float parameter to pass to the invoked methods. -Float Event | Fungus.InvokeEvent+FloatEvent | List of methods to call. Supports methods with one float parameter. -String Parameter | Fungus.StringDataMulti | String parameter to pass to the invoked methods. -String Event | Fungus.InvokeEvent+StringEvent | List of methods to call. Supports methods with one string parameter. +Boolean Parameter | Fungus.Variables.BooleanData | Boolean parameter to pass to the invoked methods. +Boolean Event | Fungus.Commands.InvokeEvent+BooleanEvent | List of methods to call. Supports methods with one boolean parameter. +Integer Parameter | Fungus.Variables.IntegerData | Integer parameter to pass to the invoked methods. +Integer Event | Fungus.Commands.InvokeEvent+IntegerEvent | List of methods to call. Supports methods with one integer parameter. +Float Parameter | Fungus.Variables.FloatData | Float parameter to pass to the invoked methods. +Float Event | Fungus.Commands.InvokeEvent+FloatEvent | List of methods to call. Supports methods with one float parameter. +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 Invokes a method of a component via reflection. Supports passing multiple parameters and storing returned values in a Fungus variable. @@ -69,35 +71,35 @@ Target Component Fullname | System.String | Full name of the target component Target Component Text | System.String | Display name of the target component Target Method | System.String | Name of target method to invoke on the target component Target Method Text | System.String | Display name of target method to invoke on the target component -Method Parameters | Fungus.InvokeMethodParameter[] | List of parameters to pass to the invoked method +Method Parameters | Fungus.Commands.InvokeMethodParameter[] | List of parameters to pass to the invoked method Save Return Value | System.Boolean | If true, store the return value in a flowchart variable of the same type. Return Value Variable Key | System.String | Name of Fungus variable to store the return value in 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.Call+CallMode | The coroutine call behavior for methods that return IEnumerator +Call Mode | Fungus.Commands.CallMode | The coroutine call behavior for methods that return IEnumerator ## Open URL Opens the specified URL in the browser. Property | Type | Description --- | --- | --- -Url | Fungus.StringData | URL to open in the browser +Url | Fungus.Variables.StringData | URL to open in the browser ## Set Active Sets a game object in the scene to be active / inactive. Property | Type | Description --- | --- | --- -_target Game Object | Fungus.GameObjectData | Reference to game object to enable / disable -Active State | Fungus.BooleanData | Set to true to enable the game object +_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 Spawns a new object based on a reference to a scene or prefab game object. Property | Type | Description --- | --- | --- -_source Object | Fungus.GameObjectData | Game object to copy when spawning. Can be a scene object or a prefab. -_parent Transform | Fungus.TransformData | Transform to use for position of newly spawned object. -_spawn Position | Fungus.Vector3Data | Local position of newly spawned object. -_spawn Rotation | Fungus.Vector3Data | Local rotation of newly spawned object. +_source Object | Fungus.Variables.GameObjectData | Game object to copy when spawning. Can be a scene object or a prefab. +_parent Transform | Fungus.Variables.TransformData | Transform to use for position of newly spawned object. +_spawn Position | Fungus.Variables.Vector3Data | Local position of newly spawned object. +_spawn Rotation | Fungus.Variables.Vector3Data | Local rotation of newly spawned object. diff --git a/Docs/commands/sprite_commands.md b/Docs/command_ref/sprite_commands.md similarity index 77% rename from Docs/commands/sprite_commands.md rename to Docs/command_ref/sprite_commands.md index 0ffb4fb7..28fddaae 100644 --- a/Docs/commands/sprite_commands.md +++ b/Docs/command_ref/sprite_commands.md @@ -1,11 +1,13 @@ +# Sprite commands {#sprite_commands} + ## Fade Sprite Fades a sprite to a target color over a period of time. Property | Type | Description --- | --- | --- Sprite Renderer | UnityEngine.SpriteRenderer | Sprite object to be faded -_duration | Fungus.FloatData | Length of time to perform the fade -_target Color | Fungus.ColorData | Target color to fade to. To only fade transparency level, set the color to white and set the alpha to required transparency. +_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 @@ -14,7 +16,7 @@ Sets a Clickable2D component to be clickable / non-clickable. Property | Type | Description --- | --- | --- Target Clickable2 D | Fungus.Clickable2D | Reference to Clickable2D component on a gameobject -Active State | Fungus.BooleanData | Set to true to enable the component +Active State | Fungus.Variables.BooleanData | Set to true to enable the component ## Set Collider Sets all collider (2d or 3d) components on the target objects to be active / inactive @@ -23,7 +25,7 @@ Property | Type | Description --- | --- | --- Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | A list of gameobjects containing collider components to be set active / inactive Target Tag | System.String | All objects with this tag will have their collider set active / inactive -Active State | Fungus.BooleanData | Set to true to enable the collider components +Active State | Fungus.Variables.BooleanData | Set to true to enable the collider components ## Set Draggable 2D Sets a Draggable2D component to be draggable / non-draggable. @@ -31,7 +33,7 @@ Sets a Draggable2D component to be draggable / non-draggable. Property | Type | Description --- | --- | --- Target Draggable2 D | Fungus.Draggable2D | Reference to Draggable2D component on a gameobject -Active State | Fungus.BooleanData | Set to true to enable the component +Active State | Fungus.Variables.BooleanData | Set to true to enable the component ## Set Mouse Cursor Sets the mouse cursor sprite. @@ -55,7 +57,7 @@ Controls the render order of sprites by setting the Order In Layer property of a 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.IntegerData | The order in layer value to set on the target sprites +Order In Layer | Fungus.Variables.IntegerData | The order in layer value to set on the target sprites ## Show Sprite Makes a sprite visible / invisible by setting the color alpha. @@ -63,6 +65,6 @@ Makes a sprite visible / invisible by setting the color alpha. Property | Type | Description --- | --- | --- Sprite Renderer | UnityEngine.SpriteRenderer | Sprite object to be made visible / invisible -_visible | Fungus.BooleanData | Make the sprite visible or invisible +_visible | Fungus.Variables.BooleanData | Make the sprite visible or invisible Affect Children | System.Boolean | Affect the visibility of child sprites diff --git a/Docs/commands/event_handlers/sprite_events.md b/Docs/command_ref/sprite_events.md similarity index 97% rename from Docs/commands/event_handlers/sprite_events.md rename to Docs/command_ref/sprite_events.md index b5c0bab4..23ce857d 100644 --- a/Docs/commands/event_handlers/sprite_events.md +++ b/Docs/command_ref/sprite_events.md @@ -1,3 +1,5 @@ +# Sprite event handlers {#sprite_events} + ## Drag Cancelled The block will execute when the player drags an object and releases it without dropping it on a target object. diff --git a/Docs/commands/tests_commands.md b/Docs/command_ref/tests_commands.md similarity index 80% rename from Docs/commands/tests_commands.md rename to Docs/command_ref/tests_commands.md index 8118b25b..7059e670 100644 --- a/Docs/commands/tests_commands.md +++ b/Docs/command_ref/tests_commands.md @@ -1,3 +1,5 @@ +# Tests commands {#tests_commands} + ## Fail Fails the current integration test ## Pass diff --git a/Docs/commands/ui_commands.md b/Docs/command_ref/ui_commands.md similarity index 72% rename from Docs/commands/ui_commands.md rename to Docs/command_ref/ui_commands.md index 014da5c2..8016b4f8 100644 --- a/Docs/commands/ui_commands.md +++ b/Docs/command_ref/ui_commands.md @@ -1,3 +1,5 @@ +# UI commands {#ui_commands} + ## Fade UI Fades a UI object @@ -5,8 +7,8 @@ Property | Type | Description --- | --- | --- Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | List of objects to be affected by the tween Tween Type | LeanTweenType | Type of tween easing to apply -Wait Until Finished | Fungus.BooleanData | Wait until this command completes before continuing execution -Duration | Fungus.FloatData | Time for the tween to complete +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 Gets the text property from a UI Text object and stores it in a string variable. @@ -14,7 +16,7 @@ Gets the text property from a UI Text object and stores it in a string variable. Property | Type | Description --- | --- | --- Target Text Object | UnityEngine.GameObject | Text object to get text value from -String Variable | Fungus.StringVariable | String variable to store the text value in +String Variable | Fungus.Variables.StringVariable | String variable to store the text value in ## Set Interactable Set the interactable sate of selectable objects. @@ -22,7 +24,7 @@ Set the interactable sate of selectable objects. Property | Type | Description --- | --- | --- Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | List of objects to be affected by the command -Interactable State | Fungus.BooleanData | Controls if the selectable UI object be interactable or not +Interactable State | Fungus.Variables.BooleanData | Controls if the selectable UI object be interactable or not ## Set Slider Value Sets the value property of a slider object @@ -30,7 +32,7 @@ Sets the value property of a slider object Property | Type | Description --- | --- | --- Slider | UnityEngine.UI.Slider | Target slider object to set the value on -Value | Fungus.FloatData | Float value to set the slider value to. +Value | Fungus.Variables.FloatData | Float value to set the slider value to. ## Set Text Sets the text property on a UI Text object and/or an Input Field object. @@ -38,7 +40,7 @@ Sets the text property on a UI Text object and/or an Input Field object. Property | Type | Description --- | --- | --- Target Text Object | UnityEngine.GameObject | Text object to set text on. Can be a UI Text, Text Field or Text Mesh object. -Text | Fungus.StringDataMulti | String value to assign to the text object +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 @@ -47,7 +49,7 @@ Writes content to a UI Text or Text Mesh object. Property | Type | Description --- | --- | --- Text Object | UnityEngine.GameObject | Text object to set text on. Text, Input Field and Text Mesh objects are supported. -Text | Fungus.StringDataMulti | String value to assign to the text object +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. Clear Text | System.Boolean | Clear existing text before writing new text Wait Until Finished | System.Boolean | Wait until this command finishes before executing the next command diff --git a/Docs/command_ref/ui_events.md b/Docs/command_ref/ui_events.md new file mode 100644 index 00000000..8fb7e21c --- /dev/null +++ b/Docs/command_ref/ui_events.md @@ -0,0 +1,16 @@ +# UI event handlers {#ui_events} + +## Button Clicked +The block will execute when the user clicks on the target UI button object. + +Property | Type | Description + --- | --- | --- +Target Button | UnityEngine.UI.Button | The UI Button that the user can click on + +## End Edit +The block will execute when the user finishes editing the text in the input field. + +Property | Type | Description + --- | --- | --- +Target Input Field | UnityEngine.UI.InputField | The UI Input Field that the user can enter text into + diff --git a/Docs/commands/variable_commands.md b/Docs/command_ref/variable_commands.md similarity index 72% rename from Docs/commands/variable_commands.md rename to Docs/command_ref/variable_commands.md index 2e7fe675..6271029f 100644 --- a/Docs/commands/variable_commands.md +++ b/Docs/command_ref/variable_commands.md @@ -1,3 +1,5 @@ +# Variable commands {#variable_commands} + ## Delete Save Key Deletes a saved value from permanent storage. @@ -18,18 +20,18 @@ Sets an float variable to a random value in the defined range. Property | Type | Description --- | --- | --- -Variable | Fungus.FloatVariable | The variable whos value will be set -Min Value | Fungus.FloatData | Minimum value for random range -Max Value | Fungus.FloatData | Maximum value for random range +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 Sets an integer variable to a random value in the defined range. Property | Type | Description --- | --- | --- -Variable | Fungus.IntegerVariable | The variable whos value will be set -Min Value | Fungus.IntegerData | Minimum value for random range -Max Value | Fungus.IntegerData | Maximum value for random range +Variable | Fungus.Variables.IntegerVariable | The variable whos value will be set +Min Value | Fungus.Variables.IntegerData | Minimum value for random range +Max Value | Fungus.Variables.IntegerData | Maximum value for random range ## Read Text File Reads in a text file and stores the contents in a string variable @@ -37,7 +39,7 @@ Reads in a text file and stores the contents in a string variable Property | Type | Description --- | --- | --- Text File | UnityEngine.TextAsset | Text file to read into the string variable -String Variable | Fungus.StringVariable | String variable to store the tex file contents in +String Variable | Fungus.Variables.StringVariable | String variable to store the tex file contents in ## Reset Resets the state of all commands and variables in the Flowchart. @@ -68,9 +70,9 @@ Sets a Boolean, Integer, Float or String variable to a new value using a simple Property | Type | Description --- | --- | --- Variable | Fungus.Variable | The variable whos value will be set -Set Operator | Fungus.SetVariable+SetOperator | The type of math operation to be performed -Boolean Data | Fungus.BooleanData | Boolean value to set with -Integer Data | Fungus.IntegerData | Integer value to set with -Float Data | Fungus.FloatData | Float value to set with -String Data | Fungus.StringDataMulti | String value to set with +Set Operator | Fungus.Commands.SetOperator | The type of math operation to be performed +Boolean Data | Fungus.Variables.BooleanData | Boolean value to set with +Integer Data | Fungus.Variables.IntegerData | Integer value to set with +Float Data | Fungus.Variables.FloatData | Float value to set with +String Data | Fungus.Variables.StringDataMulti | String value to set with diff --git a/Docs/command_reference b/Docs/command_reference.md similarity index 60% rename from Docs/command_reference rename to Docs/command_reference.md index f3caa4b2..d645ecc9 100644 --- a/Docs/command_reference +++ b/Docs/command_reference.md @@ -1,4 +1,8 @@ -# Command Reference +# Command Reference {#command_reference} + +Reference documentation for all Fungus commands and event handlers. + +## Commands * @subpage animation_commands * @subpage audio_commands @@ -9,7 +13,12 @@ * @subpage scripting_commands * @subpage sprite_commands * @subpage variable_commands +* @subpage ui_commands +* @subpage tests_commands + +## Event Handlers + * @subpage core_events * @subpage input_events * @subpage sprite_events -* @subpage narrative_parser_tokens \ No newline at end of file +* @subpage ui_events diff --git a/Docs/commands/animation_commands.md b/Docs/commands/animation_commands.md deleted file mode 100644 index 511c65ec..00000000 --- a/Docs/commands/animation_commands.md +++ /dev/null @@ -1,53 +0,0 @@ -## Play Anim State -Plays a state of an animator according to the state name - -Property | Type | Description - --- | --- | --- -Animator | Fungus.AnimatorData | Reference to an Animator component in a game object -State Name | Fungus.StringData | Name of the state you want to play -Layer | Fungus.IntegerData | Layer to play animation on -Time | Fungus.FloatData | Start time of animation - -## Reset Anim Trigger -Resets a trigger parameter on an Animator component. - -Property | Type | Description - --- | --- | --- -_animator | Fungus.AnimatorData | Reference to an Animator component in a game object -_parameter Name | Fungus.StringData | Name of the trigger Animator parameter that will be reset - -## Set Anim Bool -Sets a boolean parameter on an Animator component to control a Unity animation - -Property | Type | Description - --- | --- | --- -_animator | Fungus.AnimatorData | Reference to an Animator component in a game object -_parameter Name | Fungus.StringData | Name of the boolean Animator parameter that will have its value changed -Value | Fungus.BooleanData | The boolean value to set the parameter to - -## Set Anim Float -Sets a float parameter on an Animator component to control a Unity animation - -Property | Type | Description - --- | --- | --- -_animator | Fungus.AnimatorData | Reference to an Animator component in a game object -_parameter Name | Fungus.StringData | Name of the float Animator parameter that will have its value changed -Value | Fungus.FloatData | The float value to set the parameter to - -## Set Anim Integer -Sets an integer parameter on an Animator component to control a Unity animation - -Property | Type | Description - --- | --- | --- -_animator | Fungus.AnimatorData | Reference to an Animator component in a game object -_parameter Name | Fungus.StringData | Name of the integer Animator parameter that will have its value changed -Value | Fungus.IntegerData | The integer value to set the parameter to - -## Set Anim Trigger -Sets a trigger parameter on an Animator component to control a Unity animation - -Property | Type | Description - --- | --- | --- -_animator | Fungus.AnimatorData | Reference to an Animator component in a game object -_parameter Name | Fungus.StringData | Name of the trigger Animator parameter that will have its value changed - diff --git a/Docs/event_handlers/input_events.md b/Docs/event_handlers/input_events.md index ed4f78c5..62d53893 100644 --- a/Docs/event_handlers/input_events.md +++ b/Docs/event_handlers/input_events.md @@ -3,6 +3,6 @@ The block will execute when a key press event occurs. Property | Type | Description --- | --- | --- -Key Press Type | Fungus.KeyPressed+KeyPressType | The type of keypress to activate on +Key Press Type | Fungus.EventHandlers.KeyPressType | The type of keypress to activate on Key Code | UnityEngine.KeyCode | Keycode of the key to activate on diff --git a/Doxygen/Doxyfile b/Doxygen/Doxyfile index 004758ad..91339367 100644 --- a/Doxygen/Doxyfile +++ b/Doxygen/Doxyfile @@ -781,7 +781,9 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../Assets/Fungus/Scripts +INPUT = ../Assets/Fungus/Scripts \ + ../Docs/mainpage.md \ + ../Docs # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -971,7 +973,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = mainpage.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -984,7 +986,7 @@ USE_MDFILE_AS_MAINPAGE = # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation.