Browse Source

Updated reference docs

master
Chris Gregan 6 years ago
parent
commit
a080149373
  1. 26
      Docs/command_ref/audio_commands.md
  2. 10
      Docs/command_ref/sprite_commands.md
  3. 10
      Docs/command_ref/ui_commands.md
  4. 20
      Docs/command_ref/variable_commands.md

26
Docs/command_ref/audio_commands.md

@ -15,6 +15,17 @@ End Volume | System.Single | End audio at this volume
Fade Duration | System.Single | Time to fade between current volume level and target volume level. Fade Duration | System.Single | Time to fade between current volume level and target volume level.
Wait Until Finished | System.Boolean | Wait until this command has finished before executing the next command. Wait Until Finished | System.Boolean | Wait until this command has finished before executing the next command.
# Play Ambiance Sound # {#PlayAmbianceSound}
Plays a background sound to be overlayed on top of the music. Only one Ambiance can be played at a time.
Defined in Fungus.PlayAmbianceSound
Property | Type | Description
--- | --- | ---
Sound Clip | UnityEngine.AudioClip | Sound effect clip to play
Volume | System.Single | Volume level of the sound effect
Loop | System.Boolean | Sound effect clip to play
# Play Music # {#PlayMusic} # Play Music # {#PlayMusic}
Plays looping game music. If any game music is already playing, it is stopped. Game music will continue playing across scene loads. Plays looping game music. If any game music is already playing, it is stopped. Game music will continue playing across scene loads.
@ -27,6 +38,17 @@ At Time | System.Single | Time to begin playing in seconds. If the audio file is
Loop | System.Boolean | The music will start playing again at end. Loop | System.Boolean | The music will start playing again at end.
Fade Duration | System.Single | Length of time to fade out previous playing music. Fade Duration | System.Single | Length of time to fade out previous playing music.
# Play Random Sound # {#PlayRandomSound}
Plays a once-off sound effect from a list of available sound effects. Multiple sound effects can be played at the same time.
Defined in Fungus.PlayRandomSound
Property | Type | Description
--- | --- | ---
Sound Clip | UnityEngine.AudioClip[] | Sound effect clip to play
Volume | System.Single | Volume level of the sound effect
Wait Until Finished | System.Boolean | Wait until the sound has finished playing before continuing execution.
# Play Sound # {#PlaySound} # Play Sound # {#PlaySound}
Plays a once-off sound effect. Multiple sound effects can be played at the same time. Plays a once-off sound effect. Multiple sound effects can be played at the same time.
@ -71,6 +93,10 @@ Volume | System.Single | Global volume level for audio played using Play Music a
Fade Duration | System.Single | Time to fade between current volume level and target volume level. Fade Duration | System.Single | Time to fade between current volume level and target volume level.
Wait Until Finished | System.Boolean | Wait until the volume fade has completed before continuing. Wait Until Finished | System.Boolean | Wait until the volume fade has completed before continuing.
# Stop Ambiance # {#StopAmbiance}
Stops the currently playing game ambiance.
Defined in Fungus.StopAmbiance
# Stop Music # {#StopMusic} # Stop Music # {#StopMusic}
Stops the currently playing game music. Stops the currently playing game music.

10
Docs/command_ref/sprite_commands.md

@ -64,6 +64,16 @@ Property | Type | Description
Target Object | UnityEngine.GameObject | Root Object that will have the Sorting Layer set. Any children will also be affected Target Object | UnityEngine.GameObject | Root Object that will have the Sorting Layer set. Any children will also be affected
Sorting Layer | System.String | The New Layer Name to apply Sorting Layer | System.String | The New Layer Name to apply
# Set Sprite # {#SetSprite}
Changes the sprite property of a list of Sprite Renderers.
Defined in Fungus.SetSprite
Property | Type | Description
--- | --- | ---
Sprite Renderers | System.Collections.Generic.List`1[UnityEngine.SpriteRenderer] | List of sprites to set the sprite property on
Sprite | UnityEngine.Sprite | The sprite set on the target sprite renderers
# Set Sprite Order # {#SetSpriteOrder} # Set Sprite Order # {#SetSpriteOrder}
Controls the render order of sprites by setting the Order In Layer property of a list of sprites. Controls the render order of sprites by setting the Order In Layer property of a list of sprites.

10
Docs/command_ref/ui_commands.md

@ -74,6 +74,16 @@ Property | Type | Description
Toggle | UnityEngine.UI.Toggle | Target toggle object to set the state on Toggle | UnityEngine.UI.Toggle | Target toggle object to set the state on
Value | Fungus.BooleanData | Boolean value to set the toggle state to. Value | Fungus.BooleanData | Boolean value to set the toggle state to.
# Set UI Image # {#SetUIImage}
Changes the Image property of a list of UI Images.
Defined in Fungus.SetUIImage
Property | Type | Description
--- | --- | ---
Images | System.Collections.Generic.List`1[UnityEngine.UI.Image] | List of UI Images to set the source image property on
Sprite | UnityEngine.Sprite | The sprite set on the source image property
# Write # {#Write} # Write # {#Write}
Writes content to a UI Text or Text Mesh object. Writes content to a UI Text or Text Mesh object.

20
Docs/command_ref/variable_commands.md

@ -10,6 +10,16 @@ Property | Type | Description
--- | --- | --- --- | --- | ---
Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber} Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber}
# From String # {#FromString}
Attempts to parse a string into a given fungus variable type, such as integer or float
Defined in Fungus.FromString
Property | Type | Description
--- | --- | ---
Source String | Fungus.StringVariable | Source of string data to parse into another variables value
Out Value | Fungus.Variable | The variable type to be parsed and value stored within
# Load Variable # {#LoadVariable} # Load Variable # {#LoadVariable}
Loads a saved value and stores it in a Boolean, Integer, Float or String variable. If the key is not found then the variable is not modified. 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.
@ -107,3 +117,13 @@ Transform Data | Fungus.TransformData | Transform value to set with
Vector2 Data | Fungus.Vector2Data | Vector2 value to set with Vector2 Data | Fungus.Vector2Data | Vector2 value to set with
Vector3 Data | Fungus.Vector3Data | Vector3 value to set with Vector3 Data | Fungus.Vector3Data | Vector3 value to set with
# To String # {#ToString}
Stores the result of a ToString on given variable in a string.
Defined in Fungus.ToString
Property | Type | Description
--- | --- | ---
Variable | Fungus.Variable | Target variable to get String of.
Out Value | Fungus.StringVariable | Variable to store the result of ToString

Loading…
Cancel
Save