diff --git a/Docs/command_ref/animation_commands.md b/Docs/command_ref/animation_commands.md index 41587cf9..a4a7de64 100644 --- a/Docs/command_ref/animation_commands.md +++ b/Docs/command_ref/animation_commands.md @@ -3,6 +3,8 @@ ## Play Anim State Plays a state of an animator according to the state name +Defined in Fungus.Commands.PlayAnimState + Property | Type | Description --- | --- | --- Animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object @@ -13,6 +15,8 @@ Time | Fungus.Variables.FloatData | Start time of animation ## Reset Anim Trigger Resets a trigger parameter on an Animator component. +Defined in Fungus.Commands.ResetAnimTrigger + Property | Type | Description --- | --- | --- _animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object @@ -21,6 +25,8 @@ _parameter Name | Fungus.Variables.StringData | Name of the trigger Animator par ## Set Anim Bool Sets a boolean parameter on an Animator component to control a Unity animation +Defined in Fungus.Commands.SetAnimBool + Property | Type | Description --- | --- | --- _animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object @@ -30,6 +36,8 @@ 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 +Defined in Fungus.Commands.SetAnimFloat + Property | Type | Description --- | --- | --- _animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object @@ -39,6 +47,8 @@ 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 +Defined in Fungus.Commands.SetAnimInteger + Property | Type | Description --- | --- | --- _animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object @@ -48,6 +58,8 @@ 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 +Defined in Fungus.Commands.SetAnimTrigger + Property | Type | Description --- | --- | --- _animator | Fungus.Variables.AnimatorData | Reference to an Animator component in a game object diff --git a/Docs/command_ref/audio_commands.md b/Docs/command_ref/audio_commands.md index be2c461e..95e97df3 100644 --- a/Docs/command_ref/audio_commands.md +++ b/Docs/command_ref/audio_commands.md @@ -3,6 +3,8 @@ ## Control Audio 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 + Property | Type | Description --- | --- | --- Control | Fungus.Commands.ControlAudioType | What to do to audio @@ -15,6 +17,8 @@ Wait Until Finished | System.Boolean | Wait until this command has finished befo ## Play Music 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 + Property | Type | Description --- | --- | --- Music Clip | UnityEngine.AudioClip | Music sound clip to play @@ -25,6 +29,8 @@ Fade Duration | System.Single | Length of time to fade out previous playing musi ## Play Sound Plays a once-off sound effect. Multiple sound effects can be played at the same time. +Defined in Fungus.Commands.PlaySound + Property | Type | Description --- | --- | --- Sound Clip | UnityEngine.AudioClip | Sound effect clip to play @@ -34,6 +40,8 @@ Wait Until Finished | System.Boolean | Wait until the sound has finished playing ## Play Usfxr Sound Plays a usfxr synth sound. Use the usfxr editor [Tools > Fungus > Utilities > Generate usfxr Sound Effects] to create the SettingsString. Set a ParentTransform if using positional sound. See https://github.com/zeh/usfxr for more information about usfxr. +Defined in Fungus.Commands.PlayUsfxrSound + Property | Type | Description --- | --- | --- Parent Transform | UnityEngine.Transform | Transform to use for positional audio @@ -43,6 +51,8 @@ Wait Duration | System.Single | Time to wait before executing the next command ## Set Audio Pitch Sets the global pitch level for audio played with Play Music and Play Sound commands. +Defined in Fungus.Commands.SetAudioPitch + Property | Type | Description --- | --- | --- Pitch | System.Single | Global pitch level for audio played using the Play Music and Play Sound commands @@ -52,6 +62,8 @@ Wait Until Finished | System.Boolean | Wait until the pitch change has finished ## Set Audio Volume Sets the global volume level for audio played with Play Music and Play Sound commands. +Defined in Fungus.Commands.SetAudioVolume + Property | Type | Description --- | --- | --- Volume | System.Single | Global volume level for audio played using Play Music and Play Sound @@ -60,3 +72,5 @@ Wait Until Finished | System.Boolean | Wait until the volume fade has completed ## Stop Music 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 8343714f..9d02d0f9 100644 --- a/Docs/command_ref/camera_commands.md +++ b/Docs/command_ref/camera_commands.md @@ -3,6 +3,8 @@ ## 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. +Defined in Fungus.Commands.FadeScreen + Property | Type | Description --- | --- | --- Duration | System.Single | Time for fade effect to complete @@ -14,6 +16,8 @@ Fade Texture | UnityEngine.Texture2D | Optional texture to use when rendering th ## Fade To View Fades the camera out and in again at a position specified by a View object. +Defined in Fungus.Commands.FadeToView + Property | Type | Description --- | --- | --- Duration | System.Single | Time for fade effect to complete @@ -26,9 +30,13 @@ Target Camera | UnityEngine.Camera | Camera to use for the fade. Will use main c ## Fullscreen Sets the application to fullscreen, windowed or toggles the current state. + +Defined in Fungus.Commands.Fullscreen ## Move To View Moves the camera to a location specified by a View object. +Defined in Fungus.Commands.MoveToView + Property | Type | Description --- | --- | --- Duration | System.Single | Time for move effect to complete @@ -39,6 +47,8 @@ Target Camera | UnityEngine.Camera | Camera to use for the pan. Will use main ca ## Shake Camera Applies a camera shake effect to the main camera. +Defined in Fungus.Commands.ShakeCamera + Property | Type | Description --- | --- | --- Duration | System.Single | Time for camera shake effect to complete @@ -48,6 +58,8 @@ Wait Until Finished | System.Boolean | Wait until the shake effect has finished ## Start Swipe Activates swipe panning mode where the player can pan the camera within the area between viewA & viewB. +Defined in Fungus.Commands.StartSwipe + Property | Type | Description --- | --- | --- View A | Fungus.View | Defines one extreme of the scrollable area that the player can pan around @@ -58,3 +70,5 @@ Target Camera | UnityEngine.Camera | Camera to use for the pan. Will use main ca ## Stop Swipe 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 16baa98a..11384bd3 100644 --- a/Docs/command_ref/core_events.md +++ b/Docs/command_ref/core_events.md @@ -2,11 +2,17 @@ ## Flowchart Enabled The block will execute when the Flowchart game object is enabled. + +Defined in Fungus.EventHandlers.FlowchartEnabled ## Game Started The block will execute when the game starts playing. + +Defined in Fungus.EventHandlers.GameStarted ## Message Received The block will execute when the specified message is received from a Send Message command. +Defined in Fungus.EventHandlers.MessageReceived + Property | Type | Description --- | --- | --- Message | System.String | Fungus message to listen for diff --git a/Docs/command_ref/flow_commands.md b/Docs/command_ref/flow_commands.md index be131c58..58e01d6e 100644 --- a/Docs/command_ref/flow_commands.md +++ b/Docs/command_ref/flow_commands.md @@ -2,9 +2,13 @@ ## Break Force a loop to terminate immediately. + +Defined in Fungus.Commands.Break ## Call Execute another block in the same Flowchart as the command, or in a different Flowchart. +Defined in Fungus.Commands.Call + Property | Type | Description --- | --- | --- Target Flowchart | Fungus.Flowchart | Flowchart which contains the block to execute. If none is specified then the current Flowchart is used. @@ -14,9 +18,13 @@ Call Mode | Fungus.Commands.CallMode | Select if the calling block should stop o ## 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 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 + Property | Type | Description --- | --- | --- Variable | Fungus.Variable | Variable to use in expression @@ -28,9 +36,13 @@ Compare Operator | Fungus.CompareOperator | The type of comparison to be perform ## End Marks the end of a conditional block. + +Defined in Fungus.Commands.End ## If If the test expression is true, execute the following command block. +Defined in Fungus.Commands.If + Property | Type | Description --- | --- | --- Variable | Fungus.Variable | Variable to use in expression @@ -43,6 +55,8 @@ Compare Operator | Fungus.CompareOperator | The type of comparison to be perform ## Jump Move execution to a specific Label command in the same block +Defined in Fungus.Commands.Jump + Property | Type | Description --- | --- | --- _target Label | Fungus.Variables.StringData | Name of a label in this block to jump to @@ -50,6 +64,8 @@ _target Label | Fungus.Variables.StringData | Name of a label in this block to j ## Label Marks a position in the command list for execution to jump to. +Defined in Fungus.Commands.Label + Property | Type | Description --- | --- | --- Key | System.String | Display name for the label @@ -57,6 +73,8 @@ Key | System.String | Display name for the label ## Load Scene 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 + Property | Type | Description --- | --- | --- _scene Name | Fungus.Variables.StringData | Name of the scene to load. The scene must also be added to the build settings. @@ -64,9 +82,13 @@ Loading Image | UnityEngine.Texture2D | Image to display while loading the scene ## 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 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 + Property | Type | Description --- | --- | --- Message Target | Fungus.Commands.MessageTarget | Target flowchart(s) to send the message to @@ -74,9 +96,13 @@ _message | Fungus.Variables.StringData | Name of the message to send ## Stop Stop executing the Block that contains this command. + +Defined in Fungus.Commands.Stop ## Stop Block Stops executing the named Block +Defined in Fungus.Commands.StopBlock + Property | Type | Description --- | --- | --- Flowchart | Fungus.Flowchart | Flowchart containing the Block. If none is specified, the parent Flowchart is used. @@ -85,6 +111,8 @@ Block Name | Fungus.Variables.StringData | Name of the Block to stop ## Stop Flowchart Stops execution of all Blocks in a Flowchart +Defined in Fungus.Commands.StopFlowchart + Property | Type | Description --- | --- | --- Stop Parent Flowchart | System.Boolean | Stop all executing Blocks in the Flowchart that contains this command @@ -93,6 +121,8 @@ Target Flowcharts | System.Collections.Generic.List`1[Fungus.Flowchart] | Stop a ## Wait Waits for period of time before executing the next command in the block. +Defined in Fungus.Commands.Wait + Property | Type | Description --- | --- | --- _duration | Fungus.Variables.FloatData | Duration to wait for @@ -100,6 +130,8 @@ _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. +Defined in WaitInput + Property | Type | Description --- | --- | --- Duration | System.Single | Duration to wait for. If negative will wait until player input occurs. @@ -107,6 +139,8 @@ Duration | System.Single | Duration to wait for. If negative will wait until pla ## 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 + Property | Type | Description --- | --- | --- Variable | Fungus.Variable | Variable to use in expression diff --git a/Docs/command_ref/input_events.md b/Docs/command_ref/input_events.md index 2d8ab6b7..2d57afd8 100644 --- a/Docs/command_ref/input_events.md +++ b/Docs/command_ref/input_events.md @@ -3,6 +3,8 @@ ## Key Pressed The block will execute when a key press event occurs. +Defined in Fungus.EventHandlers.KeyPressed + Property | Type | Description --- | --- | --- Key Press Type | Fungus.EventHandlers.KeyPressType | The type of keypress to activate on diff --git a/Docs/command_ref/itween_commands.md b/Docs/command_ref/itween_commands.md index ad65670a..40f8aa9f 100644 --- a/Docs/command_ref/itween_commands.md +++ b/Docs/command_ref/itween_commands.md @@ -3,6 +3,8 @@ ## Look From 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 + Property | Type | Description --- | --- | --- _from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will look at @@ -19,6 +21,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Look To Rotates a GameObject to look at a supplied Transform or Vector3 over time. +Defined in Fungus.Commands.LookTo + Property | Type | Description --- | --- | --- _to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will look at @@ -35,6 +39,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Move Add Moves a game object by a specified offset over time. +Defined in Fungus.Commands.MoveAdd + Property | Type | Description --- | --- | --- _offset | Fungus.Variables.Vector3Data | A translation offset in space the GameObject will animate to @@ -50,6 +56,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Move From Moves a game object from a specified position back to its starting position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None). +Defined in Fungus.Commands.MoveFrom + Property | Type | Description --- | --- | --- _from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will move from @@ -66,6 +74,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Move To Moves a game object to a specified position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None). +Defined in Fungus.Commands.MoveTo + Property | Type | Description --- | --- | --- _to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will move to @@ -82,6 +92,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Punch Position Applies a jolt of force to a GameObject's position and wobbles it back to its initial position. +Defined in Fungus.Commands.PunchPosition + Property | Type | Description --- | --- | --- _amount | Fungus.Variables.Vector3Data | A translation offset in space the GameObject will animate to @@ -97,6 +109,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Punch Rotation Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation. +Defined in Fungus.Commands.PunchRotation + Property | Type | Description --- | --- | --- _amount | Fungus.Variables.Vector3Data | A rotation offset in space the GameObject will animate to @@ -112,6 +126,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Punch Scale Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale. +Defined in Fungus.Commands.PunchScale + Property | Type | Description --- | --- | --- _amount | Fungus.Variables.Vector3Data | A scale offset in space the GameObject will animate to @@ -126,6 +142,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Rotate Add Rotates a game object by the specified angles over time. +Defined in Fungus.Commands.RotateAdd + Property | Type | Description --- | --- | --- _offset | Fungus.Variables.Vector3Data | A rotation offset in space the GameObject will animate to @@ -141,6 +159,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Rotate From Rotates a game object from the specified angles back to its starting orientation over time. +Defined in Fungus.Commands.RotateFrom + Property | Type | Description --- | --- | --- _from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will rotate from @@ -157,6 +177,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Rotate To Rotates a game object to the specified angles over time. +Defined in Fungus.Commands.RotateTo + Property | Type | Description --- | --- | --- _to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will rotate to @@ -173,6 +195,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Scale Add Changes a game object's scale by a specified offset over time. +Defined in Fungus.Commands.ScaleAdd + Property | Type | Description --- | --- | --- _offset | Fungus.Variables.Vector3Data | A scale offset in space the GameObject will animate to @@ -187,6 +211,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Scale From Changes a game object's scale to the specified value and back to its original scale over time. +Defined in Fungus.Commands.ScaleFrom + Property | Type | Description --- | --- | --- _from Transform | Fungus.Variables.TransformData | Target transform that the GameObject will scale from @@ -202,6 +228,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Scale To Changes a game object's scale to a specified value over time. +Defined in Fungus.Commands.ScaleTo + Property | Type | Description --- | --- | --- _to Transform | Fungus.Variables.TransformData | Target transform that the GameObject will scale to @@ -217,6 +245,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Shake Position Randomly shakes a GameObject's position by a diminishing amount over time. +Defined in Fungus.Commands.ShakePosition + Property | Type | Description --- | --- | --- _amount | Fungus.Variables.Vector3Data | A translation offset in space the GameObject will animate to @@ -233,6 +263,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Shake Rotation Randomly shakes a GameObject's rotation by a diminishing amount over time. +Defined in Fungus.Commands.ShakeRotation + Property | Type | Description --- | --- | --- _amount | Fungus.Variables.Vector3Data | A rotation offset in space the GameObject will animate to @@ -248,6 +280,8 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Shake Scale Randomly shakes a GameObject's rotation by a diminishing amount over time. +Defined in Fungus.Commands.ShakeScale + Property | Type | Description --- | --- | --- _amount | Fungus.Variables.Vector3Data | A scale offset in space the GameObject will animate to @@ -262,9 +296,13 @@ Wait Until Finished | System.Boolean | Wait until the tween has finished before ## Stop Tween Stops an active iTween by name. +Defined in Fungus.Commands.StopTween + Property | Type | Description --- | --- | --- _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. + +Defined in Fungus.Commands.StopTweens diff --git a/Docs/command_ref/narrative_commands.md b/Docs/command_ref/narrative_commands.md index d78e6c97..f1bb1656 100644 --- a/Docs/command_ref/narrative_commands.md +++ b/Docs/command_ref/narrative_commands.md @@ -3,6 +3,8 @@ ## Clear Menu Clears the options from a menu dialogue +Defined in Fungus.Commands.ClearMenu + Property | Type | Description --- | --- | --- Menu Dialog | Fungus.MenuDialog | Menu Dialog to clear the options on @@ -10,6 +12,8 @@ Menu Dialog | Fungus.MenuDialog | Menu Dialog to clear the options on ## Control Stage Controls the stage on which character portraits are displayed. +Defined in Fungus.Commands.ControlStage + Property | Type | Description --- | --- | --- Stage | Fungus.Stage | Stage to display characters on @@ -21,9 +25,13 @@ 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] + +Defined in Fungus.Commands.Conversation ## Menu Displays a button in a multiple choice menu +Defined in Fungus.Commands.Menu + Property | Type | Description --- | --- | --- Text | System.String | Text to display on the menu button @@ -36,6 +44,8 @@ Set Menu Dialog | Fungus.MenuDialog | A custom Menu Dialog to use to display thi ## Menu Timer 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 + Property | Type | Description --- | --- | --- _duration | Fungus.Variables.FloatData | Length of time to display the timer for @@ -44,6 +54,8 @@ Target Block | Fungus.Block | Block to execute when the timer expires ## Portrait Controls a character portrait. +Defined in Fungus.Commands.Portrait + Property | Type | Description --- | --- | --- Stage | Fungus.Stage | Stage to display portrait on @@ -66,6 +78,8 @@ Display | Fungus.DisplayType | Display type ## Say Writes text in a dialog box. +Defined in Fungus.Commands.Say + Property | Type | Description --- | --- | --- Description | System.String | Notes about this story text for other authors, localization, etc. @@ -83,6 +97,8 @@ Set Say Dialog | Fungus.SayDialog | Sets the active Say dialog with a reference ## Set Language 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 + Property | Type | Description --- | --- | --- _language Code | Fungus.Variables.StringData | Code of the language to set. e.g. ES, DE, JA @@ -90,6 +106,8 @@ _language Code | Fungus.Variables.StringData | Code of the language to set. e.g. ## Set Menu Dialog Sets a custom menu dialog to use when displaying multiple choice menus +Defined in Fungus.Commands.SetMenuDialog + Property | Type | Description --- | --- | --- Menu Dialog | Fungus.MenuDialog | The Menu Dialog to use for displaying menu buttons @@ -97,6 +115,8 @@ Menu Dialog | Fungus.MenuDialog | The Menu Dialog to use for displaying menu but ## Set Say Dialog Sets a custom say dialog to use when displaying story text +Defined in Fungus.Commands.SetSayDialog + Property | Type | Description --- | --- | --- Say Dialog | Fungus.SayDialog | The Say Dialog to use for displaying Say story text diff --git a/Docs/command_ref/scripting_commands.md b/Docs/command_ref/scripting_commands.md index 00ac598d..a8489ce0 100644 --- a/Docs/command_ref/scripting_commands.md +++ b/Docs/command_ref/scripting_commands.md @@ -3,6 +3,8 @@ ## Comment Use comments to record design notes and reminders about your game. +Defined in Fungus.Commands.Comment + Property | Type | Description --- | --- | --- Commenter Name | System.String | Name of Commenter @@ -11,6 +13,8 @@ Comment Text | System.String | Text to display for this comment ## Call Method Calls a named method on a GameObject using the GameObject.SendMessage() system. +Defined in Fungus.Commands.CallMethod + Property | Type | Description --- | --- | --- Target Object | UnityEngine.GameObject | Target monobehavior which contains the method we want to call @@ -20,6 +24,8 @@ Delay | System.Single | Delay (in seconds) before the method will be called ## Debug Log Writes a log message to the debug console. +Defined in Fungus.Commands.DebugLog + Property | Type | Description --- | --- | --- Log Type | Fungus.Commands.DebugLogType | Display type of debug log info @@ -28,6 +34,8 @@ Log Message | Fungus.Variables.StringDataMulti | Text to write to the debug log. ## Destroy Destroys a specified game object in the scene. +Defined in Fungus.Commands.Destroy + Property | Type | Description --- | --- | --- _target Game Object | Fungus.Variables.GameObjectData | Reference to game object to destroy @@ -35,6 +43,8 @@ _target Game Object | Fungus.Variables.GameObjectData | Reference to game object ## Execute Lua Executes a Lua code chunk using a Lua Environment. +Defined in Fungus.Commands.ExecuteLua + Property | Type | Description --- | --- | --- Lua Environment | Fungus.LuaEnvironment | Lua Environment to use to execute this Lua script @@ -47,6 +57,8 @@ Return Variable | Fungus.Variable | A Flowchart variable to store the returned v ## Invoke Event 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 + Property | Type | Description --- | --- | --- Delay | System.Single | Delay (in seconds) before the methods will be called @@ -63,6 +75,8 @@ String Event | Fungus.Commands.InvokeEvent+StringEvent | List of methods to call ## Invoke Method 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 + Property | Type | Description --- | --- | --- Target Object | UnityEngine.GameObject | GameObject containing the component method to be invoked @@ -81,6 +95,8 @@ Call Mode | Fungus.Commands.CallMode | The coroutine call behavior for methods t ## Open URL Opens the specified URL in the browser. +Defined in Fungus.Commands.LinkToWebsite + Property | Type | Description --- | --- | --- Url | Fungus.Variables.StringData | URL to open in the browser @@ -88,6 +104,8 @@ Url | Fungus.Variables.StringData | URL to open in the browser ## Set Active Sets a game object in the scene to be active / inactive. +Defined in Fungus.Commands.SetActive + Property | Type | Description --- | --- | --- _target Game Object | Fungus.Variables.GameObjectData | Reference to game object to enable / disable @@ -96,6 +114,8 @@ Active State | Fungus.Variables.BooleanData | Set to true to enable the game obj ## Spawn Object Spawns a new object based on a reference to a scene or prefab game object. +Defined in Fungus.Commands.SpawnObject + Property | Type | Description --- | --- | --- _source Object | Fungus.Variables.GameObjectData | Game object to copy when spawning. Can be a scene object or a prefab. diff --git a/Docs/command_ref/sprite_commands.md b/Docs/command_ref/sprite_commands.md index 28fddaae..26ff919e 100644 --- a/Docs/command_ref/sprite_commands.md +++ b/Docs/command_ref/sprite_commands.md @@ -3,6 +3,8 @@ ## Fade Sprite Fades a sprite to a target color over a period of time. +Defined in Fungus.Commands.FadeSprite + Property | Type | Description --- | --- | --- Sprite Renderer | UnityEngine.SpriteRenderer | Sprite object to be faded @@ -13,6 +15,8 @@ Wait Until Finished | System.Boolean | Wait until the fade has finished before e ## Set Clickable 2D Sets a Clickable2D component to be clickable / non-clickable. +Defined in Fungus.Commands.SetClickable2D + Property | Type | Description --- | --- | --- Target Clickable2 D | Fungus.Clickable2D | Reference to Clickable2D component on a gameobject @@ -21,6 +25,8 @@ Active State | Fungus.Variables.BooleanData | Set to true to enable the componen ## Set Collider Sets all collider (2d or 3d) components on the target objects to be active / inactive +Defined in Fungus.Commands.SetCollider + Property | Type | Description --- | --- | --- Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | A list of gameobjects containing collider components to be set active / inactive @@ -30,6 +36,8 @@ Active State | Fungus.Variables.BooleanData | Set to true to enable the collider ## Set Draggable 2D Sets a Draggable2D component to be draggable / non-draggable. +Defined in Fungus.Commands.SetDraggable2D + Property | Type | Description --- | --- | --- Target Draggable2 D | Fungus.Draggable2D | Reference to Draggable2D component on a gameobject @@ -38,6 +46,8 @@ Active State | Fungus.Variables.BooleanData | Set to true to enable the componen ## Set Mouse Cursor Sets the mouse cursor sprite. +Defined in Fungus.Commands.SetMouseCursor + Property | Type | Description --- | --- | --- Cursor Texture | UnityEngine.Texture2D | Texture to use for cursor. Will use default mouse cursor if no sprite is specified @@ -46,6 +56,8 @@ Hot Spot | UnityEngine.Vector2 | The offset from the top left of the texture to ## Set Sorting Layer 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 + Property | Type | Description --- | --- | --- Target Object | UnityEngine.GameObject | Root Object that will have the Sorting Layer set. Any children will also be affected @@ -54,6 +66,8 @@ Sorting Layer | System.String | The New Layer Name to apply ## Set Sprite Order Controls the render order of sprites by setting the Order In Layer property of a list of sprites. +Defined in Fungus.Commands.SetSpriteOrder + Property | Type | Description --- | --- | --- Target Sprites | System.Collections.Generic.List`1[UnityEngine.SpriteRenderer] | List of sprites to set the order in layer property on @@ -62,6 +76,8 @@ Order In Layer | Fungus.Variables.IntegerData | The order in layer value to set ## Show Sprite Makes a sprite visible / invisible by setting the color alpha. +Defined in Fungus.Commands.ShowSprite + Property | Type | Description --- | --- | --- Sprite Renderer | UnityEngine.SpriteRenderer | Sprite object to be made visible / invisible diff --git a/Docs/command_ref/sprite_events.md b/Docs/command_ref/sprite_events.md index 23ce857d..2a46fc89 100644 --- a/Docs/command_ref/sprite_events.md +++ b/Docs/command_ref/sprite_events.md @@ -3,6 +3,8 @@ ## Drag Cancelled 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 + Property | Type | Description --- | --- | --- Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on @@ -10,6 +12,8 @@ Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag even ## Drag Completed The block will execute when the player drags an object and successfully drops it on a target object. +Defined in Fungus.EventHandlers.DragCompleted + Property | Type | Description --- | --- | --- Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on @@ -18,6 +22,8 @@ Target Object | UnityEngine.Collider2D | Drag target object to listen for drag e ## Drag Entered The block will execute when the player is dragging an object which starts touching the target object. +Defined in Fungus.EventHandlers.DragEntered + Property | Type | Description --- | --- | --- Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on @@ -26,6 +32,8 @@ Target Object | UnityEngine.Collider2D | Drag target object to listen for drag e ## Drag Exited The block will execute when the player is dragging an object which stops touching the target object. +Defined in Fungus.EventHandlers.DragExited + Property | Type | Description --- | --- | --- Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on @@ -33,9 +41,13 @@ Target Object | UnityEngine.Collider2D | Drag target object to listen for drag e ## Drag Started The block will execute when the player starts dragging an object. + +Defined in Fungus.EventHandlers.DragStarted ## Object Clicked The block will execute when the user clicks or taps on the clickable object. +Defined in Fungus.EventHandlers.ObjectClicked + Property | Type | Description --- | --- | --- Clickable Object | Fungus.Clickable2D | Object that the user can click or tap on diff --git a/Docs/command_ref/tests_commands.md b/Docs/command_ref/tests_commands.md index 7059e670..be58d7da 100644 --- a/Docs/command_ref/tests_commands.md +++ b/Docs/command_ref/tests_commands.md @@ -2,7 +2,13 @@ ## Fail Fails the current integration test + +Defined in Fungus.FailTest ## Pass Passes the current integration test + +Defined in Fungus.PassTest ## 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 8016b4f8..c0ac2d1f 100644 --- a/Docs/command_ref/ui_commands.md +++ b/Docs/command_ref/ui_commands.md @@ -3,6 +3,8 @@ ## Fade UI Fades a UI object +Defined in Fungus.Commands.FadeUI + Property | Type | Description --- | --- | --- Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | List of objects to be affected by the tween @@ -13,6 +15,8 @@ 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. +Defined in Fungus.Commands.GetText + Property | Type | Description --- | --- | --- Target Text Object | UnityEngine.GameObject | Text object to get text value from @@ -21,6 +25,8 @@ String Variable | Fungus.Variables.StringVariable | String variable to store the ## Set Interactable Set the interactable sate of selectable objects. +Defined in Fungus.Commands.SetInteractable + Property | Type | Description --- | --- | --- Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | List of objects to be affected by the command @@ -29,6 +35,8 @@ Interactable State | Fungus.Variables.BooleanData | Controls if the selectable U ## Set Slider Value Sets the value property of a slider object +Defined in Fungus.Commands.SetSliderValue + Property | Type | Description --- | --- | --- Slider | UnityEngine.UI.Slider | Target slider object to set the value on @@ -37,6 +45,8 @@ 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. +Defined in Fungus.Commands.SetText + 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. @@ -46,6 +56,8 @@ Description | System.String | Notes about this story text for other authors, loc ## Write Writes content to a UI Text or Text Mesh object. +Defined in Fungus.Commands.Write + Property | Type | Description --- | --- | --- Text Object | UnityEngine.GameObject | Text object to set text on. Text, Input Field and Text Mesh objects are supported. diff --git a/Docs/command_ref/ui_events.md b/Docs/command_ref/ui_events.md index 8fb7e21c..6ee82a0b 100644 --- a/Docs/command_ref/ui_events.md +++ b/Docs/command_ref/ui_events.md @@ -3,6 +3,8 @@ ## Button Clicked The block will execute when the user clicks on the target UI button object. +Defined in Fungus.EventHandlers.ButtonClicked + Property | Type | Description --- | --- | --- Target Button | UnityEngine.UI.Button | The UI Button that the user can click on @@ -10,6 +12,8 @@ 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. +Defined in Fungus.EventHandlers.EndEdit + Property | Type | Description --- | --- | --- Target Input Field | UnityEngine.UI.InputField | The UI Input Field that the user can enter text into diff --git a/Docs/command_ref/variable_commands.md b/Docs/command_ref/variable_commands.md index 6271029f..2a0e4b32 100644 --- a/Docs/command_ref/variable_commands.md +++ b/Docs/command_ref/variable_commands.md @@ -3,6 +3,8 @@ ## Delete Save Key Deletes a saved value from permanent storage. +Defined in Fungus.Commands.DeleteSaveKey + Property | Type | Description --- | --- | --- Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber} @@ -10,6 +12,8 @@ Key | System.String | Name of the saved value. Supports variable substition e.g. ## Load Variable 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 + Property | Type | Description --- | --- | --- Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber}" @@ -18,6 +22,8 @@ Variable | Fungus.Variable | Variable to store the value in. ## Random Float Sets an float variable to a random value in the defined range. +Defined in Fungus.Commands.RandomFloat + Property | Type | Description --- | --- | --- Variable | Fungus.Variables.FloatVariable | The variable whos value will be set @@ -27,6 +33,8 @@ Max Value | Fungus.Variables.FloatData | Maximum value for random range ## Random Integer Sets an integer variable to a random value in the defined range. +Defined in Fungus.Commands.RandomInteger + Property | Type | Description --- | --- | --- Variable | Fungus.Variables.IntegerVariable | The variable whos value will be set @@ -36,6 +44,8 @@ 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 +Defined in Fungus.Commands.ReadTextFile + Property | Type | Description --- | --- | --- Text File | UnityEngine.TextAsset | Text file to read into the string variable @@ -44,6 +54,8 @@ String Variable | Fungus.Variables.StringVariable | String variable to store the ## Reset Resets the state of all commands and variables in the Flowchart. +Defined in Fungus.Commands.Reset + Property | Type | Description --- | --- | --- Reset Commands | System.Boolean | Reset state of all commands in the script @@ -52,6 +64,8 @@ Reset Variables | System.Boolean | Reset variables back to their default values ## Save Variable 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 + Property | Type | Description --- | --- | --- Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber} @@ -60,6 +74,8 @@ Variable | Fungus.Variable | Variable to read the value from. Only Boolean, Inte ## Set Save Profile 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 + Property | Type | Description --- | --- | --- Save Profile Name | System.String | Name of save profile to make active. @@ -67,6 +83,8 @@ Save Profile Name | System.String | Name of save profile to make active. ## Set Variable 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 + Property | Type | Description --- | --- | --- Variable | Fungus.Variable | The variable whos value will be set