Browse Source
Correct Fungus Priority Category to remove space Added Convert To Github wiki format function to Tools menu Export of reference docs moved out of BlockEditor.csmaster
Steve Halliwell
5 years ago
committed by
GitHub
77 changed files with 282 additions and 9612 deletions
@ -0,0 +1,223 @@ |
|||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.IO; |
||||||
|
using System.Linq; |
||||||
|
using System.Reflection; |
||||||
|
using System.Text.RegularExpressions; |
||||||
|
using UnityEditor; |
||||||
|
using UnityEngine; |
||||||
|
|
||||||
|
namespace Fungus.EditorUtils |
||||||
|
{ |
||||||
|
/// <summary> |
||||||
|
/// Helper functions for generating the markdown files for Fungus Commands and Events. |
||||||
|
/// </summary> |
||||||
|
public static class ExportReferenceDocs |
||||||
|
{ |
||||||
|
private const string CommandRefDocPath = BaseDocPath + "command_ref/"; |
||||||
|
private const string BaseDocPath = "./Docs/"; |
||||||
|
|
||||||
|
[MenuItem("Tools/Fungus/Utilities/Export Reference Docs")] |
||||||
|
internal static void Export() |
||||||
|
{ |
||||||
|
ExportCommandInfo(); |
||||||
|
ExportEventHandlerInfo(); |
||||||
|
|
||||||
|
FlowchartWindow.ShowNotification("Exported Reference Documentation"); |
||||||
|
} |
||||||
|
|
||||||
|
private static void ExportCommandInfo() |
||||||
|
{ |
||||||
|
// Dump command info |
||||||
|
List<System.Type> menuTypes = EditorExtensions.FindDerivedTypes(typeof(Command)).ToList(); |
||||||
|
List<KeyValuePair<System.Type, CommandInfoAttribute>> filteredAttributes = BlockEditor.GetFilteredCommandInfoAttribute(menuTypes); |
||||||
|
filteredAttributes.Sort(BlockEditor.CompareCommandAttributes); |
||||||
|
|
||||||
|
// Build list of command categories |
||||||
|
List<string> commandCategories = new List<string>(); |
||||||
|
foreach (var keyPair in filteredAttributes) |
||||||
|
{ |
||||||
|
CommandInfoAttribute info = keyPair.Value; |
||||||
|
if (info.Category != "" && |
||||||
|
!commandCategories.Contains(info.Category)) |
||||||
|
{ |
||||||
|
commandCategories.Add(info.Category); |
||||||
|
} |
||||||
|
} |
||||||
|
commandCategories.Sort(); |
||||||
|
|
||||||
|
var sb = new System.Text.StringBuilder(@"# Command Reference
|
||||||
|
|
||||||
|
This is the reference documentation for all Fungus commands. |
||||||
|
|
||||||
|
");
|
||||||
|
// Output the commands in each category |
||||||
|
foreach (string category in commandCategories) |
||||||
|
{ |
||||||
|
string markdown = "# " + category + " commands # {#" + category.ToLower() + "_commands}\n\n"; |
||||||
|
markdown += "[TOC]\n"; |
||||||
|
|
||||||
|
foreach (var keyPair in filteredAttributes) |
||||||
|
{ |
||||||
|
CommandInfoAttribute info = keyPair.Value; |
||||||
|
|
||||||
|
if (info.Category == category || |
||||||
|
info.Category == "" && category == "Scripting") |
||||||
|
{ |
||||||
|
markdown += "# " + info.CommandName + " # {#" + info.CommandName.Replace(" ", "") + "}\n"; |
||||||
|
markdown += info.HelpText + "\n\n"; |
||||||
|
markdown += "Defined in " + keyPair.Key.FullName + "\n"; |
||||||
|
markdown += GetPropertyInfo(keyPair.Key); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
WriteFile(markdown, CommandRefDocPath, category.ToLower(), "_commands.md"); |
||||||
|
sb.Append("* [").Append(category).Append("](").Append(category.ToLower()).AppendLine("_commands)"); |
||||||
|
} |
||||||
|
|
||||||
|
sb.AppendLine(); |
||||||
|
WriteFile(sb.ToString(), BaseDocPath, "", "command_reference.md"); |
||||||
|
} |
||||||
|
|
||||||
|
private static void ExportEventHandlerInfo() |
||||||
|
{ |
||||||
|
List<System.Type> eventHandlerTypes = EditorExtensions.FindDerivedTypes(typeof(EventHandler)).ToList(); |
||||||
|
List<string> eventHandlerCategories = new List<string>(); |
||||||
|
eventHandlerCategories.Add("Core"); |
||||||
|
foreach (System.Type type in eventHandlerTypes) |
||||||
|
{ |
||||||
|
EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type); |
||||||
|
if (info != null && |
||||||
|
info.Category != "" && |
||||||
|
!eventHandlerCategories.Contains(info.Category)) |
||||||
|
{ |
||||||
|
eventHandlerCategories.Add(info.Category); |
||||||
|
} |
||||||
|
} |
||||||
|
eventHandlerCategories.Sort(); |
||||||
|
|
||||||
|
var sb = new System.Text.StringBuilder(@"# Event Handler Reference {#eventhandler_reference}
|
||||||
|
|
||||||
|
This is the reference documentation for all Fungus event handlers. |
||||||
|
|
||||||
|
");
|
||||||
|
|
||||||
|
// Output the commands in each category |
||||||
|
foreach (string category in eventHandlerCategories) |
||||||
|
{ |
||||||
|
string markdown = "# " + category + " event handlers # {#" + category.ToLower() + "_events}\n\n"; |
||||||
|
markdown += "[TOC]\n"; |
||||||
|
|
||||||
|
foreach (System.Type type in eventHandlerTypes) |
||||||
|
{ |
||||||
|
EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type); |
||||||
|
|
||||||
|
if (info != null && |
||||||
|
(info.Category == category || |
||||||
|
(info.Category == "" && category == "Core"))) |
||||||
|
{ |
||||||
|
markdown += "# " + info.EventHandlerName + " # {#" + info.EventHandlerName.Replace(" ", "") + "}\n"; |
||||||
|
markdown += info.HelpText + "\n\n"; |
||||||
|
markdown += "Defined in " + type.FullName + "\n"; |
||||||
|
markdown += GetPropertyInfo(type); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
WriteFile(markdown, CommandRefDocPath, category.ToLower(), "_events.md"); |
||||||
|
sb.Append("* [").Append(category).Append("](").Append(category.ToLower()).AppendLine("_events)"); |
||||||
|
} |
||||||
|
|
||||||
|
sb.AppendLine(); |
||||||
|
WriteFile(sb.ToString(), BaseDocPath, "", "eventhandler_reference.md"); |
||||||
|
} |
||||||
|
|
||||||
|
private static void WriteFile(string markdown, string path, string category, string suffix) |
||||||
|
{ |
||||||
|
markdown += "Auto-Generated by Fungus.ExportReferenceDocs"; |
||||||
|
|
||||||
|
string filePath = path + category.ToLower() + suffix; |
||||||
|
|
||||||
|
Directory.CreateDirectory(Path.GetDirectoryName(filePath)); |
||||||
|
File.WriteAllText(filePath, markdown); |
||||||
|
} |
||||||
|
|
||||||
|
private static string GetPropertyInfo(System.Type type) |
||||||
|
{ |
||||||
|
string markdown = ""; |
||||||
|
foreach (FieldInfo field in type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) |
||||||
|
{ |
||||||
|
TooltipAttribute attribute = (TooltipAttribute)Attribute.GetCustomAttribute(field, typeof(TooltipAttribute)); |
||||||
|
if (attribute == null) |
||||||
|
{ |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
// Change field name to how it's displayed in the inspector |
||||||
|
string propertyName = Regex.Replace(field.Name, "(\\B[A-Z])", " $1"); |
||||||
|
if (propertyName.Length > 1) |
||||||
|
{ |
||||||
|
propertyName = propertyName.Substring(0, 1).ToUpper() + propertyName.Substring(1); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
propertyName = propertyName.ToUpper(); |
||||||
|
} |
||||||
|
|
||||||
|
markdown += propertyName + " | " + field.FieldType + " | " + attribute.tooltip + "\n"; |
||||||
|
} |
||||||
|
|
||||||
|
if (markdown.Length > 0) |
||||||
|
{ |
||||||
|
markdown = "\nProperty | Type | Description\n --- | --- | ---\n" + markdown + "\n"; |
||||||
|
} |
||||||
|
|
||||||
|
return markdown; |
||||||
|
} |
||||||
|
|
||||||
|
[MenuItem("Tools/Fungus/Utilities/Convert Docs to GitHub MD")] |
||||||
|
internal static void ConvertAllToGHMD() |
||||||
|
{ |
||||||
|
var files = Directory.GetFiles(BaseDocPath, "*.md", SearchOption.AllDirectories); |
||||||
|
foreach (var file in files) |
||||||
|
{ |
||||||
|
ConvertFileToGHMD(file); |
||||||
|
} |
||||||
|
|
||||||
|
FlowchartWindow.ShowNotification("Converted " + files.Length.ToString() + " to Github MD"); |
||||||
|
} |
||||||
|
|
||||||
|
//strips anchor links and TOC, which are not supported on Github wiki mds |
||||||
|
private static void ConvertFileToGHMD(string fileLoc) |
||||||
|
{ |
||||||
|
var sb = new System.Text.StringBuilder(); |
||||||
|
var lines = File.ReadAllLines(fileLoc); |
||||||
|
|
||||||
|
foreach (var line in lines) |
||||||
|
{ |
||||||
|
if (line.Length > 0 && line[0] == '#') |
||||||
|
{ |
||||||
|
var secondToken = line.IndexOf(" # "); |
||||||
|
if (secondToken != -1) |
||||||
|
{ |
||||||
|
var heading = line.Substring(0, secondToken); |
||||||
|
sb.AppendLine(heading); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
sb.AppendLine(line); |
||||||
|
} |
||||||
|
} |
||||||
|
else if (line == "[TOC]") |
||||||
|
{ |
||||||
|
//skip |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
sb.AppendLine(line); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
File.WriteAllText(fileLoc, sb.ToString()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ae5ffaf325414b049a5c31ab9b9bb22d |
||||||
|
MonoImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -1,315 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||||
<PropertyGroup> |
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Default</Configuration> |
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
||||||
<ItemType>GenericProject</ItemType> |
|
||||||
<ProductVersion>8.0.30703</ProductVersion> |
|
||||||
<SchemaVersion>2.0</SchemaVersion> |
|
||||||
<ProjectGuid>{759F8A19-D1F3-4AB1-AD0F-38533A0F2BEA}</ProjectGuid> |
|
||||||
</PropertyGroup> |
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Default|AnyCPU' "> |
|
||||||
<OutputPath>.</OutputPath> |
|
||||||
</PropertyGroup> |
|
||||||
<ItemGroup> |
|
||||||
<None Include="Doxyfile" /> |
|
||||||
<None Include="readme.txt" /> |
|
||||||
<None Include="command_ref\animation_commands.md" /> |
|
||||||
<None Include="command_ref\audio_commands.md" /> |
|
||||||
<None Include="command_ref\camera_commands.md" /> |
|
||||||
<None Include="command_ref\core_events.md" /> |
|
||||||
<None Include="command_ref\flow_commands.md" /> |
|
||||||
<None Include="command_ref\input_events.md" /> |
|
||||||
<None Include="command_ref\input_commands.md" /> |
|
||||||
<None Include="command_ref\itween_commands.md" /> |
|
||||||
<None Include="command_ref\leanTween_commands.md" /> |
|
||||||
<None Include="command_ref\math_commands.md" /> |
|
||||||
<None Include="command_ref\monoBeh_events.md" /> |
|
||||||
<None Include="command_ref\narrative_commands.md" /> |
|
||||||
<None Include="command_ref\rigidbody2d_commands.md" /> |
|
||||||
<None Include="command_ref\scene_commands.md" /> |
|
||||||
<None Include="command_ref\scripting_commands.md" /> |
|
||||||
<None Include="command_ref\sprite_commands.md" /> |
|
||||||
<None Include="command_ref\sprite_events.md" /> |
|
||||||
<None Include="command_ref\tests_commands.md" /> |
|
||||||
<None Include="command_ref\transform_commands.md" /> |
|
||||||
<None Include="command_ref\vector3_commands.md" /> |
|
||||||
<None Include="command_ref\ui_commands.md" /> |
|
||||||
<None Include="command_ref\ui_events.md" /> |
|
||||||
<None Include="command_ref\variable_commands.md" /> |
|
||||||
<None Include="fungus_docs\about_fungus.md" /> |
|
||||||
<None Include="fungus_docs\blocks.md" /> |
|
||||||
<None Include="fungus_docs\code_of_conduct.md" /> |
|
||||||
<None Include="fungus_docs\community_tutorials.md" /> |
|
||||||
<None Include="fungus_docs\conversation_system.md" /> |
|
||||||
<None Include="fungus_docs\faq.md" /> |
|
||||||
<None Include="fungus_docs\flowcharts.md" /> |
|
||||||
<None Include="fungus_docs\getting_started.md" /> |
|
||||||
<None Include="fungus_docs\glossary.md" /> |
|
||||||
<None Include="fungus_docs\installation.md" /> |
|
||||||
<None Include="fungus_docs\narrative_text_tags.md" /> |
|
||||||
<None Include="fungus_docs\playing_audio.md" /> |
|
||||||
<None Include="fungus_docs\telling_a_story.md" /> |
|
||||||
<None Include="fungus_docs\training_course.md" /> |
|
||||||
<None Include="fungus_docs\tutorial_videos.md" /> |
|
||||||
<None Include="fungus_lua\lua_about_fungus_lua.md" /> |
|
||||||
<None Include="fungus_lua\lua_bindings.md" /> |
|
||||||
<None Include="fungus_lua\lua_controlling_fungus.md" /> |
|
||||||
<None Include="fungus_lua\lua_create_menu.md" /> |
|
||||||
<None Include="fungus_lua\lua_environment.md" /> |
|
||||||
<None Include="fungus_lua\lua_execute_lua.md" /> |
|
||||||
<None Include="fungus_lua\lua_fungus_module.md" /> |
|
||||||
<None Include="fungus_lua\lua_preferences.md" /> |
|
||||||
<None Include="fungus_lua\lua_script.md" /> |
|
||||||
<None Include="fungus_lua\lua_store.md" /> |
|
||||||
<None Include="fungus_lua\lua_string_table.md" /> |
|
||||||
<None Include="fungus_lua\lua_unity_test_tools.md" /> |
|
||||||
<None Include="fungus_lua\lua_utils.md" /> |
|
||||||
<None Include="resources\header.html" /> |
|
||||||
<None Include="resources\about\B03899_MockupCover_Cookbook.jpg" /> |
|
||||||
<None Include="resources\about\community.jpeg" /> |
|
||||||
<None Include="resources\about\fungus_town.png" /> |
|
||||||
<None Include="resources\blocks\001_3_block_types\1_event_block.png" /> |
|
||||||
<None Include="resources\blocks\001_3_block_types\2_branching_block.png" /> |
|
||||||
<None Include="resources\blocks\001_3_block_types\3_standard_block.png" /> |
|
||||||
<None Include="resources\blocks\002_call_other_blocks\1_start.png" /> |
|
||||||
<None Include="resources\blocks\002_call_other_blocks\2_block2.png" /> |
|
||||||
<None Include="resources\blocks\002_call_other_blocks\3_menu_call.png" /> |
|
||||||
<None Include="resources\blocks\002_call_other_blocks\4_call_block.png" /> |
|
||||||
<None Include="resources\blocks\002_call_other_blocks\5_arrow.png" /> |
|
||||||
<None Include="resources\blocks\003_highlight_green_arrow\5_arrow.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\10_correct.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\11_wrong.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\1_correct_block.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\2_edited_say.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\3_flowchart_menu.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\4_menu_correct.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\5_connected_blocks.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\6_add_menu.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\7_wrong_block.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\8_three_block_menu.png" /> |
|
||||||
<None Include="resources\blocks\004_menu_maths\9_menu_running.png" /> |
|
||||||
<None Include="resources\blocks\005_blocks\1_block.png" /> |
|
||||||
<None Include="resources\blocks\005_blocks\2_properties.png" /> |
|
||||||
<None Include="resources\blocks\006_block_create\1_add_block_button.png" /> |
|
||||||
<None Include="resources\blocks\006_block_create\2_new_block_created.png" /> |
|
||||||
<None Include="resources\blocks\007_block_delete\1_delete_menu.png" /> |
|
||||||
<None Include="resources\blocks\007_block_delete\2_block_deleted.png" /> |
|
||||||
<None Include="resources\blocks\008_create_flowchart\1_tools_create.png" /> |
|
||||||
<None Include="resources\blocks\008_create_flowchart\2_flowchart_gameobject.png" /> |
|
||||||
<None Include="resources\blocks\008_create_flowchart\3_flowchart_properties copy.png" /> |
|
||||||
<None Include="resources\blocks\008_create_flowchart\3_flowchart_properties.png" /> |
|
||||||
<None Include="resources\blocks\009_block_duplicate\1_duplicate_menu.png" /> |
|
||||||
<None Include="resources\blocks\009_block_duplicate\2_duplicate_created.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\1_move1.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\2_move2.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\animated_block_move.gif" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\1_move1.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.52.57.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.00.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.02.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.03.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.05.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.06.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.08.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.09.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.11.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\Screen Shot 2015-06-11 at 13.53.14.png" /> |
|
||||||
<None Include="resources\blocks\010_block_move\GIFs\animated_block_move.psd" /> |
|
||||||
<None Include="resources\blocks\011_block_name\2_inspect_block.png" /> |
|
||||||
<None Include="resources\blocks\011_block_name\3_rename.png" /> |
|
||||||
<None Include="resources\blocks\011_block_name\4_description.png" /> |
|
||||||
<None Include="resources\blocks\012_define_event\1_define_event.png" /> |
|
||||||
<None Include="resources\download\001_install\0_asset_store.png" /> |
|
||||||
<None Include="resources\download\001_install\1_unityimport.png" /> |
|
||||||
<None Include="resources\download\001_install\2_packagecontents.png" /> |
|
||||||
<None Include="resources\download\001_install\3_fungusproject.png" /> |
|
||||||
<None Include="resources\download\001_install\4_downloads.png" /> |
|
||||||
<None Include="resources\download\001_install\5_assetstore_package.png" /> |
|
||||||
<None Include="resources\download\001_install\6_asset_store_details.png" /> |
|
||||||
<None Include="resources\flowcharts\001_what_is\1_example_flowchart.png" /> |
|
||||||
<None Include="resources\flowcharts\002_docking\1_menu.png" /> |
|
||||||
<None Include="resources\flowcharts\002_docking\2_window copy.png" /> |
|
||||||
<None Include="resources\flowcharts\002_docking\2_window.png" /> |
|
||||||
<None Include="resources\flowcharts\002_docking\3_docked.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\1_pan1.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\2_pan2.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\animated_drag_to_pan.gif" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.24.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.25.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.27.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.28.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.29.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.30.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.31.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.32.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.34.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.35.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.36.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\Screen Shot 2015-06-11 at 12.39.38.png" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\animated_drag_to_pan.psd" /> |
|
||||||
<None Include="resources\flowcharts\003_panning\GIFs\start.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\1_zoom1.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\2_zoom2.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\animated_zoom.gif" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.19.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.24.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.30.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.33.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.34.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.35.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.36.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.37.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.38.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.39.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.40.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.41.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\Screen Shot 2015-06-11 at 13.07.43.png" /> |
|
||||||
<None Include="resources\flowcharts\004_zooming\GIFs\animated_zoom.psd" /> |
|
||||||
<None Include="resources\flowcharts\005_create_flowchart\1_tools_create.png" /> |
|
||||||
<None Include="resources\flowcharts\005_create_flowchart\2_flowchart_gameobject.png" /> |
|
||||||
<None Include="resources\flowcharts\005_create_flowchart\3_flowchart_properties copy.png" /> |
|
||||||
<None Include="resources\flowcharts\005_create_flowchart\3_flowchart_properties.png" /> |
|
||||||
<None Include="resources\fungus_lua\.DS_Store" /> |
|
||||||
<None Include="resources\fungus_lua\create_menu.png" /> |
|
||||||
<None Include="resources\fungus_lua\lua.png" /> |
|
||||||
<None Include="resources\fungus_lua\lua_bindings.png" /> |
|
||||||
<None Include="resources\fungus_lua\lua_environment.png" /> |
|
||||||
<None Include="resources\fungus_lua\lua_script.png" /> |
|
||||||
<None Include="resources\fungus_lua\lua_stage_binding.png" /> |
|
||||||
<None Include="resources\fungus_lua\moonsharp.png" /> |
|
||||||
<None Include="resources\getting_started\002_docking\1_menu.png" /> |
|
||||||
<None Include="resources\getting_started\002_docking\2_window copy.png" /> |
|
||||||
<None Include="resources\getting_started\002_docking\2_window.png" /> |
|
||||||
<None Include="resources\getting_started\002_docking\3_docked.png" /> |
|
||||||
<None Include="resources\getting_started\003_flowchart\1_menu.png" /> |
|
||||||
<None Include="resources\getting_started\003_flowchart\2_gameobject.png" /> |
|
||||||
<None Include="resources\getting_started\004_examples\1_examples.png" /> |
|
||||||
<None Include="resources\getting_started\004_examples\2_filter_scenes copy.png" /> |
|
||||||
<None Include="resources\getting_started\004_examples\2_filter_scenes.png" /> |
|
||||||
<None Include="resources\getting_started\004_examples\3_project_window.png" /> |
|
||||||
<None Include="resources\getting_started\004_examples\4_filter_scenes_cancel.png" /> |
|
||||||
<None Include="resources\getting_started\004_examples\5_drag_drop.png" /> |
|
||||||
<None Include="resources\getting_started\004_examples\6_drag_running.png" /> |
|
||||||
<None Include="resources\getting_started\005_highlight_play_mode\1_prefs_tint copy.png" /> |
|
||||||
<None Include="resources\getting_started\005_highlight_play_mode\1_prefs_tint.png" /> |
|
||||||
<None Include="resources\getting_started\005_highlight_play_mode\2_green_play_mode.png" /> |
|
||||||
<None Include="resources\getting_started\005_highlight_play_mode\3_menu_prefs.png" /> |
|
||||||
<None Include="resources\getting_started\006_new_scene\1_default copy.png" /> |
|
||||||
<None Include="resources\getting_started\006_new_scene\1_default.png" /> |
|
||||||
<None Include="resources\getting_started\006_new_scene\2_save_as.png" /> |
|
||||||
<None Include="resources\getting_started\006_new_scene\3_saved_scene.png" /> |
|
||||||
<None Include="resources\getting_started\007_tools_menu\0_tools.png" /> |
|
||||||
<None Include="resources\getting_started\007_tools_menu\1_tools_create.png" /> |
|
||||||
<None Include="resources\getting_started\007_tools_menu\2_tools_utilities.png" /> |
|
||||||
<None Include="resources\getting_started\007_tools_menu\3_fungus_tools.png" /> |
|
||||||
<None Include="resources\getting_started\008_create_flowchart\1_tools_create.png" /> |
|
||||||
<None Include="resources\getting_started\008_create_flowchart\2_flowchart_gameobject.png" /> |
|
||||||
<None Include="resources\getting_started\008_create_flowchart\3_flowchart_properties copy.png" /> |
|
||||||
<None Include="resources\getting_started\008_create_flowchart\3_flowchart_properties.png" /> |
|
||||||
<None Include="resources\getting_started\009_rename_block\1_rename copy.png" /> |
|
||||||
<None Include="resources\getting_started\009_rename_block\1_rename.png" /> |
|
||||||
<None Include="resources\getting_started\010_say_command\1_plus.png" /> |
|
||||||
<None Include="resources\getting_started\010_say_command\2_narrative_say.png" /> |
|
||||||
<None Include="resources\getting_started\010_say_command\3_hello_fungus_world copy.png" /> |
|
||||||
<None Include="resources\getting_started\010_say_command\3_hello_fungus_world.png" /> |
|
||||||
<None Include="resources\getting_started\010_say_command\4_scene_running.png" /> |
|
||||||
<None Include="resources\glossary\001_3_block_types\1_event_block.png" /> |
|
||||||
<None Include="resources\glossary\001_3_block_types\2_branching_block.png" /> |
|
||||||
<None Include="resources\glossary\001_3_block_types\3_standard_block.png" /> |
|
||||||
<None Include="resources\glossary\001_variables\1_default_values.png" /> |
|
||||||
<None Include="resources\glossary\010_say_command\4_scene_running.png" /> |
|
||||||
<None Include="resources\glossary\011_menu_maths\9_menu_running.png" /> |
|
||||||
<None Include="resources\header\favicon.ico" /> |
|
||||||
<None Include="resources\header\logo.png" /> |
|
||||||
<None Include="resources\header\logo_mid.png" /> |
|
||||||
<None Include="resources\header\logo_small.png" /> |
|
||||||
<None Include="resources\playing_audio\000_big_picture\1_big_picture.png" /> |
|
||||||
<None Include="resources\playing_audio\001_clips\0_audio_in_examples copy.png" /> |
|
||||||
<None Include="resources\playing_audio\001_clips\0_audio_in_examples.png" /> |
|
||||||
<None Include="resources\playing_audio\002_audio_into_unity\1_drag_folder copy.png" /> |
|
||||||
<None Include="resources\playing_audio\002_audio_into_unity\1_drag_folder.png" /> |
|
||||||
<None Include="resources\playing_audio\003_fungus_audio_commands\1_audio_commands.png" /> |
|
||||||
<None Include="resources\playing_audio\003_fungus_audio_commands\2_say_voiceover_clip copy.png" /> |
|
||||||
<None Include="resources\playing_audio\003_fungus_audio_commands\2_say_voiceover_clip.png" /> |
|
||||||
<None Include="resources\playing_audio\004_play_music\1_add_playmusic_command.png" /> |
|
||||||
<None Include="resources\playing_audio\005_play_sound\1_play_sound.png" /> |
|
||||||
<None Include="resources\playing_audio\005_play_sound\2_wait_until_finished copy.png" /> |
|
||||||
<None Include="resources\playing_audio\005_play_sound\2_wait_until_finished.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\1_drag_music_clip.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\2_second_block.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\3_quieter.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\4_audio_volume_command.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\5_add_menu.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\6_link_to_quieter.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\7_green_arrow.png" /> |
|
||||||
<None Include="resources\playing_audio\006_set_audio_volume\8_output.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\1_create_empty.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\2_rename.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\3_drag_clip.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\4_add_command.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\5_drag_gameobject.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\6_control_audio_actions.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\7_duplicate.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\8_set_volume.png" /> |
|
||||||
<None Include="resources\playing_audio\007_control_audio\9_final_commands.png" /> |
|
||||||
<None Include="resources\playing_audio\008_say_audio_tags\1_say_tags.png" /> |
|
||||||
<None Include="resources\playing_audio\008_say_audio_tags\2_output.png" /> |
|
||||||
<None Include="resources\telling_a_story\001_characters\1_menu_character.png" /> |
|
||||||
<None Include="resources\telling_a_story\001_characters\2_new_character.png" /> |
|
||||||
<None Include="resources\telling_a_story\001_characters\3_tom.png" /> |
|
||||||
<None Include="resources\telling_a_story\001_characters\4_jerry.png" /> |
|
||||||
<None Include="resources\telling_a_story\001_characters\5_tom_say1.png" /> |
|
||||||
<None Include="resources\telling_a_story\001_characters\6_four_says.png" /> |
|
||||||
<None Include="resources\telling_a_story\001_characters\7_tom_jerry_chat.png" /> |
|
||||||
<None Include="resources\telling_a_story\002_portrait\1_sherlock.png" /> |
|
||||||
<None Include="resources\telling_a_story\002_portrait\2_add_portrait.png" /> |
|
||||||
<None Include="resources\telling_a_story\002_portrait\4_sherlock_output.png" /> |
|
||||||
<None Include="resources\telling_a_story\002_portrait\5_john_output.png" /> |
|
||||||
<None Include="resources\telling_a_story\002_portrait\6_say_sherlock.png" /> |
|
||||||
<None Include="resources\telling_a_story\002_portrait\7_many_portait_images.png" /> |
|
||||||
<None Include="resources\telling_a_story\002_portrait\8_two_say_commands.png" /> |
|
||||||
<None Include="resources\telling_a_story\003_stage\1_menu_stage.png" /> |
|
||||||
<None Include="resources\telling_a_story\003_stage\2_stage_gameobject.png" /> |
|
||||||
<None Include="resources\telling_a_story\004_play_music\1_add_playmusic_command.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\1_menu_command_portrait.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\2_portrait_command.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\3_portrait_output copy.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\3_portrait_output.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\4_new_command_portrait.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\5_sherlock_say copy.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\5_sherlock_say.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\6_john_say copy.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\6_john_say.png" /> |
|
||||||
<None Include="resources\telling_a_story\005_portrait_command\7_command_sequence.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\10_correct.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\11_wrong.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\1_correct_block.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\2_edited_say.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\3_flowchart_menu.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\4_menu_correct.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\5_connected_blocks.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\6_add_menu.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\7_wrong_block.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\8_three_block_menu.png" /> |
|
||||||
<None Include="resources\telling_a_story\011_menu_maths\9_menu_running.png" /> |
|
||||||
<None Include="resources\telling_a_story\06_camera_background\1_background_black.png" /> |
|
||||||
<None Include="resources\telling_a_story\07_background_sprite\1_sprite.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\1_menu_view.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\2_gameobjects copy.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\2_gameobjects.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\3_resize_view.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\4_move_resize_handles.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\5_menu_fade_to_view.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\6_drag_view.png" /> |
|
||||||
<None Include="resources\telling_a_story\08_add_view\7_scene_running.png" /> |
|
||||||
<None Include="resources\training_course\training.png" /> |
|
||||||
<None Include="top_pages\eventhandler_reference.md" /> |
|
||||||
<None Include="top_pages\command_reference.md" /> |
|
||||||
<None Include="top_pages\fungus_lua.md" /> |
|
||||||
<None Include="top_pages\mainpage.md" /> |
|
||||||
<None Include="fungus_docs\coding_tips.md" /> |
|
||||||
<None Include="fungus_docs\coding_standard.md" /> |
|
||||||
<None Include="fungus_docs\save_system.md" /> |
|
||||||
</ItemGroup> |
|
||||||
</Project> |
|
@ -1,68 +0,0 @@ |
|||||||
# Animation commands # {#animation_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Play Anim State # {#PlayAnimState} |
|
||||||
Plays a state of an animator according to the state name |
|
||||||
|
|
||||||
Defined in Fungus.PlayAnimState |
|
||||||
|
|
||||||
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 # {#ResetAnimTrigger} |
|
||||||
Resets a trigger parameter on an Animator component. |
|
||||||
|
|
||||||
Defined in Fungus.ResetAnimTrigger |
|
||||||
|
|
||||||
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 # {#SetAnimBool} |
|
||||||
Sets a boolean parameter on an Animator component to control a Unity animation |
|
||||||
|
|
||||||
Defined in Fungus.SetAnimBool |
|
||||||
|
|
||||||
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 # {#SetAnimFloat} |
|
||||||
Sets a float parameter on an Animator component to control a Unity animation |
|
||||||
|
|
||||||
Defined in Fungus.SetAnimFloat |
|
||||||
|
|
||||||
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 # {#SetAnimInteger} |
|
||||||
Sets an integer parameter on an Animator component to control a Unity animation |
|
||||||
|
|
||||||
Defined in Fungus.SetAnimInteger |
|
||||||
|
|
||||||
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 # {#SetAnimTrigger} |
|
||||||
Sets a trigger parameter on an Animator component to control a Unity animation |
|
||||||
|
|
||||||
Defined in Fungus.SetAnimTrigger |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
@ -1,103 +0,0 @@ |
|||||||
# Audio commands # {#audio_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Control Audio # {#ControlAudio} |
|
||||||
Plays, loops, or stops an audiosource. Any AudioSources with the same tag as the target Audio Source will automatically be stoped. |
|
||||||
|
|
||||||
Defined in Fungus.ControlAudio |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Control | Fungus.ControlAudioType | What to do to audio |
|
||||||
_audio Source | Fungus.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. |
|
||||||
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} |
|
||||||
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.PlayMusic |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Music Clip | UnityEngine.AudioClip | Music sound clip to play |
|
||||||
At Time | System.Single | Time to begin playing in seconds. If the audio file is compressed, the time index may be inaccurate. |
|
||||||
Loop | System.Boolean | The music will start playing again at end. |
|
||||||
Fade Duration | System.Single | Length of time to fade out previous playing music. |
|
||||||
|
|
||||||
# Play 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} |
|
||||||
Plays a once-off sound effect. Multiple sound effects can be played at the same time. |
|
||||||
|
|
||||||
Defined in Fungus.PlaySound |
|
||||||
|
|
||||||
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 Usfxr Sound # {#PlayUsfxrSound} |
|
||||||
Plays a usfxr synth sound. Use the usfxr editor [Tools > Fungus > Utilities > Generate usfxr Sound Effects] to create the SettingsString. Set a ParentTransform if using positional sound. See https://github.com/zeh/usfxr for more information about usfxr. |
|
||||||
|
|
||||||
Defined in Fungus.PlayUsfxrSound |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Parent Transform | UnityEngine.Transform | Transform to use for positional audio |
|
||||||
_ Settings String | Fungus.StringDataMulti | Settings string which describes the audio |
|
||||||
Wait Duration | System.Single | Time to wait before executing the next command |
|
||||||
|
|
||||||
# Set Audio Pitch # {#SetAudioPitch} |
|
||||||
Sets the global pitch level for audio played with Play Music and Play Sound commands. |
|
||||||
|
|
||||||
Defined in Fungus.SetAudioPitch |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Pitch | System.Single | Global pitch level for audio played using the Play Music and Play Sound commands |
|
||||||
Fade Duration | System.Single | Time to fade between current pitch level and target pitch level. |
|
||||||
Wait Until Finished | System.Boolean | Wait until the pitch change has finished before executing next command |
|
||||||
|
|
||||||
# Set Audio Volume # {#SetAudioVolume} |
|
||||||
Sets the global volume level for audio played with Play Music and Play Sound commands. |
|
||||||
|
|
||||||
Defined in Fungus.SetAudioVolume |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Volume | System.Single | Global volume level for audio played using Play Music and Play Sound |
|
||||||
Fade Duration | System.Single | Time to fade between current volume level and target volume level. |
|
||||||
Wait Until Finished | System.Boolean | Wait until the volume fade has completed before continuing. |
|
||||||
|
|
||||||
# Stop Ambiance # {#StopAmbiance} |
|
||||||
Stops the currently playing game ambiance. |
|
||||||
|
|
||||||
Defined in Fungus.StopAmbiance |
|
||||||
# Stop Music # {#StopMusic} |
|
||||||
Stops the currently playing game music. |
|
||||||
|
|
||||||
Defined in Fungus.StopMusic |
|
@ -1,75 +0,0 @@ |
|||||||
# Camera commands # {#camera_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Fade Screen # {#FadeScreen} |
|
||||||
Draws a fullscreen texture over the scene to give a fade effect. Setting Target Alpha to 1 will obscure the screen, alpha 0 will reveal the screen. If no Fade Texture is provided then a default flat color texture is used. |
|
||||||
|
|
||||||
Defined in Fungus.FadeScreen |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Duration | System.Single | Time for fade effect to complete |
|
||||||
Target Alpha | System.Single | Current target alpha transparency value. The fade gradually adjusts the alpha to approach this target value. |
|
||||||
Wait Until Finished | System.Boolean | Wait until the fade has finished before executing next command |
|
||||||
Fade Color | UnityEngine.Color | Color to render fullscreen fade texture with when screen is obscured. |
|
||||||
Fade Texture | UnityEngine.Texture2D | Optional texture to use when rendering the fullscreen fade effect. |
|
||||||
|
|
||||||
# Fade To View # {#FadeToView} |
|
||||||
Fades the camera out and in again at a position specified by a View object. |
|
||||||
|
|
||||||
Defined in Fungus.FadeToView |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Duration | System.Single | Time for fade effect to complete |
|
||||||
Fade Out | System.Boolean | Fade from fully visible to opaque at start of fade |
|
||||||
Target View | Fungus.View | View to transition to when Fade is complete |
|
||||||
Wait Until Finished | System.Boolean | Wait until the fade has finished before executing next command |
|
||||||
Fade Color | UnityEngine.Color | Color to render fullscreen fade texture with when screen is obscured. |
|
||||||
Fade Texture | UnityEngine.Texture2D | Optional texture to use when rendering the fullscreen fade effect. |
|
||||||
Target Camera | UnityEngine.Camera | Camera to use for the fade. Will use main camera if set to none. |
|
||||||
|
|
||||||
# Fullscreen # {#Fullscreen} |
|
||||||
Sets the application to fullscreen, windowed or toggles the current state. |
|
||||||
|
|
||||||
Defined in Fungus.Fullscreen |
|
||||||
# Move To View # {#MoveToView} |
|
||||||
Moves the camera to a location specified by a View object. |
|
||||||
|
|
||||||
Defined in Fungus.MoveToView |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Duration | System.Single | Time for move effect to complete |
|
||||||
Target View | Fungus.View | View to transition to when move is complete |
|
||||||
Wait Until Finished | System.Boolean | Wait until the fade has finished before executing next command |
|
||||||
Target Camera | UnityEngine.Camera | Camera to use for the pan. Will use main camera if set to none. |
|
||||||
|
|
||||||
# Shake Camera # {#ShakeCamera} |
|
||||||
Applies a camera shake effect to the main camera. |
|
||||||
|
|
||||||
Defined in Fungus.ShakeCamera |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Duration | System.Single | Time for camera shake effect to complete |
|
||||||
Amount | UnityEngine.Vector2 | Magnitude of shake effect in x & y axes |
|
||||||
Wait Until Finished | System.Boolean | Wait until the shake effect has finished before executing next command |
|
||||||
|
|
||||||
# Start Swipe # {#StartSwipe} |
|
||||||
Activates swipe panning mode where the player can pan the camera within the area between viewA & viewB. |
|
||||||
|
|
||||||
Defined in Fungus.StartSwipe |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
View A | Fungus.View | Defines one extreme of the scrollable area that the player can pan around |
|
||||||
View B | Fungus.View | Defines one extreme of the scrollable area that the player can pan around |
|
||||||
Duration | System.Single | Time to move the camera to a valid starting position between the two views |
|
||||||
Speed Multiplier | System.Single | Multiplier factor for speed of swipe pan |
|
||||||
Target Camera | UnityEngine.Camera | Camera to use for the pan. Will use main camera if set to none. |
|
||||||
|
|
||||||
# Stop Swipe # {#StopSwipe} |
|
||||||
Deactivates swipe panning mode. |
|
||||||
|
|
||||||
Defined in Fungus.StopSwipe |
|
@ -1,12 +0,0 @@ |
|||||||
# Core event handlers # {#core_events} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Game Started # {#GameStarted} |
|
||||||
The block will execute when the game starts playing. |
|
||||||
|
|
||||||
Defined in Fungus.GameStarted |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Wait For Frames | System.Int32 | Wait for a number of frames after startup before executing the Block. Can help fix startup order issues. |
|
||||||
|
|
@ -1,235 +0,0 @@ |
|||||||
# Flow commands # {#flow_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Break # {#Break} |
|
||||||
Force a loop to terminate immediately. |
|
||||||
|
|
||||||
Defined in Fungus.Break |
|
||||||
# Call # {#Call} |
|
||||||
Execute another block in the same Flowchart as the command, or in a different Flowchart. |
|
||||||
|
|
||||||
Defined in Fungus.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. |
|
||||||
Target Block | Fungus.Block | Block to start executing |
|
||||||
Start Label | Fungus.StringData | Label to start execution at. Takes priority over startIndex. |
|
||||||
Start Index | System.Int32 | Command index to start executing |
|
||||||
Call Mode | Fungus.CallMode | Select if the calling block should stop or continue executing commands, or wait until the called block finishes. |
|
||||||
|
|
||||||
# Else # {#Else} |
|
||||||
Marks the start of a command block to be executed when the preceding If statement is False. |
|
||||||
|
|
||||||
Defined in Fungus.Else |
|
||||||
# Else If # {#ElseIf} |
|
||||||
Marks the start of a command block to be executed when the preceding If statement is False and the test expression is true. |
|
||||||
|
|
||||||
Defined in Fungus.ElseIf |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Compare Operator | Fungus.CompareOperator | The type of comparison to be performed |
|
||||||
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 |
|
||||||
Animator Data | Fungus.AnimatorData | Animator value to compare against |
|
||||||
Audio Source Data | Fungus.AudioSourceData | AudioSource value to compare against |
|
||||||
Color Data | Fungus.ColorData | Color value to compare against |
|
||||||
Game Object Data | Fungus.GameObjectData | GameObject value to compare against |
|
||||||
Material Data | Fungus.MaterialData | Material value to compare against |
|
||||||
Object Data | Fungus.ObjectData | Object value to compare against |
|
||||||
Rigidbody2 D Data | Fungus.Rigidbody2DData | Rigidbody2D value to compare against |
|
||||||
Sprite Data | Fungus.SpriteData | Sprite value to compare against |
|
||||||
Texture Data | Fungus.TextureData | Texture value to compare against |
|
||||||
Transform Data | Fungus.TransformData | Transform value to compare against |
|
||||||
Vector2 Data | Fungus.Vector2Data | Vector2 value to compare against |
|
||||||
Vector3 Data | Fungus.Vector3Data | Vector3 value to compare against |
|
||||||
|
|
||||||
# End # {#End} |
|
||||||
Marks the end of a conditional block. |
|
||||||
|
|
||||||
Defined in Fungus.End |
|
||||||
# If # {#If} |
|
||||||
If the test expression is true, execute the following command block. |
|
||||||
|
|
||||||
Defined in Fungus.If |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Compare Operator | Fungus.CompareOperator | The type of comparison to be performed |
|
||||||
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 |
|
||||||
Animator Data | Fungus.AnimatorData | Animator value to compare against |
|
||||||
Audio Source Data | Fungus.AudioSourceData | AudioSource value to compare against |
|
||||||
Color Data | Fungus.ColorData | Color value to compare against |
|
||||||
Game Object Data | Fungus.GameObjectData | GameObject value to compare against |
|
||||||
Material Data | Fungus.MaterialData | Material value to compare against |
|
||||||
Object Data | Fungus.ObjectData | Object value to compare against |
|
||||||
Rigidbody2 D Data | Fungus.Rigidbody2DData | Rigidbody2D value to compare against |
|
||||||
Sprite Data | Fungus.SpriteData | Sprite value to compare against |
|
||||||
Texture Data | Fungus.TextureData | Texture value to compare against |
|
||||||
Transform Data | Fungus.TransformData | Transform value to compare against |
|
||||||
Vector2 Data | Fungus.Vector2Data | Vector2 value to compare against |
|
||||||
Vector3 Data | Fungus.Vector3Data | Vector3 value to compare against |
|
||||||
|
|
||||||
# Jump # {#Jump} |
|
||||||
Move execution to a specific Label command in the same block |
|
||||||
|
|
||||||
Defined in Fungus.Jump |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_target Label | Fungus.StringData | Name of a label in this block to jump to |
|
||||||
|
|
||||||
# Label # {#Label} |
|
||||||
Marks a position in the command list for execution to jump to. |
|
||||||
|
|
||||||
Defined in Fungus.Label |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Key | System.String | Display name for the label |
|
||||||
|
|
||||||
# Load Scene # {#LoadScene} |
|
||||||
Loads a new Unity scene and displays an optional loading image. This is useful for splitting a large game across multiple scene files to reduce peak memory usage. Previously loaded assets will be released before loading the scene to free up memory.The scene to be loaded must be added to the scene list in Build Settings. |
|
||||||
|
|
||||||
Defined in Fungus.LoadScene |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_scene Name | Fungus.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 |
|
||||||
|
|
||||||
# Lua Else If # {#LuaElseIf} |
|
||||||
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.LuaElseIf |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Lua Environment | Fungus.LuaEnvironment | Lua Environment to use to execute this Lua script (null for global) |
|
||||||
Lua Compare String | System.String | The lua comparison string to run; implicitly prepends 'return' onto this |
|
||||||
|
|
||||||
# Lua If # {#LuaIf} |
|
||||||
If the test expression is true, execute the following command block. |
|
||||||
|
|
||||||
Defined in Fungus.LuaIf |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Lua Environment | Fungus.LuaEnvironment | Lua Environment to use to execute this Lua script (null for global) |
|
||||||
Lua Compare String | System.String | The lua comparison string to run; implicitly prepends 'return' onto this |
|
||||||
|
|
||||||
# Quit # {#Quit} |
|
||||||
Quits the application. Does not work in Editor or Webplayer builds. Shouldn't generally be used on iOS. |
|
||||||
|
|
||||||
Defined in Fungus.Quit |
|
||||||
# Save Point # {#SavePoint} |
|
||||||
Creates a Save Point and adds it to the Save History. The player can save the Save History to persistent storage and load it again later using the Save Menu. |
|
||||||
|
|
||||||
Defined in Fungus.SavePoint |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Is Start Point | System.Boolean | Marks this Save Point as the starting point for Flowchart execution in the scene. Each scene in your game should have exactly one Save Point with this enabled. |
|
||||||
Key Mode | Fungus.SavePoint+KeyMode | How the Save Point Key for this Save Point is defined. |
|
||||||
Custom Key | System.String | A string key which uniquely identifies this save point. |
|
||||||
Key Separator | System.String | A string to seperate the block name and custom key when using KeyMode.Both. |
|
||||||
Description Mode | Fungus.SavePoint+DescriptionMode | How the description for this Save Point is defined. |
|
||||||
Custom Description | System.String | A short description of this save point. |
|
||||||
Fire Event | System.Boolean | Fire a Save Point Loaded event when this command executes. |
|
||||||
Resume On Load | System.Boolean | Resume execution from this location after loading this Save Point. |
|
||||||
|
|
||||||
# Send Message # {#SendMessage} |
|
||||||
Sends a message to either the owner Flowchart or all Flowcharts in the scene. Blocks can listen for this message using a Message Received event handler. |
|
||||||
|
|
||||||
Defined in Fungus.SendMessage |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Message Target | Fungus.MessageTarget | Target flowchart(s) to send the message to |
|
||||||
_message | Fungus.StringData | Name of the message to send |
|
||||||
|
|
||||||
# Stop # {#Stop} |
|
||||||
Stop executing the Block that contains this command. |
|
||||||
|
|
||||||
Defined in Fungus.Stop |
|
||||||
# Stop Block # {#StopBlock} |
|
||||||
Stops executing the named Block |
|
||||||
|
|
||||||
Defined in Fungus.StopBlock |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Stop Flowchart # {#StopFlowchart} |
|
||||||
Stops execution of all Blocks in a Flowchart |
|
||||||
|
|
||||||
Defined in Fungus.StopFlowchart |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Stop Parent Flowchart | System.Boolean | Stop all executing Blocks in the Flowchart that contains this command |
|
||||||
Target Flowcharts | System.Collections.Generic.List`1[Fungus.Flowchart] | Stop all executing Blocks in a list of target Flowcharts |
|
||||||
|
|
||||||
# Wait # {#Wait} |
|
||||||
Waits for period of time before executing the next command in the block. |
|
||||||
|
|
||||||
Defined in Fungus.Wait |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_duration | Fungus.FloatData | Duration to wait for |
|
||||||
|
|
||||||
# Wait Frames # {#WaitFrames} |
|
||||||
Waits for a number of frames before executing the next command in the block. |
|
||||||
|
|
||||||
Defined in Fungus.WaitFrames |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Frame Count | Fungus.IntegerData | Number of frames to wait for |
|
||||||
|
|
||||||
# WaitInput # {#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. |
|
||||||
|
|
||||||
# While # {#While} |
|
||||||
Continuously loop through a block of commands while the condition is true. Use the Break command to force the loop to terminate immediately. |
|
||||||
|
|
||||||
Defined in Fungus.While |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Compare Operator | Fungus.CompareOperator | The type of comparison to be performed |
|
||||||
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 |
|
||||||
Animator Data | Fungus.AnimatorData | Animator value to compare against |
|
||||||
Audio Source Data | Fungus.AudioSourceData | AudioSource value to compare against |
|
||||||
Color Data | Fungus.ColorData | Color value to compare against |
|
||||||
Game Object Data | Fungus.GameObjectData | GameObject value to compare against |
|
||||||
Material Data | Fungus.MaterialData | Material value to compare against |
|
||||||
Object Data | Fungus.ObjectData | Object value to compare against |
|
||||||
Rigidbody2 D Data | Fungus.Rigidbody2DData | Rigidbody2D value to compare against |
|
||||||
Sprite Data | Fungus.SpriteData | Sprite value to compare against |
|
||||||
Texture Data | Fungus.TextureData | Texture value to compare against |
|
||||||
Transform Data | Fungus.TransformData | Transform value to compare against |
|
||||||
Vector2 Data | Fungus.Vector2Data | Vector2 value to compare against |
|
||||||
Vector3 Data | Fungus.Vector3Data | Vector3 value to compare against |
|
||||||
|
|
@ -1,17 +0,0 @@ |
|||||||
# GameObject commands # {#gameobject_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Instantiate # {#Instantiate} |
|
||||||
Instantiate a game object |
|
||||||
|
|
||||||
Defined in Fungus.SpawnObject |
|
||||||
|
|
||||||
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 as parent during instantiate. |
|
||||||
_spawn At Self | Fungus.BooleanData | If true, will use the Transfrom of this Flowchart for the position and rotation. |
|
||||||
_spawn Position | Fungus.Vector3Data | Local position of newly spawned object. |
|
||||||
_spawn Rotation | Fungus.Vector3Data | Local rotation of newly spawned object. |
|
||||||
_newly Spawned Object | Fungus.GameObjectData | Optional variable to store the GameObject that was just created. |
|
||||||
|
|
@ -1,26 +0,0 @@ |
|||||||
# Input commands # {#input_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# GetAxis # {#GetAxis} |
|
||||||
Store Input.GetAxis in a variable |
|
||||||
|
|
||||||
Defined in Fungus.GetAxis |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Axis Raw | System.Boolean | If true, calls GetAxisRaw instead of GetAxis |
|
||||||
Out Value | Fungus.FloatData | Float to store the value of the GetAxis |
|
||||||
|
|
||||||
# GetKey # {#GetKey} |
|
||||||
Store Input.GetKey in a variable. Supports an optional Negative key input. A negative value will be overridden by a positive one, they do not add. |
|
||||||
|
|
||||||
Defined in Fungus.GetKey |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Key Code Negative | UnityEngine.KeyCode | Optional, secondary or negative keycode. For booleans will also set to true, for int and float will set to -1. |
|
||||||
Key Code Name | Fungus.StringData | Only used if KeyCode is KeyCode.None, expects a name of the key to use. |
|
||||||
Key Code Name Negative | Fungus.StringData | Optional, secondary or negative keycode. For booleans will also set to true, for int and float will set to -1.Only used if KeyCode is KeyCode.None, expects a name of the key to use. |
|
||||||
Key Query Type | Fungus.GetKey+InputKeyQueryType | Do we want an Input.GetKeyDown, GetKeyUp or GetKey |
|
||||||
Out Value | Fungus.Variable | Will store true or false or 0 or 1 depending on type. Sets true or -1 for negative key values. |
|
||||||
|
|
@ -1,13 +0,0 @@ |
|||||||
# Input event handlers # {#input_events} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Key Pressed # {#KeyPressed} |
|
||||||
The block will execute when a key press event occurs. |
|
||||||
|
|
||||||
Defined in Fungus.KeyPressed |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Key Press Type | Fungus.KeyPressType | The type of keypress to activate on |
|
||||||
Key Code | UnityEngine.KeyCode | Keycode of the key to activate on |
|
||||||
|
|
@ -1,309 +0,0 @@ |
|||||||
# iTween commands # {#itween_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Look From # {#LookFrom} |
|
||||||
Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time. |
|
||||||
|
|
||||||
Defined in Fungus.LookFrom |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Look To # {#LookTo} |
|
||||||
Rotates a GameObject to look at a supplied Transform or Vector3 over time. |
|
||||||
|
|
||||||
Defined in Fungus.LookTo |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Move Add # {#MoveAdd} |
|
||||||
Moves a game object by a specified offset over time. |
|
||||||
|
|
||||||
Defined in Fungus.MoveAdd |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_offset | Fungus.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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Move From # {#MoveFrom} |
|
||||||
Moves a game object from a specified position back to its starting position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None). |
|
||||||
|
|
||||||
Defined in Fungus.MoveFrom |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Move To # {#MoveTo} |
|
||||||
Moves a game object to a specified position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None). |
|
||||||
|
|
||||||
Defined in Fungus.MoveTo |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Punch Position # {#PunchPosition} |
|
||||||
Applies a jolt of force to a GameObject's position and wobbles it back to its initial position. |
|
||||||
|
|
||||||
Defined in Fungus.PunchPosition |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_amount | Fungus.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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Punch Rotation # {#PunchRotation} |
|
||||||
Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation. |
|
||||||
|
|
||||||
Defined in Fungus.PunchRotation |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_amount | Fungus.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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Punch Scale # {#PunchScale} |
|
||||||
Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale. |
|
||||||
|
|
||||||
Defined in Fungus.PunchScale |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Rotate Add # {#RotateAdd} |
|
||||||
Rotates a game object by the specified angles over time. |
|
||||||
|
|
||||||
Defined in Fungus.RotateAdd |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_offset | Fungus.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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Rotate From # {#RotateFrom} |
|
||||||
Rotates a game object from the specified angles back to its starting orientation over time. |
|
||||||
|
|
||||||
Defined in Fungus.RotateFrom |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Rotate To # {#RotateTo} |
|
||||||
Rotates a game object to the specified angles over time. |
|
||||||
|
|
||||||
Defined in Fungus.RotateTo |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Scale Add # {#ScaleAdd} |
|
||||||
Changes a game object's scale by a specified offset over time. |
|
||||||
|
|
||||||
Defined in Fungus.ScaleAdd |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Scale From # {#ScaleFrom} |
|
||||||
Changes a game object's scale to the specified value and back to its original scale over time. |
|
||||||
|
|
||||||
Defined in Fungus.ScaleFrom |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Scale To # {#ScaleTo} |
|
||||||
Changes a game object's scale to a specified value over time. |
|
||||||
|
|
||||||
Defined in Fungus.ScaleTo |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Shake Position # {#ShakePosition} |
|
||||||
Randomly shakes a GameObject's position by a diminishing amount over time. |
|
||||||
|
|
||||||
Defined in Fungus.ShakePosition |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_amount | Fungus.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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Shake Rotation # {#ShakeRotation} |
|
||||||
Randomly shakes a GameObject's rotation by a diminishing amount over time. |
|
||||||
|
|
||||||
Defined in Fungus.ShakeRotation |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_amount | Fungus.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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Shake Scale # {#ShakeScale} |
|
||||||
Randomly shakes a GameObject's rotation by a diminishing amount over time. |
|
||||||
|
|
||||||
Defined in Fungus.ShakeScale |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Stop Tween # {#StopTween} |
|
||||||
Stops an active iTween by name. |
|
||||||
|
|
||||||
Defined in Fungus.StopTween |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_tween Name | Fungus.StringData | Stop and destroy any Tweens in current scene with the supplied name |
|
||||||
|
|
||||||
# Stop Tweens # {#StopTweens} |
|
||||||
Stop all active iTweens in the current scene. |
|
||||||
|
|
||||||
Defined in Fungus.StopTweens |
|
@ -1,72 +0,0 @@ |
|||||||
# LeanTween commands # {#leantween_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Move # {#Move} |
|
||||||
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.MoveLean |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
_duration | Fungus.FloatData | The time in seconds the animation will take to complete |
|
||||||
_to From | Fungus.BaseLeanTweenCommand+ToFrom | Does the tween act from current TO destination or is it reversed and act FROM destination to its current |
|
||||||
_abs Add | Fungus.BaseLeanTweenCommand+AbsAdd | Does the tween use the value as a target or as a delta to be added to current. |
|
||||||
Ease Type | LeanTweenType | The shape of the easing curve applied to the animation |
|
||||||
Loop Type | LeanTweenType | The type of loop to apply once the animation has completed |
|
||||||
Repeats | System.Int32 | Number of times to repeat the tween, -1 is infinite. |
|
||||||
Stop Previous Tweens | System.Boolean | Stop any previously LeanTweens on this object before adding this one. Warning; expensive. |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Rotate # {#Rotate} |
|
||||||
Rotates a game object to the specified angles over time. |
|
||||||
|
|
||||||
Defined in Fungus.RotateLean |
|
||||||
|
|
||||||
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 |
|
||||||
Is Local | System.Boolean | Whether to animate in world space or relative to the parent. False by default. |
|
||||||
Rotate Mode | Fungus.RotateLean+RotateMode | Whether to use the provided Transform or Vector as a target to look at rather than a euler to match. |
|
||||||
_target Object | Fungus.GameObjectData | Target game object to apply the Tween to |
|
||||||
_duration | Fungus.FloatData | The time in seconds the animation will take to complete |
|
||||||
_to From | Fungus.BaseLeanTweenCommand+ToFrom | Does the tween act from current TO destination or is it reversed and act FROM destination to its current |
|
||||||
_abs Add | Fungus.BaseLeanTweenCommand+AbsAdd | Does the tween use the value as a target or as a delta to be added to current. |
|
||||||
Ease Type | LeanTweenType | The shape of the easing curve applied to the animation |
|
||||||
Loop Type | LeanTweenType | The type of loop to apply once the animation has completed |
|
||||||
Repeats | System.Int32 | Number of times to repeat the tween, -1 is infinite. |
|
||||||
Stop Previous Tweens | System.Boolean | Stop any previously LeanTweens on this object before adding this one. Warning; expensive. |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# Scale # {#Scale} |
|
||||||
Changes a game object's scale to a specified value over time. |
|
||||||
|
|
||||||
Defined in Fungus.ScaleLean |
|
||||||
|
|
||||||
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 |
|
||||||
_duration | Fungus.FloatData | The time in seconds the animation will take to complete |
|
||||||
_to From | Fungus.BaseLeanTweenCommand+ToFrom | Does the tween act from current TO destination or is it reversed and act FROM destination to its current |
|
||||||
_abs Add | Fungus.BaseLeanTweenCommand+AbsAdd | Does the tween use the value as a target or as a delta to be added to current. |
|
||||||
Ease Type | LeanTweenType | The shape of the easing curve applied to the animation |
|
||||||
Loop Type | LeanTweenType | The type of loop to apply once the animation has completed |
|
||||||
Repeats | System.Int32 | Number of times to repeat the tween, -1 is infinite. |
|
||||||
Stop Previous Tweens | System.Boolean | Stop any previously LeanTweens on this object before adding this one. Warning; expensive. |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
|
|
||||||
# StopTweens # {#StopTweens} |
|
||||||
Stops the LeanTweens on a target GameObject |
|
||||||
|
|
||||||
Defined in Fungus.StopTweensLean |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_target Object | Fungus.GameObjectData | Target game object stop LeanTweens on |
|
||||||
|
|
@ -1,161 +0,0 @@ |
|||||||
# Math commands # {#math_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Abs # {#Abs} |
|
||||||
Command to execute and store the result of a Abs |
|
||||||
|
|
||||||
Defined in Fungus.Abs |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Clamp # {#Clamp} |
|
||||||
Command to contain a value between a lower and upper bound, with optional wrapping modes |
|
||||||
|
|
||||||
Defined in Fungus.Clamp |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Out Value | Fungus.FloatData | Result put here, if using pingpong don't use the same var for value as outValue. |
|
||||||
|
|
||||||
# Curve # {#Curve} |
|
||||||
Pass a value through an AnimationCurve |
|
||||||
|
|
||||||
Defined in Fungus.Curve |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Exp # {#Exp} |
|
||||||
Command to execute and store the result of a Exp |
|
||||||
|
|
||||||
Defined in Fungus.Exp |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Inverse # {#Inverse} |
|
||||||
Multiplicative Inverse of a float (1/f) |
|
||||||
|
|
||||||
Defined in Fungus.Inv |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# InvLerp # {#InvLerp} |
|
||||||
Calculates the inverse lerp, the percentage a value is between two others. |
|
||||||
|
|
||||||
Defined in Fungus.InvLerp |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Clamp Result | System.Boolean | Clamp percentage to 0-1? |
|
||||||
|
|
||||||
# Lerp # {#Lerp} |
|
||||||
Linearly Interpolate from A to B |
|
||||||
|
|
||||||
Defined in Fungus.Lerp |
|
||||||
# Log # {#Log} |
|
||||||
Command to execute and store the result of a Log |
|
||||||
|
|
||||||
Defined in Fungus.Log |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Mode | Fungus.Log+Mode | Which log to use, natural or base 10 |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Map # {#Map} |
|
||||||
Map a value that exists in 1 range of numbers to another. |
|
||||||
|
|
||||||
Defined in Fungus.Map |
|
||||||
# MinMax # {#MinMax} |
|
||||||
Command to store the min or max of 2 values |
|
||||||
|
|
||||||
Defined in Fungus.MinMax |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Function | Fungus.MinMax+Function | Min Or Max |
|
||||||
|
|
||||||
# Negate # {#Negate} |
|
||||||
Negate a float |
|
||||||
|
|
||||||
Defined in Fungus.Neg |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Pow # {#Pow} |
|
||||||
Raise a value to the power of another. |
|
||||||
|
|
||||||
Defined in Fungus.Pow |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Round # {#Round} |
|
||||||
Command to execute and store the result of a Round |
|
||||||
|
|
||||||
Defined in Fungus.Round |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Function | Fungus.Round+Mode | Mode; Round (closest), floor(smaller) or ceil(bigger). |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Sign # {#Sign} |
|
||||||
Command to execute and store the result of a Sign |
|
||||||
|
|
||||||
Defined in Fungus.Sign |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Sqrt # {#Sqrt} |
|
||||||
Command to execute and store the result of a Sqrt |
|
||||||
|
|
||||||
Defined in Fungus.Sqrt |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# ToInt # {#ToInt} |
|
||||||
Command to execute and store the result of a float to int conversion |
|
||||||
|
|
||||||
Defined in Fungus.ToInt |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Function | Fungus.ToInt+Mode | To integer mode; round, floor or ceil. |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.IntegerData | Where the result of the function is stored. |
|
||||||
|
|
||||||
# Trig # {#Trig} |
|
||||||
Command to execute and store the result of basic trigonometry |
|
||||||
|
|
||||||
Defined in Fungus.Trig |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Function | Fungus.Trig+Function | Trigonometric function to run. |
|
||||||
In Value | Fungus.FloatData | Value to be passed in to the function. |
|
||||||
Out Value | Fungus.FloatData | Where the result of the function is stored. |
|
||||||
|
|
@ -1,119 +0,0 @@ |
|||||||
# MonoBehaviour Events # {#monobeh_events} |
|
||||||
|
|
||||||
See [Unity MonoBehaviour Messages](https://docs.unity3d.com/ScriptReference/MonoBehaviour.html) for more context. |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Animator # {#Animator} |
|
||||||
The block will execute on the selected OnAnimator messages from Unity. |
|
||||||
|
|
||||||
Defined in Fungus.AnimatorState |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
FireOn | System.Enum | OnAnimatorIK, OnAnimatorMove. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
IKLayer | System.Int32 | IK layer to trigger on. Negative is all. |
|
||||||
|
|
||||||
# Application # {#Application} |
|
||||||
The block will execute on the selected OnApplication messages from Unity. |
|
||||||
|
|
||||||
Defined in Fungus.ApplicationState |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
FireOn | System.Enum | OnApplicationGetFocus, OnApplicationLoseFocus, OnApplicationPause, OnApplicationResume, OnApplicationQuit. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
# CharacterCollider # {#CharacterCollider} |
|
||||||
The block will execute on the OnControllerColliderHit messages from Unity & tags pass tests. |
|
||||||
|
|
||||||
Defined in Fungus.CharacterControllerCollide |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
tagFilter | System.String\[\] | Array of strings, if this is empty then tag comparing is ignored. Otherwise as long as 1 of the tags within matches the incoming tag to test it will pass. Think of it like a big chain of 'or's. |
|
||||||
|
|
||||||
# Collision # {#Collision} |
|
||||||
The block will execute on the OnCollision related messages from Unity & tags pass tests. Used for the 3D physics system, see the [collision detection occurs ](https://docs.unity3d.com/Manual/CollidersOverview.html) section for more info. |
|
||||||
|
|
||||||
Defined in Fungus.Collision |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
tagFilter | System.String\[\] | Array of strings, if this is empty then tag comparing is ignored. Otherwise as long as 1 of the tags within matches the incoming tag to test it will pass. Think of it like a big chain of 'or's. |
|
||||||
FireOn | System.Enum | Enter, Stay, Exit. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
# Collision2D # {#Collision2D} |
|
||||||
The block will execute on the OnCollision related messages from Unity & tags pass tests. Used for the 2D physics system, see the [collision detection occurs ](https://docs.unity3d.com/Manual/CollidersOverview.html) section for more info. |
|
||||||
|
|
||||||
Defined in Fungus.Collision2D |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
tagFilter | System.String\[\] | Array of strings, if this is empty then tag comparing is ignored. Otherwise as long as 1 of the tags within matches the incoming tag to test it will pass. Think of it like a big chain of 'or's. |
|
||||||
FireOn | System.Enum | Enter, Stay, Exit. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
# Mouse # {#Mouse} |
|
||||||
The block will execute on the selected OnMouse messages from Unity. |
|
||||||
|
|
||||||
Defined in Fungus.Mouse |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
FireOn | System.Enum | OnMouseDown, OnMouseDrag, OnMouseEnter, OnMouseExit, OnMouseOver, OnMouseUp, OnMouseUpAsButton. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
|
|
||||||
# Particle # {#Particle} |
|
||||||
The block will execute on the OnParticle related messages from Unity & tags pass tests. |
|
||||||
|
|
||||||
Defined in Fungus.Particle |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
tagFilter | System.String\[\] | Array of strings, if this is empty then tag comparing is ignored. Otherwise as long as 1 of the tags within matches the incoming tag to test it will pass. Think of it like a big chain of 'or's. |
|
||||||
FireOn | System.Enum | OnParticleCollision, OnParticleTrigger. Flags to determine which of the Unity messages causes this event to fire. OnParticleCollision uses the tag filter, OnParticleTrigger has no parameters provided by Unity. |
|
||||||
|
|
||||||
# Render # {#Render} |
|
||||||
The block will execute on the selected On*Render messages from Unity. |
|
||||||
|
|
||||||
Defined in Fungus.Render |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
FireOn | System.Enum | OnPostRender, OnPreCull, OnPreRender, OnRenderObject, OnWillRenderObject, OnBecameInvisible, OnBecameVisible. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
# Transform # {#Transform} |
|
||||||
The block will execute on the selected transform changed messages from Unity. |
|
||||||
|
|
||||||
Defined in Fungus.TransformChanged |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
FireOn | System.Enum | OnTransformChildrenChanged, OnTransformParentChanged. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
# Trigger # {#Trigger} |
|
||||||
The block will execute on the OnTrigger related messages from Unity & tags pass tests. Used for the 3D physics system, see the [trigger messages sent upon](https://docs.unity3d.com/Manual/CollidersOverview.html) section for more info. |
|
||||||
|
|
||||||
Defined in Fungus.Trigger |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
tagFilter | System.String\[\] | Array of strings, if this is empty then tag comparing is ignored. Otherwise as long as 1 of the tags within matches the incoming tag to test it will pass. Think of it like a big chain of 'or's. |
|
||||||
FireOn | System.Enum | Enter, Stay, Exit. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
# Trigger2D # {#Trigger2D} |
|
||||||
The block will execute on the OnTrigger*2D related messages from Unity & tags pass tests. Used for the 2D physics system, see the [trigger messages sent upon](https://docs.unity3d.com/Manual/CollidersOverview.html) section for more info. |
|
||||||
|
|
||||||
Defined in Fungus.Trigger2D |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
tagFilter | System.String\[\] | Array of strings, if this is empty then tag comparing is ignored. Otherwise as long as 1 of the tags within matches the incoming tag to test it will pass. Think of it like a big chain of 'or's. |
|
||||||
FireOn | System.Enum | Enter, Stay, Exit. Flags to determine which of the Unity messages causes this event to fire. |
|
||||||
|
|
||||||
# Update # {#Update} |
|
||||||
The block will execute on the selected update messages from Unity. |
|
||||||
|
|
||||||
Defined in Fungus.UpdateTick |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
FireOn | System.Enum | Update, FixedUpdate, LateUpdate. Flags to determine which of the Unity messages causes this event to fire. |
|
@ -1,117 +0,0 @@ |
|||||||
# MonoBehaviour event handlers # {#monobehaviour_events} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Animator # {#Animator} |
|
||||||
The block will execute when the desired OnAnimator* message for the monobehaviour is received. |
|
||||||
|
|
||||||
Defined in Fungus.AnimatorState |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.AnimatorState+AnimatorMessageFlags | Which of the OnAnimator messages to trigger on. |
|
||||||
I K Layer | System.Int32 | IK layer to trigger on. Negative is all. |
|
||||||
|
|
||||||
# Application # {#Application} |
|
||||||
The block will execute when the desired OnApplication message for the monobehaviour is received. |
|
||||||
|
|
||||||
Defined in Fungus.ApplicationState |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.ApplicationState+ApplicationMessageFlags | Which of the Application messages to trigger on. |
|
||||||
|
|
||||||
# CharacterCollider # {#CharacterCollider} |
|
||||||
The block will execute when tag filtered OnCharacterColliderHit is received |
|
||||||
|
|
||||||
Defined in Fungus.CharacterControllerCollide |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Tag Filter | System.String[] | Only fire the event if one of the tags match. Empty means any will fire. |
|
||||||
|
|
||||||
# Collision # {#Collision} |
|
||||||
The block will execute when a 3d physics collision matching some basic conditions is met. |
|
||||||
|
|
||||||
Defined in Fungus.Collision |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.BasePhysicsEventHandler+PhysicsMessageType | Which of the 3d physics messages to we trigger on. |
|
||||||
Tag Filter | System.String[] | Only fire the event if one of the tags match. Empty means any will fire. |
|
||||||
|
|
||||||
# Collision2D # {#Collision2D} |
|
||||||
The block will execute when a 2d physics collision matching some basic conditions is met. |
|
||||||
|
|
||||||
Defined in Fungus.Collision2D |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.BasePhysicsEventHandler+PhysicsMessageType | Which of the 3d physics messages to we trigger on. |
|
||||||
Tag Filter | System.String[] | Only fire the event if one of the tags match. Empty means any will fire. |
|
||||||
|
|
||||||
# Mouse # {#Mouse} |
|
||||||
The block will execute when the desired OnMouse* message for the monobehaviour is received |
|
||||||
|
|
||||||
Defined in Fungus.Mouse |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.Mouse+MouseMessageFlags | Which of the Mouse messages to trigger on. |
|
||||||
|
|
||||||
# Particle # {#Particle} |
|
||||||
The block will execute when the desired OnParticle message for the monobehaviour is received. |
|
||||||
|
|
||||||
Defined in Fungus.Particle |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.Particle+ParticleMessageFlags | Which of the Rendering messages to trigger on. |
|
||||||
Tag Filter | System.String[] | Only fire the event if one of the tags match. Empty means any will fire. |
|
||||||
|
|
||||||
# Render # {#Render} |
|
||||||
The block will execute when the desired Rendering related message for the monobehaviour is received. |
|
||||||
|
|
||||||
Defined in Fungus.Render |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.Render+RenderMessageFlags | Which of the Rendering messages to trigger on. |
|
||||||
|
|
||||||
# Transform # {#Transform} |
|
||||||
The block will execute when the desired OnTransform related message for the monobehaviour is received. |
|
||||||
|
|
||||||
Defined in Fungus.TransformChanged |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.TransformChanged+TransformMessageFlags | Which of the OnTransformChanged messages to trigger on. |
|
||||||
|
|
||||||
# Trigger # {#Trigger} |
|
||||||
The block will execute when a 3d physics trigger matching some basic conditions is met. |
|
||||||
|
|
||||||
Defined in Fungus.Trigger |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.BasePhysicsEventHandler+PhysicsMessageType | Which of the 3d physics messages to we trigger on. |
|
||||||
Tag Filter | System.String[] | Only fire the event if one of the tags match. Empty means any will fire. |
|
||||||
|
|
||||||
# Trigger2D # {#Trigger2D} |
|
||||||
The block will execute when a 2d physics trigger matching some basic conditions is met. |
|
||||||
|
|
||||||
Defined in Fungus.Trigger2D |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.BasePhysicsEventHandler+PhysicsMessageType | Which of the 3d physics messages to we trigger on. |
|
||||||
Tag Filter | System.String[] | Only fire the event if one of the tags match. Empty means any will fire. |
|
||||||
|
|
||||||
# Update # {#Update} |
|
||||||
The block will execute every chosen Update, or FixedUpdate or LateUpdate. |
|
||||||
|
|
||||||
Defined in Fungus.UpdateTick |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Fire On | Fungus.UpdateTick+UpdateMessageFlags | Which of the Update messages to trigger on. |
|
||||||
|
|
@ -1,140 +0,0 @@ |
|||||||
# Narrative commands # {#narrative_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Clear Menu # {#ClearMenu} |
|
||||||
Clears the options from a menu dialogue |
|
||||||
|
|
||||||
Defined in Fungus.ClearMenu |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Menu Dialog | Fungus.MenuDialog | Menu Dialog to clear the options on |
|
||||||
|
|
||||||
# Control Stage # {#ControlStage} |
|
||||||
Controls the stage on which character portraits are displayed. |
|
||||||
|
|
||||||
Defined in Fungus.ControlStage |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Stage | Fungus.Stage | Stage to display characters on |
|
||||||
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 |
|
||||||
|
|
||||||
# Conversation # {#Conversation} |
|
||||||
Do multiple say and portrait commands in a single block of text. Format is: [character] [portrait] [stage position] [hide] [<<< | >>>] [clear | noclear] [wait | nowait] [fade | nofade] [: Story text] |
|
||||||
|
|
||||||
Defined in Fungus.Conversation |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Wait For Seconds | Fungus.FloatData | a wait for seconds added to each item of the conversation. |
|
||||||
|
|
||||||
# Menu # {#Menu} |
|
||||||
Displays a button in a multiple choice menu |
|
||||||
|
|
||||||
Defined in Fungus.Menu |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
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 |
|
||||||
Set Menu Dialog | Fungus.MenuDialog | A custom Menu Dialog to use to display this menu. All subsequent Menu commands will use this dialog. |
|
||||||
Hide This Option | Fungus.BooleanData | If true, this option will be passed to the Menu Dialogue but marked as hidden, this can be used to hide options while maintaining a Menu Shuffle. |
|
||||||
|
|
||||||
# Menu Shuffle # {#MenuShuffle} |
|
||||||
Shuffle the order of the items in a Fungus Menu |
|
||||||
|
|
||||||
Defined in Fungus.MenuShuffle |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Shuffle Mode | Fungus.MenuShuffle+Mode | Determines if the order is shuffled everytime this command is it (Every) or if it is consistent when returned to but random (Once) |
|
||||||
|
|
||||||
# Menu Timer # {#MenuTimer} |
|
||||||
Displays a timer bar and executes a target block if the player fails to select a menu option in time. |
|
||||||
|
|
||||||
Defined in Fungus.MenuTimer |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_duration | Fungus.FloatData | Length of time to display the timer for |
|
||||||
Target Block | Fungus.Block | Block to execute when the timer expires |
|
||||||
|
|
||||||
# Portrait # {#Portrait} |
|
||||||
Controls a character portrait. |
|
||||||
|
|
||||||
Defined in Fungus.Portrait |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Stage | Fungus.Stage | Stage to display portrait on |
|
||||||
Character | Fungus.Character | Character to display |
|
||||||
Replaced Character | Fungus.Character | Character to swap with |
|
||||||
Portrait | UnityEngine.Sprite | Portrait to display |
|
||||||
Offset | Fungus.PositionOffset | Move the portrait from/to this offset position |
|
||||||
From Position | UnityEngine.RectTransform | Move the portrait from this position |
|
||||||
To Position | UnityEngine.RectTransform | Move the portrait to this position |
|
||||||
Facing | Fungus.FacingDirection | Direction character is facing |
|
||||||
Use Default Settings | System.Boolean | Use Default Settings |
|
||||||
Fade Duration | System.Single | Fade Duration |
|
||||||
Move Duration | System.Single | Movement Duration |
|
||||||
Shift Offset | UnityEngine.Vector2 | Shift Offset |
|
||||||
Move | System.Boolean | Move portrait into new position |
|
||||||
Shift Into Place | System.Boolean | Start from offset position |
|
||||||
Wait Until Finished | System.Boolean | Wait until the tween has finished before executing the next command |
|
||||||
Display | Fungus.DisplayType | Display type |
|
||||||
|
|
||||||
# Say # {#Say} |
|
||||||
Writes text in a dialog box. |
|
||||||
|
|
||||||
Defined in Fungus.Say |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Description | System.String | Notes about this story text for other authors, localization, etc. |
|
||||||
Character | Fungus.Character | Character that is speaking |
|
||||||
Portrait | UnityEngine.Sprite | Portrait that represents speaking character |
|
||||||
Voice Over Clip | UnityEngine.AudioClip | Voiceover audio to play when writing the text |
|
||||||
Show Always | System.Boolean | Always show this Say text when the command is executed multiple times |
|
||||||
Show Count | System.Int32 | Number of times to show this Say text when the command is executed multiple times |
|
||||||
Extend Previous | System.Boolean | Type this text in the previous dialog box. |
|
||||||
Fade When Done | System.Boolean | Fade out the dialog box when writing has finished and not waiting for input. |
|
||||||
Wait For Click | System.Boolean | Wait for player to click before continuing. |
|
||||||
Stop Voiceover | System.Boolean | Stop playing voiceover when text finishes writing. |
|
||||||
Wait For V O | System.Boolean | Wait for the Voice Over to complete before continuing |
|
||||||
Set Say Dialog | Fungus.SayDialog | Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog. |
|
||||||
|
|
||||||
# Set Language # {#SetLanguage} |
|
||||||
Set the active language for the scene. A Localization object with a localization file must be present in the scene. |
|
||||||
|
|
||||||
Defined in Fungus.SetLanguage |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_language Code | Fungus.StringData | Code of the language to set. e.g. ES, DE, JA |
|
||||||
|
|
||||||
# Set Menu Dialog # {#SetMenuDialog} |
|
||||||
Sets a custom menu dialog to use when displaying multiple choice menus |
|
||||||
|
|
||||||
Defined in Fungus.SetMenuDialog |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Menu Dialog | Fungus.MenuDialog | The Menu Dialog to use for displaying menu buttons |
|
||||||
|
|
||||||
# Set Say Dialog # {#SetSayDialog} |
|
||||||
Sets a custom say dialog to use when displaying story text |
|
||||||
|
|
||||||
Defined in Fungus.SetSayDialog |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Say Dialog | Fungus.SayDialog | The Say Dialog to use for displaying Say story text |
|
||||||
|
|
@ -1,19 +0,0 @@ |
|||||||
# Priority Signals commands # {#priority signals_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Get Priority Count # {#GetPriorityCount} |
|
||||||
Copy the value of the Priority Count to a local IntegerVariable, intended primarily to assist with debugging use of Priority. |
|
||||||
|
|
||||||
Defined in Fungus.FungusPriorityCount |
|
||||||
# Priority Down # {#PriorityDown} |
|
||||||
Decrease the FungusPriority count, causing the related FungusPrioritySignals to fire. Intended to be used to notify external systems that fungus is doing something important and they should perhaps resume. |
|
||||||
|
|
||||||
Defined in Fungus.FungusPriorityDecrease |
|
||||||
# Priority Reset # {#PriorityReset} |
|
||||||
Resets the FungusPriority count to zero. Useful if you are among logic that is hard to have matching increase and decreases. |
|
||||||
|
|
||||||
Defined in Fungus.FungusPriorityReset |
|
||||||
# Priority Up # {#PriorityUp} |
|
||||||
Increases the FungusPriority count, causing the related FungusPrioritySignals to fire. Intended to be used to notify external systems that fungus is doing something important and they should perhaps pause. |
|
||||||
|
|
||||||
Defined in Fungus.FungusPriorityIncrease |
|
@ -1,27 +0,0 @@ |
|||||||
# Rigidbody2D commands # {#rigidbody2d_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# AddForce2D # {#AddForce2D} |
|
||||||
Add force to a Rigidbody2D |
|
||||||
|
|
||||||
Defined in Fungus.AddForce2D |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Force | Fungus.Vector2Data | Vector of force to be added |
|
||||||
Force Scale Factor | Fungus.FloatData | Scale factor to be applied to force as it is used. |
|
||||||
At Position | Fungus.Vector2Data | World position the force is being applied from. Used only in AddForceAtPosition |
|
||||||
|
|
||||||
# AddTorque2D # {#AddTorque2D} |
|
||||||
Add Torque to a Rigidbody2D |
|
||||||
|
|
||||||
Defined in Fungus.AddTorque2D |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Force | Fungus.FloatData | Amount of torque to be added |
|
||||||
|
|
||||||
# StopMotion2D # {#StopMotion2D} |
|
||||||
Stop velocity and angular velocity on a Rigidbody2D |
|
||||||
|
|
||||||
Defined in Fungus.StopMotionRigidBody2D |
|
@ -1,12 +0,0 @@ |
|||||||
# Scene commands # {#scene_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Reload # {#Reload} |
|
||||||
Reload the current scene |
|
||||||
|
|
||||||
Defined in Fungus.ReloadScene |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Loading Image | UnityEngine.Texture2D | Image to display while loading the scene |
|
||||||
|
|
@ -1,25 +0,0 @@ |
|||||||
# Scene event handlers # {#scene_events} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Flowchart Enabled # {#FlowchartEnabled} |
|
||||||
The block will execute when the Flowchart game object is enabled. |
|
||||||
|
|
||||||
Defined in Fungus.FlowchartEnabled |
|
||||||
# Message Received # {#MessageReceived} |
|
||||||
The block will execute when the specified message is received from a Send Message command. |
|
||||||
|
|
||||||
Defined in Fungus.MessageReceived |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Message | System.String | Fungus message to listen for |
|
||||||
|
|
||||||
# Save Point Loaded # {#SavePointLoaded} |
|
||||||
Execute this block when a saved point is loaded. Use the 'new_game' key to handle game start. |
|
||||||
|
|
||||||
Defined in Fungus.SavePointLoaded |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Save Point Keys | System.Collections.Generic.List`1[System.String] | Block will execute if the Save Key of the loaded save point matches this save key. |
|
||||||
|
|
@ -1,132 +0,0 @@ |
|||||||
# Scripting commands # {#scripting_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Comment # {#Comment} |
|
||||||
Use comments to record design notes and reminders about your game. |
|
||||||
|
|
||||||
Defined in Fungus.Comment |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Commenter Name | System.String | Name of Commenter |
|
||||||
Comment Text | System.String | Text to display for this comment |
|
||||||
|
|
||||||
# Call Method # {#CallMethod} |
|
||||||
Calls a named method on a GameObject using the GameObject.SendMessage() system. |
|
||||||
|
|
||||||
Defined in Fungus.CallMethod |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Target Object | UnityEngine.GameObject | Target monobehavior which contains the method we want to call |
|
||||||
Method Name | System.String | Name of the method to call |
|
||||||
Delay | System.Single | Delay (in seconds) before the method will be called |
|
||||||
|
|
||||||
# Debug Log # {#DebugLog} |
|
||||||
Writes a log message to the debug console. |
|
||||||
|
|
||||||
Defined in Fungus.DebugLog |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Log Type | Fungus.DebugLogType | Display type of debug log info |
|
||||||
Log Message | Fungus.StringDataMulti | Text to write to the debug log. Supports variable substitution, e.g. {$Myvar} |
|
||||||
|
|
||||||
# Destroy # {#Destroy} |
|
||||||
Destroys a specified game object in the scene. |
|
||||||
|
|
||||||
Defined in Fungus.Destroy |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
_target Game Object | Fungus.GameObjectData | Reference to game object to destroy |
|
||||||
Destroy In X Seconds | Fungus.FloatData | Optional delay given to destroy |
|
||||||
|
|
||||||
# Execute Lua # {#ExecuteLua} |
|
||||||
Executes a Lua code chunk using a Lua Environment. |
|
||||||
|
|
||||||
Defined in Fungus.ExecuteLua |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Lua Environment | Fungus.LuaEnvironment | Lua Environment to use to execute this Lua script |
|
||||||
Lua File | UnityEngine.TextAsset | A text file containing Lua script to execute. |
|
||||||
Lua Script | System.String | Lua script to execute. This text is appended to the contents of Lua file (if one is specified). |
|
||||||
Run As Coroutine | System.Boolean | Execute this Lua script as a Lua coroutine |
|
||||||
Wait Until Finished | System.Boolean | Pause command execution until the Lua script has finished execution |
|
||||||
Return Variable | Fungus.Variable | A Flowchart variable to store the returned value in. |
|
||||||
|
|
||||||
# Invoke Event # {#InvokeEvent} |
|
||||||
Calls a list of component methods via the Unity Event System (as used in the Unity UI). This command is more efficient than the Invoke Method command but can only pass a single parameter and doesn't support return values. |
|
||||||
|
|
||||||
Defined in Fungus.InvokeEvent |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Description | System.String | A description of what this command does. Appears in the command summary. |
|
||||||
Delay | System.Single | Delay (in seconds) before the methods will be called |
|
||||||
Invoke Type | Fungus.InvokeType | Selects type of method parameter to pass |
|
||||||
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. |
|
||||||
|
|
||||||
# Invoke Method # {#InvokeMethod} |
|
||||||
Invokes a method of a component via reflection. Supports passing multiple parameters and storing returned values in a Fungus variable. |
|
||||||
|
|
||||||
Defined in Fungus.InvokeMethod |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Description | System.String | A description of what this command does. Appears in the command summary. |
|
||||||
Target Object | UnityEngine.GameObject | GameObject containing the component method to be invoked |
|
||||||
Target Component Assembly Name | System.String | Name of assembly containing the target component |
|
||||||
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 |
|
||||||
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.CallMode | The coroutine call behavior for methods that return IEnumerator |
|
||||||
|
|
||||||
# Open URL # {#OpenURL} |
|
||||||
Opens the specified URL in the browser. |
|
||||||
|
|
||||||
Defined in Fungus.OpenURL |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Url | Fungus.StringData | URL to open in the browser |
|
||||||
|
|
||||||
# Set Active # {#SetActive} |
|
||||||
Sets a game object in the scene to be active / inactive. |
|
||||||
|
|
||||||
Defined in Fungus.SetActive |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Spawn Object # {#SpawnObject} |
|
||||||
Spawns a new object based on a reference to a scene or prefab game object. |
|
||||||
|
|
||||||
Defined in Fungus.SpawnObject |
|
||||||
|
|
||||||
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 as parent during instantiate. |
|
||||||
_spawn At Self | Fungus.BooleanData | If true, will use the Transfrom of this Flowchart for the position and rotation. |
|
||||||
_spawn Position | Fungus.Vector3Data | Local position of newly spawned object. |
|
||||||
_spawn Rotation | Fungus.Vector3Data | Local rotation of newly spawned object. |
|
||||||
_newly Spawned Object | Fungus.GameObjectData | Optional variable to store the GameObject that was just created. |
|
||||||
|
|
@ -1,97 +0,0 @@ |
|||||||
# Sprite commands # {#sprite_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Fade Sprite # {#FadeSprite} |
|
||||||
Fades a sprite to a target color over a period of time. |
|
||||||
|
|
||||||
Defined in Fungus.FadeSprite |
|
||||||
|
|
||||||
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. |
|
||||||
Wait Until Finished | System.Boolean | Wait until the fade has finished before executing the next command |
|
||||||
|
|
||||||
# Set Clickable 2D # {#SetClickable2D} |
|
||||||
Sets a Clickable2D component to be clickable / non-clickable. |
|
||||||
|
|
||||||
Defined in Fungus.SetClickable2D |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Set Collider # {#SetCollider} |
|
||||||
Sets all collider (2d or 3d) components on the target objects to be active / inactive |
|
||||||
|
|
||||||
Defined in Fungus.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 |
|
||||||
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 |
|
||||||
|
|
||||||
# Set Draggable 2D # {#SetDraggable2D} |
|
||||||
Sets a Draggable2D component to be draggable / non-draggable. |
|
||||||
|
|
||||||
Defined in Fungus.SetDraggable2D |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Set Mouse Cursor # {#SetMouseCursor} |
|
||||||
Sets the mouse cursor sprite. |
|
||||||
|
|
||||||
Defined in Fungus.SetMouseCursor |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Cursor Texture | UnityEngine.Texture2D | Texture to use for cursor. Will use default mouse cursor if no sprite is specified |
|
||||||
Hot Spot | UnityEngine.Vector2 | The offset from the top left of the texture to use as the target point |
|
||||||
|
|
||||||
# Set Sorting Layer # {#SetSortingLayer} |
|
||||||
Sets the Renderer sorting layer of every child of a game object. Applies to all Renderers (including mesh, skinned mesh, and sprite). |
|
||||||
|
|
||||||
Defined in Fungus.SetSortingLayer |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Target Object | UnityEngine.GameObject | Root Object that will have the Sorting Layer set. Any children will also be affected |
|
||||||
Sorting Layer | System.String | The New Layer Name to apply |
|
||||||
|
|
||||||
# Set Sprite # {#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} |
|
||||||
Controls the render order of sprites by setting the Order In Layer property of a list of sprites. |
|
||||||
|
|
||||||
Defined in Fungus.SetSpriteOrder |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Show Sprite # {#ShowSprite} |
|
||||||
Makes a sprite visible / invisible by setting the color alpha. |
|
||||||
|
|
||||||
Defined in Fungus.ShowSprite |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Sprite Renderer | UnityEngine.SpriteRenderer | Sprite object to be made visible / invisible |
|
||||||
_visible | Fungus.BooleanData | Make the sprite visible or invisible |
|
||||||
Affect Children | System.Boolean | Affect the visibility of child sprites |
|
||||||
|
|
@ -1,56 +0,0 @@ |
|||||||
# Sprite event handlers # {#sprite_events} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Drag Cancelled # {#DragCancelled} |
|
||||||
The block will execute when the player drags an object and releases it without dropping it on a target object. |
|
||||||
|
|
||||||
Defined in Fungus.DragCancelled |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on |
|
||||||
|
|
||||||
# Drag Completed # {#DragCompleted} |
|
||||||
The block will execute when the player drags an object and successfully drops it on a target object. |
|
||||||
|
|
||||||
Defined in Fungus.DragCompleted |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on |
|
||||||
Target Object | UnityEngine.Collider2D | Drag target object to listen for drag events on |
|
||||||
|
|
||||||
# Drag Entered # {#DragEntered} |
|
||||||
The block will execute when the player is dragging an object which starts touching the target object. |
|
||||||
|
|
||||||
Defined in Fungus.DragEntered |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on |
|
||||||
Target Object | UnityEngine.Collider2D | Drag target object to listen for drag events on |
|
||||||
|
|
||||||
# Drag Exited # {#DragExited} |
|
||||||
The block will execute when the player is dragging an object which stops touching the target object. |
|
||||||
|
|
||||||
Defined in Fungus.DragExited |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Draggable Object | Fungus.Draggable2D | Draggable object to listen for drag events on |
|
||||||
Target Object | UnityEngine.Collider2D | Drag target object to listen for drag events on |
|
||||||
|
|
||||||
# Drag Started # {#DragStarted} |
|
||||||
The block will execute when the player starts dragging an object. |
|
||||||
|
|
||||||
Defined in Fungus.DragStarted |
|
||||||
# Object Clicked # {#ObjectClicked} |
|
||||||
The block will execute when the user clicks or taps on the clickable object. |
|
||||||
|
|
||||||
Defined in Fungus.ObjectClicked |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Clickable Object | Fungus.Clickable2D | Object that the user can click or tap on |
|
||||||
Wait Frames | System.Int32 | Wait for a number of frames before executing the block. |
|
||||||
|
|
@ -1,15 +0,0 @@ |
|||||||
# Tests commands # {#tests_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Fail # {#Fail} |
|
||||||
Fails the current integration test |
|
||||||
|
|
||||||
Defined in Fungus.FailTest |
|
||||||
# Pass # {#Pass} |
|
||||||
Passes the current integration test |
|
||||||
|
|
||||||
Defined in Fungus.PassTest |
|
||||||
# TestNarrative # {#TestNarrative} |
|
||||||
Test command for narrative integration tests |
|
||||||
|
|
||||||
Defined in NarrativeTests |
|
@ -1,7 +0,0 @@ |
|||||||
# Transform commands # {#transform_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Property # {#Property} |
|
||||||
Get or Set a property of a transform component |
|
||||||
|
|
||||||
Defined in Fungus.TransformProperty |
|
@ -1,102 +0,0 @@ |
|||||||
# UI commands # {#ui_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Fade UI # {#FadeUI} |
|
||||||
Fades a UI object |
|
||||||
|
|
||||||
Defined in Fungus.FadeUI |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Get Text # {#GetText} |
|
||||||
Gets the text property from a UI Text object and stores it in a string variable. |
|
||||||
|
|
||||||
Defined in Fungus.GetText |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Get Toggle State # {#GetToggleState} |
|
||||||
Gets the state of a toggle UI object and stores it in a boolean variable. |
|
||||||
|
|
||||||
Defined in Fungus.GetToggleState |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Toggle | UnityEngine.UI.Toggle | Target toggle object to get the value from |
|
||||||
Toggle State | Fungus.BooleanVariable | Boolean variable to store the state of the toggle value in. |
|
||||||
|
|
||||||
# Set Interactable # {#SetInteractable} |
|
||||||
Set the interactable state of selectable objects. |
|
||||||
|
|
||||||
Defined in Fungus.SetInteractable |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Set Slider Value # {#SetSliderValue} |
|
||||||
Sets the value property of a slider object |
|
||||||
|
|
||||||
Defined in Fungus.SetSliderValue |
|
||||||
|
|
||||||
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. |
|
||||||
|
|
||||||
# Set Text # {#SetText} |
|
||||||
Sets the text property on a UI Text object and/or an Input Field object. |
|
||||||
|
|
||||||
Defined in Fungus.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. |
|
||||||
Text | Fungus.StringDataMulti | String value to assign to the text object |
|
||||||
Description | System.String | Notes about this story text for other authors, localization, etc. |
|
||||||
|
|
||||||
# Set Toggle State # {#SetToggleState} |
|
||||||
Sets the state of a toggle UI object |
|
||||||
|
|
||||||
Defined in Fungus.SetToggleState |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Toggle | UnityEngine.UI.Toggle | Target toggle object to set the state on |
|
||||||
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} |
|
||||||
Writes content to a UI Text or Text Mesh object. |
|
||||||
|
|
||||||
Defined in Fungus.Write |
|
||||||
|
|
||||||
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 |
|
||||||
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 |
|
||||||
Text Color | Fungus.TextColor | Color mode to apply to the text. |
|
||||||
Set Alpha | Fungus.FloatData | Alpha to apply to the text. |
|
||||||
Set Color | Fungus.ColorData | Color to apply to the text. |
|
||||||
|
|
@ -1,31 +0,0 @@ |
|||||||
# UI event handlers # {#ui_events} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Button Clicked # {#ButtonClicked} |
|
||||||
The block will execute when the user clicks on the target UI button object. |
|
||||||
|
|
||||||
Defined in Fungus.ButtonClicked |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Target Button | UnityEngine.UI.Button | The UI Button that the user can click on |
|
||||||
|
|
||||||
# End Edit # {#EndEdit} |
|
||||||
The block will execute when the user finishes editing the text in the input field. |
|
||||||
|
|
||||||
Defined in Fungus.EndEdit |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Target Input Field | UnityEngine.UI.InputField | The UI Input Field that the user can enter text into |
|
||||||
|
|
||||||
# Toggle Changed # {#ToggleChanged} |
|
||||||
The block will execute when the state of the target UI toggle object changes. The state of the toggle is stored in the Toggle State boolean variable. |
|
||||||
|
|
||||||
Defined in Fungus.ToggleChanged |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Target Toggle | UnityEngine.UI.Toggle | The block will execute when the state of the target UI toggle object changes. |
|
||||||
Toggle State | Fungus.BooleanVariable | The new state of the UI toggle object is stored in this boolean variable. |
|
||||||
|
|
@ -1,129 +0,0 @@ |
|||||||
# Variable commands # {#variable_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Delete Save Key # {#DeleteSaveKey} |
|
||||||
Deletes a saved value from permanent storage. |
|
||||||
|
|
||||||
Defined in Fungus.DeleteSaveKey |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
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} |
|
||||||
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.LoadVariable |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber}" |
|
||||||
Variable | Fungus.Variable | Variable to store the value in. |
|
||||||
|
|
||||||
# Random Float # {#RandomFloat} |
|
||||||
Sets an float variable to a random value in the defined range. |
|
||||||
|
|
||||||
Defined in Fungus.RandomFloat |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Random Integer # {#RandomInteger} |
|
||||||
Sets an integer variable to a random value in the defined range. |
|
||||||
|
|
||||||
Defined in Fungus.RandomInteger |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Read Text File # {#ReadTextFile} |
|
||||||
Reads in a text file and stores the contents in a string variable |
|
||||||
|
|
||||||
Defined in Fungus.ReadTextFile |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
||||||
# Reset # {#Reset} |
|
||||||
Resets the state of all commands and variables in the Flowchart. |
|
||||||
|
|
||||||
Defined in Fungus.Reset |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Reset Commands | System.Boolean | Reset state of all commands in the script |
|
||||||
Reset Variables | System.Boolean | Reset variables back to their default values |
|
||||||
|
|
||||||
# Save Variable # {#SaveVariable} |
|
||||||
Save an Boolean, Integer, Float or String variable to persistent storage using a string key. The value can be loaded again later using the Load Variable command. You can also use the Set Save Profile command to manage separate save profiles for multiple players. |
|
||||||
|
|
||||||
Defined in Fungus.SaveVariable |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Key | System.String | Name of the saved value. Supports variable substition e.g. "player_{$PlayerNumber} |
|
||||||
Variable | Fungus.Variable | Variable to read the value from. Only Boolean, Integer, Float and String are supported. |
|
||||||
|
|
||||||
# Set Save Profile # {#SetSaveProfile} |
|
||||||
Sets the active profile that the Save Variable and Load Variable commands will use. This is useful to crete multiple player save games. Once set, the profile applies across all Flowcharts and will also persist across scene loads. |
|
||||||
|
|
||||||
Defined in Fungus.SetSaveProfile |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Save Profile Name | System.String | Name of save profile to make active. |
|
||||||
|
|
||||||
# Set Variable # {#SetVariable} |
|
||||||
Sets a Boolean, Integer, Float or String variable to a new value using a simple arithmetic operation. The value can be a constant or reference another variable of the same type. |
|
||||||
|
|
||||||
Defined in Fungus.SetVariable |
|
||||||
|
|
||||||
Property | Type | Description |
|
||||||
--- | --- | --- |
|
||||||
Variable | Fungus.Variable | The variable whos value will be set |
|
||||||
Set Operator | Fungus.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 |
|
||||||
Animator Data | Fungus.AnimatorData | Animator value to set with |
|
||||||
Audio Source Data | Fungus.AudioSourceData | AudioSource value to set with |
|
||||||
Color Data | Fungus.ColorData | Color value to set with |
|
||||||
Game Object Data | Fungus.GameObjectData | GameObject value to set with |
|
||||||
Material Data | Fungus.MaterialData | Material value to set with |
|
||||||
Object Data | Fungus.ObjectData | Object value to set with |
|
||||||
Rigidbody2 D Data | Fungus.Rigidbody2DData | Rigidbody2D value to set with |
|
||||||
Sprite Data | Fungus.SpriteData | Sprite value to set with |
|
||||||
Texture Data | Fungus.TextureData | Texture value to set with |
|
||||||
Transform Data | Fungus.TransformData | Transform value to set with |
|
||||||
Vector2 Data | Fungus.Vector2Data | Vector2 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 |
|
||||||
|
|
@ -1,19 +0,0 @@ |
|||||||
# Vector3 commands # {#vector3_commands} |
|
||||||
|
|
||||||
[TOC] |
|
||||||
# Arithmetic # {#Arithmetic} |
|
||||||
Vector3 add, sub, mul, div arithmetic |
|
||||||
|
|
||||||
Defined in Fungus.Vector3Arithmetic |
|
||||||
# Fields # {#Fields} |
|
||||||
Get or Set the x,y,z fields of a vector3 via floatvars |
|
||||||
|
|
||||||
Defined in Fungus.Vector3Fields |
|
||||||
# Normalise # {#Normalise} |
|
||||||
Normalise a Vector3 |
|
||||||
|
|
||||||
Defined in Fungus.Vector3Normalise |
|
||||||
# ToVector2 # {#ToVector2} |
|
||||||
Convert Fungus Vector3 to Fungus Vector2 |
|
||||||
|
|
||||||
Defined in Fungus.Vector3ToVector2 |
|
@ -1,91 +0,0 @@ |
|||||||
# About %Fungus # {#about_fungus} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
# What is Fungus? # {#what_is_fungus} |
|
||||||
|
|
||||||
%Fungus is a tool which makes it easy to add colourful characters and craft gripping storylines in your game, even if you have never used <a href="http://unity3d.com" target="_blank">Unity</a> before. Our intuitive interface lets everyone create beautiful story games easily - <b>for free and with no coding</b>! |
|
||||||
|
|
||||||
![img fungus_town] |
|
||||||
|
|
||||||
# Who's it for? # {#whos_it_for} |
|
||||||
%Fungus is popular with writers, illustrators, animators and game designers, especially visual novel & interactive fiction authors. Many people using %Fungus are creating games in Unity for the very first time. It is a popular choice for game jams and game design courses. |
|
||||||
|
|
||||||
# Free & Open Source # {#open_source} |
|
||||||
|
|
||||||
We believe that interactive storytelling should be accessible to everyone, so %Fungus is <b>100% free & open source</b>. It works great with both the free and pro versions of Unity 3D. %Fungus is inspired by other great open source storytelling tools like [Twine], [Ren'Py] and [Scratch]. |
|
||||||
|
|
||||||
# Community # {#community} |
|
||||||
|
|
||||||
The %Fungus community is very welcoming and helpful to newcomers. Many people using %Fungus have never used Unity or even made a game before, so feel free to ask questions on our [community forum]. Helping other people with their questions is a fantastic and very welcome way to contribute back to the community. |
|
||||||
|
|
||||||
![img community] |
|
||||||
|
|
||||||
# Features # {#features} |
|
||||||
|
|
||||||
@htmlonly |
|
||||||
<div align="center" style="float:right;"> |
|
||||||
<iframe width="400" height="225" src="https://youtube.com/embed/kP767dFQaCU?t=5m20s" frameborder="0" allowfullscreen></iframe> |
|
||||||
</div> |
|
||||||
@endhtmlonly |
|
||||||
|
|
||||||
%Fungus allows you to easily add storytelling features to your Unity games with no coding, via an intuitive visual scripting system. |
|
||||||
|
|
||||||
- Suitable for making visual novels, RPGs, hidden object, puzzle and interactive fiction games. |
|
||||||
- Flowchart-based character dialogue |
|
||||||
- Internationalization of your character dialogue. |
|
||||||
- Easy control of sprites, camera and audio to help tell your story |
|
||||||
- Works for both 2D and 3D Unity games |
|
||||||
- Integrates easily with other Unity code and simple to extend. |
|
||||||
- Powerful Lua scripting support for more experienced users |
|
||||||
- 100% free and open source |
|
||||||
|
|
||||||
# Contribute # {#contribute} |
|
||||||
|
|
||||||
We welcome all sorts of contributions to %Fungus. You can report bugs, suggest new features, contribute source code, write an article, help answer questions on the forums or even just tell your friends about the project! |
|
||||||
|
|
||||||
- Issue Tracker: [GitHub issue tracker] |
|
||||||
- Source Code: [GitHub code repository] |
|
||||||
|
|
||||||
# Credits # {#credits} |
|
||||||
|
|
||||||
[Chris Gregan] is the main author and maintainer of %Fungus. He's co-founder of [Snozbot], along with [John O' Kane] and [Ronan Pearce]. |
|
||||||
|
|
||||||
[Dr. Matt Smith] has kindly contributed the written documentation for the %Fungus project. If you're new to Unity development then a great source of information, ideas and sample projects is his [Unity 5.x Cookbook], by Matt and [Chico Queiroz]. |
|
||||||
|
|
||||||
![img cookbook] |
|
||||||
|
|
||||||
[Paul Mc Grath] is Animator / Designer / Film-maker at Whackala. He contributed the @ref tutorial_videos for this site as well as creating the @ref training_course. Special thanks also to [Vicky Lee] and [Coding Grace] who have helped us to organise loads of %Fungus workshops, |
|
||||||
|
|
||||||
%Fungus wouldn't be possible without all the awesome people in our community who have contributed to the project and supported us in myriad ways. Thank you all! |
|
||||||
|
|
||||||
# License # {#license} |
|
||||||
|
|
||||||
The %Fungus software is licensed under the [Open Source MIT License]. |
|
||||||
|
|
||||||
The %Fungus documentation is licensed under the [Creative Commons Attribution-NonCommercial License]. |
|
||||||
|
|
||||||
[Snozbot]: http://snozbot.com |
|
||||||
[Chris Gregan]: http://twitter.com/gofungus |
|
||||||
[John O' Kane]: https://twitter.com/johnokane |
|
||||||
[Ronan Pearce]: https://twitter.com/ronanpearce |
|
||||||
[Vicky Lee]: https://twitter.com/whykay |
|
||||||
[Paul Mc Grath]: http://whackala.com |
|
||||||
[Coding Grace]: https://www.codinggrace.com |
|
||||||
[FungusGames.com]: http://www.fungusgames.com |
|
||||||
[community forum]: http://fungusgames.com/forum |
|
||||||
[Twine]: http://twinery.org |
|
||||||
[Ren'Py]: https://www.renpy.org |
|
||||||
[Scratch]: https://scratch.mit.edu |
|
||||||
[GitHub issue tracker]: https://github.com/snozbot/fungus/issues |
|
||||||
[GitHub code repository]: https://github.com/snozbot/fungus |
|
||||||
[Dr. Matt Smith]: https://github.com/dr-matt-smith/ |
|
||||||
[Creative Commons Attribution-NonCommercial License]: https://creativecommons.org/licenses/by-nc/3.0/ |
|
||||||
[Open Source MIT License]: https://github.com/snozbot/fungus/blob/master/LICENSE |
|
||||||
[Unity 5.x Cookbook]: https://www.packtpub.com/game-development/unity-5x-cookbook |
|
||||||
[Chico Queiroz]: https://www.linkedin.com/in/chicoqueiroz |
|
||||||
|
|
||||||
[img community]: ./about/community.jpeg |
|
||||||
[img fungus_town]: ./about/fungus_town.png |
|
||||||
[img cookbook]: ./about/B03899_MockupCover_Cookbook.jpg |
|
||||||
|
|
||||||
|
|
@ -1,241 +0,0 @@ |
|||||||
# Blocks # {#blocks} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
A fundamental concept of %Fungus is the **Block**. Blocks contain your %Fungus Commands, and reside inside Flowcharts. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Inspecting Block properties # {#inspect_block} |
|
||||||
|
|
||||||
Blocks are found inside Flowcharts. Blocks are where your %Fungus Commands are stored. Each Block can contain 1 or more %Fungus Commands: |
|
||||||
|
|
||||||
![block] |
|
||||||
|
|
||||||
To inspect the properties of a Block do the following: |
|
||||||
|
|
||||||
1. (setup) Create a %Fungus Flowchart. |
|
||||||
2. Click to select the default Block in the new Flowchart. You should see the Block's properties displayed in the Inspector window: |
|
||||||
|
|
||||||
![block properties] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Setting Block name # {#set_block_name} |
|
||||||
|
|
||||||
When working with more than one Block, its important to name each Block in a meaningful way. To rename a Block do the following: |
|
||||||
|
|
||||||
1. (setup) Create a %Fungus Flowchart. |
|
||||||
2. Click to select the default Block in the new Flowchart. The selected block has a green outline. |
|
||||||
3. You should see the Block's properties displayed in the Inspector window: |
|
||||||
![block name] |
|
||||||
4. In the Inspector change the text for the Block Name property to "Say Hello". |
|
||||||
5. You should now see the Block has been renamed in the Flowchart window: |
|
||||||
![block renamed] |
|
||||||
6. Now add a detailed description about the Block in the Description property in the Inspector window: |
|
||||||
![block description] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Creating a Block # {#create_block} |
|
||||||
|
|
||||||
To create a new Block do the following: |
|
||||||
|
|
||||||
1. (setup) Create a %Fungus Flowchart (or be viewing the Flowchart for your current project). |
|
||||||
2. Click the Add New Block button (the plus-sign "+") in the top-left of the %Fungus Flowchart window: |
|
||||||
![add block button] |
|
||||||
3. A new Block should have been added to your Flowchart (with the default name "New Block", or "New Block1/2/3 etc." so each name is unique) |
|
||||||
![new block] |
|
||||||
|
|
||||||
Note - a good time to choose a meaningful name a Block is immediately after creating a new Block ... |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Delete a Block # {#delete_block} |
|
||||||
|
|
||||||
To delete a Block from the current Flowchart, do the following: |
|
||||||
|
|
||||||
1. (setup) Create a %Fungus Flowchart (or be viewing the Flowchart for your current project). |
|
||||||
2. Right-mouse-click over the Block you wish to delete, and choose menu: ```Delete```: |
|
||||||
![delete block] |
|
||||||
3. The Block should now have been removed from the Flowchart: |
|
||||||
![deleted block] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Duplicate a Block # {#duplicate_block} |
|
||||||
|
|
||||||
To duplicate (clone / make an exact copy of) a Block from the current Flowchart, do the following: |
|
||||||
|
|
||||||
1. (setup) Create a %Fungus Flowchart (or be viewing the Flowchart for your current project). |
|
||||||
2. Right-mouse-click over the Block you wish to duplicate, and choose menu: ```Duplicate```: |
|
||||||
![duplicate block] |
|
||||||
3. A copy of the Block should now have been added to the Flowchart (with "(copy)" appended the name of the duplicate): |
|
||||||
![duplicated block] |
|
||||||
|
|
||||||
Note - a good time to choose a meaningful name a Block is immediately after duplicating one ... |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Moving blocks # {#move_block} |
|
||||||
|
|
||||||
To move / rearrange Blocks in the Flowchart window do the following: |
|
||||||
|
|
||||||
1. (setup) Create a %Fungus Flowchart (or be viewing the Flowchart for your current project). |
|
||||||
2. Move a Block by clicking-and-dragging with the left mouse button: |
|
||||||
![move block] |
|
||||||
3. When you release the mouse button the Block will remain where it was dragged: |
|
||||||
|
|
||||||
![release block] |
|
||||||
|
|
||||||
![animated move block] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# The 3 types of Block # {#three_types} |
|
||||||
|
|
||||||
%Fungus Flowcharts visually differentiate three differents kinds of Block behavior: |
|
||||||
|
|
||||||
1. Event Block - blue rounded rectangle (Block execution triggered by an event) |
|
||||||
2. Branching Block - orange hexagon (passes control to 2 or more other Blocks, and not an Event Block) |
|
||||||
3. Standard Block - yellow rectangle (no event, passes control to 0 or 1 other blocks) |
|
||||||
|
|
||||||
## 1: Event Block - blue rounded rectangle ## |
|
||||||
One way %Fungus decides when to start executing the Commands inside a Block is if a Block has defined an Execute On Event. If a Block has any of the possible Execute On Events chosen (such as Game Started, Message Received, Sprite Drag Completed, Key Pressed etc.) then this Block will be displayed as a **blue rounded rectangle**: |
|
||||||
|
|
||||||
![event block] |
|
||||||
|
|
||||||
As we can see, the default Block created with every new Flowchart automatically defines the Game Started Execute On Event, so this default Block always is displayed as an Event Block. |
|
||||||
|
|
||||||
NOTE: A Block with an Execute On Event will always appear as an Event Block in the Flowchart, regardless of whether its Commands contain menus or calls to 2 or more Blocks). In other words, in terms of Flowchart appearance, display of an Event Block overrides display of a Branching Block. |
|
||||||
|
|
||||||
## 2: Branching Block - orange hexagon ## |
|
||||||
If a Block is *not* an Event Block, and its Commands include Calls and/or Menu commands to execute Commands in 2 or more other Blocks, then in the Flowchart window this Block will be displayed as a Branching Block, visually appearing as an **orange hexagon**. |
|
||||||
|
|
||||||
![branching block] |
|
||||||
|
|
||||||
## 3: Standard Block - yellow rectangle ## |
|
||||||
If a Block is *neither* an Event Block *nor* a Command Block, then it is a Standard Block, and will be displayed as an **yellow rectangle**. |
|
||||||
|
|
||||||
![standard block] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Connections between Blocks # {#block_connections} |
|
||||||
|
|
||||||
A whole scene's logic can rarely fit all into a single Block, therefore we need ways for one Block to pass execution control to other Blocks. There are several ways to do this, the most common being: |
|
||||||
|
|
||||||
1. the Call Command |
|
||||||
2. the Menu Command |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
## Executing Commands in another Block with the Call Command |
|
||||||
The Call Command tells %Fungus to go and start executing the Commands in named Block. There are several ways to do this, we can tell %Fungus to Stop execution completely in the current Block, and just pass control to named Block. We can also tell %Fungus to go and completed all Commands in the named Block, and when they are finished, to then continue executing any remaining commands in the current Block. Finally, and perhaps the most complicated/sophisticated technique, we can tell %Fungus to both started executing Commands in a named Block WHILE simultaneously continuing to execute remaining Commands in the current Block. |
|
||||||
|
|
||||||
To pass control to another Block, and stop executing Commands in the current Block, do the following: |
|
||||||
|
|
||||||
1. (setup) If you have not already done so: Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename this Block "Start". |
|
||||||
3. Add to Block "Start" a Say Command with the Story Text "I am in Start". |
|
||||||
![block start] |
|
||||||
4. Add a new Block to your Flowchart named "Block2". |
|
||||||
5. Add to Block "Block2" a Say Command with the Story Text "I am in Block2". |
|
||||||
![block 2] |
|
||||||
6. Add to Block "Start" a Call Command, by choosing menu: ```Flow | Call```: |
|
||||||
![flow call] |
|
||||||
7. With this Call Command Selected, in the Inspector choose Block2 from the list of Blocks for property **Target Block**: |
|
||||||
![call block menu] |
|
||||||
8. Note: We will keep the default of **Target Flowchart** (None), which means the current Flowchart. |
|
||||||
9. Note: We will keep the default of **Call Mode** Stop, which means that execution in the current Block (Start) will stop once execution of the called Block has begun. |
|
||||||
10. You should now see an arrow in the Flowchart window, connecting Block "Start" with Block "Block2". This visually tells us (the game developer) that a Call or Menu Command is present inside Block "Start" that tells %Fungus to execute commands in Block "Block2": |
|
||||||
|
|
||||||
![arrow between blocks] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Executing another Block # {#executing_block} |
|
||||||
|
|
||||||
Let's use a Say command above to ask a tricky mathematical question, and demonstrate the Menu command by offering the user a choice been "correct' and "incorrect" answers. Menu commands transfer control to another block - so we'll need to add 2 new blocks to correspond to the 2 answers. |
|
||||||
Do the following: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename the Block in the Flowchart to "Question". |
|
||||||
3. Create a Say command, with **Story Text** to ask the question: "Is 2 + 2?". |
|
||||||
4. Uncheck the "Wait For Click" checkbox (this is so we see the menu options immediately after the Say command has displayed the question): |
|
||||||
![maths say command] |
|
||||||
5. Create a new Block, named "Correct" which contains a **Say** command with the text "Well done, you are very mathematical!". Click the plus-sign button in the Flowchart window to add a new Block to the Flowchart, rename it "Correct" and then add that Say command: |
|
||||||
![correct block] |
|
||||||
6. Select the "Question" block, and add a Menu command by clicking the plus-sign add Command button in the Inspector and then choosing menu: ```Narrative | Menu```. |
|
||||||
![add menu command] |
|
||||||
7. With this new Menu command selected (green) in the top half of the Inspector window, set the **Text** to "Yes" and the **Target Block** to your new "Correct" block: |
|
||||||
![menu command] |
|
||||||
8. You should now see how the 'flow' of commands can change from Block "hello" to Block "Correct" in the Flowchart window: |
|
||||||
![flow between blocks in Flowchart] |
|
||||||
9. Add a second new Block named "Wrong", containing a Say command with text "Bad luck, perhaps consider a non-mathematical career path..." |
|
||||||
![block for wrong answer] |
|
||||||
10. Now we need to add another Menu command to our "hello" block, offering the user the "No" answer to our maths question, and passing control to Block "Wrong" if they disagree that 2 + 2 = 4. Select the "hello" block, and add a Menu command. With this new Menu command selected (green) in the top half of the Inspector window, set the **Text** to "No" and the **Target Block** to your new "Wrong" block. |
|
||||||
11. You should now see in the Flowchart window how block "hello" can pass control to either block "Correct" or Block "Wrong" - depending on which menu answer the user selects. |
|
||||||
![block connected to 2 others] |
|
||||||
12. Run the scene, and you should see the Say question appear at the bottom of the screen, and also the two Menu buttons "Yes" and "No" in the middle of the screen. Clicking "Yes" then runs the "Correct" Block's commands, and clicking "No" runs the "Wrong" block's commands: |
|
||||||
|
|
||||||
![menu running] |
|
||||||
|
|
||||||
![correct screen] |
|
||||||
|
|
||||||
![wrong screen] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Highlighting connections # {#highlighting_connections} |
|
||||||
|
|
||||||
In the Inspector window, if you select a Call or Menu Command (executing Commands in another Block in **the same Flowchart**), then you'll see the arrow between the 2 Blocks highlighted in GREEN: |
|
||||||
|
|
||||||
![green arrow highlight] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Setting an Event Handler # {#set_event_handler} |
|
||||||
|
|
||||||
Events are one way to declare when you want execution of the Commands in a Block to begin. Typical events include: |
|
||||||
|
|
||||||
- Game Started |
|
||||||
- Flowchart enabled |
|
||||||
- Message Received |
|
||||||
- Key Pressed (Up / Down / Repeat) |
|
||||||
- Sprite clicking / drag-dropping interactions |
|
||||||
|
|
||||||
The most common Event used to define when a Block should start execution is, of course, the **Game Started** event. Each new Flowchart automatically starts with a single empty Block that is defined to begin execution when the game starts: |
|
||||||
|
|
||||||
![event block] |
|
||||||
|
|
||||||
To change the Event defined for a Block, or to assign an event for a Block that had None, do the following: |
|
||||||
|
|
||||||
1. Select the Block in the Flowchart window. |
|
||||||
2. In the Inspector window, for property **Execute On Event** choose from the popup menu the desired Event: |
|
||||||
|
|
||||||
![define event] |
|
||||||
|
|
||||||
[block]: ./blocks/005_blocks/1_block.png "block" |
|
||||||
[block properties]: ./blocks/005_blocks/2_properties.png "block properties" |
|
||||||
[block name]: ./blocks/011_block_name/2_inspect_block.png "block name" |
|
||||||
[block renamed]: ./blocks/011_block_name/3_rename.png "block renamed" |
|
||||||
[block renamed]: ./blocks/011_block_name/3_rename.png "block renamed" |
|
||||||
[block description]: ./blocks/011_block_name/4_description.png "block description" |
|
||||||
[add block button]: ./blocks/006_block_create/1_add_block_button.png "add block button" |
|
||||||
[new block]: ./blocks/006_block_create/2_new_block_created.png "new block" |
|
||||||
[delete block]: ./blocks/007_block_delete/1_delete_menu.png "delete block" |
|
||||||
[deleted block]: ./blocks/007_block_delete/2_block_deleted.png "deleted block" |
|
||||||
[duplicate block]: ./blocks/009_block_duplicate/1_duplicate_menu.png "duplicate block" |
|
||||||
[duplicated block]: ./blocks/009_block_duplicate/2_duplicate_created.png "duplicated block" |
|
||||||
[move block]: ./blocks/010_block_move/1_move1.png "move block" |
|
||||||
[release block]: ./blocks/010_block_move/2_move2.png "release block" |
|
||||||
[animated move block]: ./blocks/010_block_move/animated_block_move.gif "animated move block" |
|
||||||
[event block]: ./blocks/001_3_block_types/1_event_block.png "event block" |
|
||||||
[branching block]: ./blocks/001_3_block_types/2_branching_block.png "branching block" |
|
||||||
[standard block]: ./blocks/001_3_block_types/3_standard_block.png "standard block" |
|
||||||
[block start]: ./blocks/002_call_other_blocks/1_start.png "block start" |
|
||||||
[block 2]: ./blocks/002_call_other_blocks/2_block2.png "block 2" |
|
||||||
[flow call]: ./blocks/002_call_other_blocks/3_menu_call.png "flow call" |
|
||||||
[call block menu]: ./blocks/002_call_other_blocks/4_call_block.png "call block menu" |
|
||||||
[arrow between blocks]: ./blocks/002_call_other_blocks/5_arrow.png "arrow between blocks" |
|
||||||
[maths say command]: ./blocks/004_menu_maths/2_edited_say.png "maths say command" |
|
||||||
[correct block]: ./blocks/004_menu_maths/1_correct_block.png "correct block" |
|
||||||
[add menu command]: ./blocks/004_menu_maths/6_add_menu.png "add menu command" |
|
||||||
[menu command]: ./blocks/004_menu_maths/4_menu_correct.png "menu command" |
|
||||||
[flow between blocks in Flowchart]: ./blocks/004_menu_maths/5_connected_blocks.png "flow between blocks in Flowchart" |
|
||||||
[block for wrong answer]: ./blocks/004_menu_maths/7_wrong_block.png "block for wrong answer" |
|
||||||
[block connected to 2 others]: ./blocks/004_menu_maths/8_three_block_menu.png "block connected to 2 others" |
|
||||||
[menu running]: ./blocks/004_menu_maths/9_menu_running.png "menu running" |
|
||||||
[correct screen]: ./blocks/004_menu_maths/10_correct.png "correct screen" |
|
||||||
[wrong screen]: ./blocks/004_menu_maths/11_wrong.png "wrong screen" |
|
||||||
[green arrow highlight]: ./blocks/003_highlight_green_arrow/5_arrow.png "green arrow highlight" |
|
||||||
[event block]: ./blocks/001_3_block_types/1_event_block.png "event block" |
|
||||||
[define event]: ./blocks/012_define_event/1_define_event.png "define event" |
|
@ -1,823 +0,0 @@ |
|||||||
Changelog {#changelog} |
|
||||||
========= |
|
||||||
[TOC] |
|
||||||
|
|
||||||
v3.11.4 {#v3.11.4} |
|
||||||
====== |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Updated project to Unity 2019.1.0f2 |
|
||||||
- Updated to .NET 4.x |
|
||||||
- Updated reference docs |
|
||||||
|
|
||||||
v3.11.3 {#v3.11.3} |
|
||||||
====== |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Additional null checks around Flowchart.selectedBlocks and Flowchart.selectedCommands. |
|
||||||
|
|
||||||
v3.11.2 {#v3.11.2} |
|
||||||
====== |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Static list caching in editor. |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Spacing in debug output related to Block find and execute warnings and failures. |
|
||||||
|
|
||||||
v3.11.1 {#v3.11.1} |
|
||||||
====== |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Compile error in Unity 2018.3.6f1 |
|
||||||
|
|
||||||
v3.11.0 {#v3.11.0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
|
|
||||||
- SetSprite: changes the image on the SpriteRenderer of one or more GameObjects |
|
||||||
- SetUIImage: changes the image on the Image of one or more GameObjects (Joerg Burbach) |
|
||||||
- Commands to store FungusVariable.ToString into a StringVariable and to parse a string into an Int or Float FungusVariable |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- #729 VariableEditor popup name and key concat no longer has spaces, allows the PopUp to correctly nest items with the same parent |
|
||||||
- #732 BlockInspector correct top panel height in 2018_3 BlockEditor only force unique name if it has changed |
|
||||||
- BlockInspector and BlockEditor changes to display correctly in 2019.1.0a13 |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- #728 FlowchartWindow performance for 100s of blocks |
|
||||||
- #727 Support use of TMPro in Set Text, Get Text and Narrative Log Menu commands |
|
||||||
- #733 Command can now cache a list of referenced variables that are checked by the variablelistadapter for highlighting |
|
||||||
- Flowchart can identify add variables found via the substitute regex |
|
||||||
- Commands that use SubstituteVariables on their string data use the new caching method so they can highlight variables that will be used during substitution |
|
||||||
- #733 HasReference added to many commands that lacked them or had only partially checked vars |
|
||||||
|
|
||||||
v3.10.0 {#v3_10_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
- #725 Added Stop Then Call mode in Call command. Stops the calling Block immediately, instead of waiting a frame. |
|
||||||
- #718 Say and Menu dialogs now support TextMeshPro directly |
|
||||||
- TextMeshPro demo scene - A default say dialog but with TextMeshPro Text UI elements in place of uGUI Text |
|
||||||
- A default menu dialog but with TextMeshPro Text UI elements in place of uGUI Text |
|
||||||
- TextAdapter can be asked to include children in text output search MenuDialogue now uses TextAdapter rather than assuming UI.Text |
|
||||||
- #720 Variable reference allows for selecting a flowchart a targeting a specific fungus variable for use from c# |
|
||||||
- #705 Added FirstPersonDemo examples |
|
||||||
- New audio commands: Play Ambience Sound, Stop Ambience Sound, Play Random sound. |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- #717 Control Audio > Play Loop volume is always 1 |
|
||||||
- #723 Unity 2018.3 Warnings |
|
||||||
- #711 Beeps in WriterAudio ignores last sound in array |
|
||||||
- PLay Sound Effect volume is now independent of Set Music Volume setting |
|
||||||
- Correct width calc on smaller width inspectors |
|
||||||
- #708 Specifically identify choice blocks as hexagons in documentation |
|
||||||
|
|
||||||
## Changed |
|
||||||
- #721 Conversation text can now contain colons within the text body itself |
|
||||||
- #719 Change FlowchartMenuItem.SpawnPrefab to GameObject.Inst rather than PrefabUtil to avoid exception modifications.empty |
|
||||||
- #709 Command searchable pop up |
|
||||||
- Added Fungus Preferences setting to enable Searchable PopupMenus |
|
||||||
- #694 Adding Random Sound Command and Ambiance Sounds - thanks to Hector Castelli |
|
||||||
- #704 Replaced Rotorz Reorderable List with Unity's InternalReorderable list |
|
||||||
- ExceuteOnEvent dropdown is searchable -can double click to circumvent the search drop down -can remove event by setting None -use search similar to add command method |
|
||||||
|
|
||||||
Changelog {#changelog} |
|
||||||
========= |
|
||||||
[TOC] |
|
||||||
|
|
||||||
v3.9.1 {#v3_9_1} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
- Text Variation Handler: Adds Ink-style text variation in Say, Menu and Conversation commands. #695 |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Fixed Reorderable List control errors in 2018.2. Compatible with 2017.4, 2018.1 2018.2 #697 |
|
||||||
|
|
||||||
v3.9.0 {#v3_9_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
- Conversation command supports setting default clear, wait for input and fade options #673 |
|
||||||
- Added Fungus Priority Signals #671 #670 |
|
||||||
- allows fungus to notify the outside world that it is doing something of priority so the outside world can pause |
|
||||||
- Added GetKey fungus command. #683 |
|
||||||
- Supports positive and negative keybindings output to a bool, float or int variable |
|
||||||
- Supports checking for pressed, release and current state |
|
||||||
- Uses keycode with optional fallback to key name |
|
||||||
- Disabled Flowcharts and EventHandlers. #682 |
|
||||||
- Added Dialog history on Save Menu UI #675 |
|
||||||
- Added BlockReference, a simple data type with a property drawer that makes it easier to select a target fungus block from external c# scripts. #669 |
|
||||||
- Added comparison (equals and not equals) as well as assign functionality to most variable types. #668 |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Updated to Unity 2018.1 #681 |
|
||||||
- Conversation Manager Regex now allows - and _ within say params group. #692 |
|
||||||
- Conversation example scene makes some basic use of new Conversation features |
|
||||||
- Update LeanTween to 2.46 #689 |
|
||||||
- PortraitController forces alpha and color tweens to be non recursive. |
|
||||||
- Updated playground demos |
|
||||||
- Football uses GetKey instead of GetAxis (get axis was failing in some packages as inputmanager axis were not imported) |
|
||||||
- Defender had a bug due to a change in how unity syncs 'up' between transform and rb2d |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- ElseIfs now confirm that the previous condition was at the same indent as themselves. #693 |
|
||||||
- NarrativeLog is tolerant of null Name or Story fields #690 |
|
||||||
- Force the hierarchy icon list to refresh when a script a is loaded/changed #672 |
|
||||||
- Eventhandlers no longer fire when the flowchart is disabled #682 |
|
||||||
- StopFlowchart can continue now #685 |
|
||||||
- Fixed stray \\ that were not being stripped on Mac OS, when importing editor resources. #686 |
|
||||||
|
|
||||||
v3.8.0 {#v3_8_0} |
|
||||||
====== |
|
||||||
|
|
||||||
Many thanks to contributors stevehalliwell, FrederickKDP, MeMark2, KVinS, charblar, FatPuzo for their work on this release! |
|
||||||
|
|
||||||
## Added |
|
||||||
- Added Flowchart.HasBlock() and ExecuteIfHasBlock() methods |
|
||||||
- Added Global Variable support. Variables have new 'Global' variable scope. |
|
||||||
- Added GlobalVar demo scene |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Updated project version to Unity 2017.4.0f1 |
|
||||||
- Refactored the set variable system to make it easier to add variable comparison options |
|
||||||
- Added comparison and setting of GameObjects variables |
|
||||||
- Updated Batch for newer versions of Unity3D web player #650 |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Fixed compile errors in Unity 2018.1 beta |
|
||||||
- Fixed compiler warnings in Untity2017.3 |
|
||||||
- Fixed repeat play of music #659 |
|
||||||
- Fixed conflicting EditorResource folder issue #664 |
|
||||||
- Fixed SaveMenu DontDestroyOnLoad problems #661 |
|
||||||
- Fixed docs: the block name in 6 of "Connections between Blocks" section from "Block2" to "Start" #663 |
|
||||||
- Fixed lua say() function to match new say method parameters |
|
||||||
|
|
||||||
v3.7.0 {#v3_7_0} |
|
||||||
====== |
|
||||||
|
|
||||||
Many thanks to maintainer Steve Halliwell for all the amazing new functionality in this release! |
|
||||||
|
|
||||||
## Added |
|
||||||
- Added Playground examples showing 3 simple arcade games made using Fungus |
|
||||||
- Added Rigidbody2D variable type |
|
||||||
- Added Vector3 FungusCommands - Fields, Normalise, Convert to Vector2, Arithetic |
|
||||||
- Added TransformProperty FungusCommand. Get and Set a transform's fields and properties. Does not currently support rotation, localRotation nor the Mat4x4 commands as we do not have the appropriate FungusVariables to store them in |
|
||||||
- Added FungusCommand to Reload Current Scene |
|
||||||
- Added Rigidbody2D FungusCommands - AddForce, AddTorque, StopMotion |
|
||||||
- Added Input GetAxis fungusCommand, fetch Input.GetAxis and store in a FloatData |
|
||||||
- SpawnObject FungusCommand can now store the gameobject it instantiates and can spawn at itself |
|
||||||
- Destroy FungusCommand can now be told to pass down a delay to Destroy |
|
||||||
- Added Fungus Commands for most of MathF |
|
||||||
- Added Math demo scene |
|
||||||
- Added Mouse fungus event demo scene |
|
||||||
- Added Monobehaviour fungus event handlers and physics demo scene |
|
||||||
- Added LeanTween commands and demo scene that approximates the old iTween demo |
|
||||||
- Added SpeakingCharacter property to SayDialog |
|
||||||
- Added Fungus panel in editor preferences |
|
||||||
- Added option to toggle off the fungus icon in the hierarchy in case it conflicts with other tools or is just undesired |
|
||||||
- Added TextTag WVO WaitForVoiceOver #572 |
|
||||||
- Added ability to show variable list in the Flowchart Inspector #643 |
|
||||||
- OpenURL FungusCommand renamed, fixes #554 #642 |
|
||||||
|
|
||||||
## Changed |
|
||||||
- SaveManager now uses json files in a FungusSaves sub directory for all platforms but webplayer & webgl which still use playerprefs |
|
||||||
- GetCommandInfo returns the highest priority CommandInfo to better support multiple names while maintaining what is shown in the inspector |
|
||||||
- Allow multiple CommandInfos to be added to a class SpawnObject can now also be found under GameObject/Instantiate |
|
||||||
- Changed Fungus icon loading to use FungusEditorResources |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Fixed typo in BlockEditor.BlockField() #633 |
|
||||||
- Fixed custom editor for ElseIf command #630 |
|
||||||
- Fixed Prefab Variable Dereferencing #618 |
|
||||||
- Fixed typo in Set Interactable description #647 |
|
||||||
- Fixed choice dialogues were not set to stay during the MenuDialogue #640 |
|
||||||
- Fixed camera fading and panning at the same time (thanks to iBicha!) #624 |
|
||||||
- Fixed warnings on Unity 2017.2 |
|
||||||
|
|
||||||
v3.6.0 {#v3_6_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
- Support use of \n newline character in Say and Conversation text |
|
||||||
- Added Fungus-Playmaker integration package in Fungus/Integrations/PlayMaker #602 - thanks Nilihum |
|
||||||
- Added Delete Save Data button to Save Menu inspector. |
|
||||||
- Variable substitution works in Set Variable (String) command |
|
||||||
- New "BlockNameAndCustom" Keymode for Save Point command, use both block name and custom key together. #597 - thanks Trieger |
|
||||||
- Added portrait DimColor #601 - thanks MorningFunGame |
|
||||||
- Lua If and Lua Else If commands #609 - thanks PillowFightIo |
|
||||||
- Stop a named Block in a Flowchart |
|
||||||
- Added utility to convert all files to Mac line endings |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Made all methods virtual in SayDialog.cs #607 thanks PillowFightIo |
|
||||||
- Updated project to Unity 5.6.1, fixed some warnings. |
|
||||||
- Use transform.Find instead of deprecated transform.FindChild |
|
||||||
- Replaced some uses of slow GameObject.FindObjectOfType() and FindDerivedTypes() |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Fixed Write command "Clear Text" option not working #594 |
|
||||||
- Fixed portrait hide bug in conversation #590 - thanks to lealeelu |
|
||||||
- Fixed stopping audio in conversation #592 - thanks to lealeelu |
|
||||||
- Fixed can't use FungusLua separately to rest of Fungus #596 |
|
||||||
- Fixed can't inspect disabled Flowchart #598 |
|
||||||
- Fixed Cmd+Left Click doesn't register as right click on OSX #595 |
|
||||||
- Fixed luautils won't work on FungusLua standalone #604 |
|
||||||
- Fixed Save Menu: clicking to left of collapsed menu clicks hidden buttons #615 |
|
||||||
- Fixed Localization only localizes character name, not story text #611, #614 |
|
||||||
|
|
||||||
v3.5.1 {#v3_5_1} |
|
||||||
====== |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Added Save Data Key property to Save Menu to support multiple games in the same Unity project. |
|
||||||
|
|
||||||
v3.5.0 {#v3_5_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
- Save game system. Use Save Point command and Save Menu prefab to easily add saving support with rewind / fast forward support. |
|
||||||
- Added new menu options for spawning SaveMenu and SavedObjects prefabs |
|
||||||
- New Save Game example scene |
|
||||||
- Added documentation for Save System. |
|
||||||
- Option to Close Other Say Dialogs when one Say Dialog becomes active. |
|
||||||
- Select a start Label in Call command properties |
|
||||||
|
|
||||||
Thanks to contributor [zvinless](https://github.com/zvinless): |
|
||||||
- Custom block tints can now be toggled per block in the block inspector. |
|
||||||
- Added multi-select feature for blocks via action key/shift+click and click+drag |
|
||||||
- Block movement and context menu options now affect all selected blocks |
|
||||||
- Added Flowchart window toolbar in place of floating UI |
|
||||||
- Flowchart window search filter to quickly find Blocks |
|
||||||
- Added keyboard shortcuts and more context menu options for Blocks (copy, cut, duplicate, delete, select all) |
|
||||||
|
|
||||||
Thanks to contributor [sp-francisco-ruiz](https://github.com/sp-francisco-ruiz): |
|
||||||
- Add a new Event Dispatcher to the FungusManager singleton |
|
||||||
- Change Draggable2D and Clickable2D to use the new EventDispatcher for efficient calls for events. |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Moved Center button from Flowchart properties to new Flowchart window toolbar |
|
||||||
- Flowchart’s SelectedBlock property now refers to the active selected block rather than the sole selected block. |
|
||||||
- Updated coding standard with backwards compatibility & contributing notes |
|
||||||
- Flowchart window now zoom in/out by mouse cursor or center rather than upper left corner |
|
||||||
- All editor textures are now be accessible as properties in FungusEditorResources. |
|
||||||
- Use Tools -> Fungus -> Utilities -> UpdateEditorResourcesScript to automatically update these editor textures |
|
||||||
- Increased height of multi-line text box for StringDataMulti |
|
||||||
- Updated curves, connection points, and grid background rendering with better approach |
|
||||||
- Refactored Flowchart window to simplify event handling |
|
||||||
- Bumped flowchart version to 2 to upgrade previously serialized selected blocks |
|
||||||
- Flowchart context menu now appears on mouse up to better support panning |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Fixed nested while loops don't loop correctly #562 |
|
||||||
- Fixed Sprite Object click skips writing Say Text #576 |
|
||||||
- Fixed setmenudialog() lua function does not set main active menu dialog #578 |
|
||||||
- Fixed Unity Test Tools compatibility issue with Unity 5.5.0f |
|
||||||
- Fixed spine integration to work with latest version of Spine runtime |
|
||||||
- Fixed Block connections not highlighting when command selected |
|
||||||
- Fixed centered text shifts position when written by Say command #569 |
|
||||||
- Fixed Say text appears for single frame when using Say command #575 |
|
||||||
- Fixed MenuDialog Lua Bug #565 |
|
||||||
- Fixed using say in lua doesn't automatically spawn an EventSystem #571 |
|
||||||
- Fixed cannot divide an integer by an integer using Set Variable #579 |
|
||||||
- Fixed tabs in conversation text from Lua #574 |
|
||||||
- Fixed Flowchart prefab's block show as empty on the Inspector #583 |
|
||||||
- Fixed typo in Game Started Wait Frames property name |
|
||||||
- Fixed Fungus ignores existing “SayDialog” and creates another one #555 |
|
||||||
- Change CSVParser to use Regex.Split (way faster for large CSV files) |
|
||||||
- Fixed missing sprite assets in Asset Store version. |
|
||||||
- Fixed onComplete callback in MusicManager.SetAudioVolume when duration is 0 |
|
||||||
- Removed TestRunner game objects from DragAndDrop examples. |
|
||||||
|
|
||||||
v3.4.0 {#v3_4_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Known Issues |
|
||||||
- FungusLua generates runtime errors running Lua when using .NET scripting backend. The IL2CPP backend works fine. |
|
||||||
|
|
||||||
## Added |
|
||||||
- Added accessors for GameObject and Transform variables in Flowchart.cs |
|
||||||
- Added Flowchart.HasVariable() and GetVariableNames() - thanks murnyipl! |
|
||||||
- Added WaitForFrames property to GameStarted event handler. Default is wait for 1 frame (should reduce startup order issues). |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Upgraded to Moonsharp 2.0. Moonsharp source code is now included in Fungus/Thirdparty/MoonSharp |
|
||||||
- Removed MoonSharp assembly from link.xml |
|
||||||
- Converted MoonSharp line endings to OSX for consistency with rest of project. |
|
||||||
- Updated documentation for Lua debugger (using VS Code) |
|
||||||
- Removed LuaEnvironment Remote Debugger option. A VS Code debug server always starts when running in the editor. |
|
||||||
- SayDialog now supports full variable substitution when setting character names. |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Fixed Command properties not copied when copying commands #546 |
|
||||||
- Fixed PODTypeFactory and FungusPrefs classes are not registered #549 |
|
||||||
- Fixed for compile errors on .NET Core scripting backend |
|
||||||
- Fixed LuaBindings registered types in example scenes |
|
||||||
- Fixed MoonSharp warning when not building for an AOT platform |
|
||||||
- Fixed minor issues in some example scenes (e.g. missing sprite refs) |
|
||||||
|
|
||||||
v3.3.0 {#v3_3_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Known Issues |
|
||||||
- FungusLua does not work in WebGL builds due to issues in MoonSharp 1.8.0.0 |
|
||||||
- Forum thread: http://fungusgames.com/forum/#!/general:fungus-lua-and-web-gl-uni |
|
||||||
- FungusLua does not compile for Windows Store platform using .net scripting backend. Use the IL2CPP backend instead. |
|
||||||
|
|
||||||
## Added |
|
||||||
- Added test for StopTweens does not stop a Tween with loop enabled #529 |
|
||||||
- Added signals (pub-sub system) for Writer and Block events #539 |
|
||||||
- All interfaces now have their own source files. |
|
||||||
- Added monodevelop project for editing docs files. |
|
||||||
- Added Flip option (<<< and >>>) to conversation system #527 |
|
||||||
- Added WaitFrames command to wait for a number of frames |
|
||||||
- Added GetToggleState, SetToggleState commands and ToggleChanged event handler |
|
||||||
- Added Writer.Paused property to pause a writer from code. |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Tidied up Fungus folder structure to organize scripts more logically |
|
||||||
- Migrated documentation to use Doxygen for help and API docs |
|
||||||
- Lots of misc improvements to documentation |
|
||||||
- Updated to MoonSharp 1.8.0.0 |
|
||||||
- Documented using string facing parameter in stage.show() Lua function. |
|
||||||
- Documented <<< and >>> tags for conversation system. |
|
||||||
- Documented all public members for API docs. |
|
||||||
- All serialized fields are now protected, exposed via public properties as needed. |
|
||||||
- Moved all enums to namespace scope. |
|
||||||
- Moved global constants to FungusConstants static class. |
|
||||||
- Moved editor resources to the main resources folder |
|
||||||
- Fungus editor code moved to Fungus.EditorUtils namespace |
|
||||||
- Convert singletons to use a single FungusManager singleton #540 |
|
||||||
- Renamed CameraController to CameraManager and MusicController to MusicManager |
|
||||||
- Changed float constant comparisons to use Mathf.Approximately |
|
||||||
- Added #region Public members to all non-editor classes |
|
||||||
- StringFormatter, TextTagParser and FungusPrefs classes are now static |
|
||||||
- Merged MenuDialog extension methods (used for Lua) with main MenuDialog class. |
|
||||||
- Change all public methods to use virtual |
|
||||||
- Removed all unnecessary using statements. |
|
||||||
- All class and member comments use standard c# xml comment style |
|
||||||
- Replaced foreach loops with for loops (avoids allocation for iterator) |
|
||||||
- Added changelog to Doxygen documentation |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Fixed Setting facing in lua only works if portraits are set to “FRONT” #528 |
|
||||||
- Fixed Say command completes instantly after menu choice #533 |
|
||||||
- Fixed broken mouse pointer in WebGL build of Drag and Drop |
|
||||||
- Fixed ObjectField nulls reference if object is disabled #536 |
|
||||||
- Updated Unity Test Tools to v1.5.9 |
|
||||||
- Fixed missing Process class error in Unity5.5b3 |
|
||||||
- Fixed Spine.Unity namespace problem in integration scripts |
|
||||||
- Fix Regex for character names with "." & "'" #531 (thanks to Sercan Altun) |
|
||||||
Old Regex expression did not capture Character names with "." and "'". As a result characters with names like "Mr. Jones" or "Ab'ar" were not registering correctly. |
|
||||||
- Fixed Lua setlanguage() function |
|
||||||
- Fixed namespace issue in Spine integration. |
|
||||||
- Fixes all integration tests to pass when run on Windows Standalone. |
|
||||||
- Fixed Block inspector displayed for inactive flowchart #544 |
|
||||||
|
|
||||||
v3.2.0 {#v3_2_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Known Issues |
|
||||||
- FungusLua does not work in WebGL builds due to issues in MoonSharp 1.6.0.0 |
|
||||||
Forum thread: http://fungusgames.com/forum/#!/general:fungus-lua-and-web-gl-uni |
|
||||||
|
|
||||||
## Added |
|
||||||
- Added choose() and choosetimer() Lua functions for displaying list of menu options. |
|
||||||
- Added Conversation command and Lua function to perform long dialogue exchanges in a single command. |
|
||||||
- Added new Conversation examples |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Clickable2D and Dragable2D components can now use legacy input or EventSystem events / raycasts. |
|
||||||
- Added DragAndDrop(EventSystem) example scene to show how to use the EventSystem option. |
|
||||||
- Made it easier to resize the default SayDialog |
|
||||||
- Updated Narrative examples to use the easier choose() function instead of menu() |
|
||||||
- Force MenuDialog to become active when using AddOption from Lua. |
|
||||||
- Converted tabs to spaces in all source files |
|
||||||
- Ensure the character cache is populated before accessing it |
|
||||||
- Added Serializable attribute to all variable classes. |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Added link.xml file to fix FungusLua not running on iOS builds |
|
||||||
- Portrait hide bug in Conversation Function #526 |
|
||||||
- Unresponsive SayDialog after ClearMenu or *.StopAllBlocks(); #518 |
|
||||||
- Can't select a Public variable from another flowchart #522 |
|
||||||
- NullReferenceException with nameText in SayDialog #517 |
|
||||||
- StackOverflowException in Writer with customized text object #516 |
|
||||||
- stage.Show() not fading in a previously faded out character if portrait hasn't changed. |
|
||||||
- Missing .Value on _parameterName property. |
|
||||||
- Fixed missing component warnings |
|
||||||
- Updated MoonSharp to v1.6.0.0 (this time without changing the meta files). |
|
||||||
|
|
||||||
v3.1.0 {#v3_1_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
|
|
||||||
- Flowchart automatically registers with LuaEnvironment for ExecuteLua commands #485 |
|
||||||
- Clickable2D and Draggable2D can now use EventSystem events to block clicks on UI elements. Added new drag and drop demo scene to illustrate. |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Default dialog image is now sliced, so can be resized to any width / height required. |
|
||||||
- Upgraded MoonSharp to v1.6.0.0 |
|
||||||
- Added [System.Serializable] attribute to all Variable classes. |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Default dialog box now fits in a 5:4 ratio display #515 |
|
||||||
- Dialog input causing an exception if no Event System is present in scene. |
|
||||||
- Missing module variable on round() function |
|
||||||
- Menu() Lua function only works once #511 |
|
||||||
- Compile error for folks upgrading using the Fungus 3 unitypackage |
|
||||||
|
|
||||||
v3.0.0 {#v3_0_0} |
|
||||||
====== |
|
||||||
|
|
||||||
Major release with powerful new Lua scripting support and many small improvements and fixes. |
|
||||||
This release should be backwards compatible with projects created using Fungus 2. If you have any upgrading issues let us know on the forum. |
|
||||||
|
|
||||||
Many thanks to the amazing Fungus community for all the suggestions, bug reports and encouragement! |
|
||||||
|
|
||||||
Awesome github contributors: |
|
||||||
- Leah Lee: https://github.com/lealeelu |
|
||||||
- Gerardo Marset: https://github.com/ideka |
|
||||||
- Konrad Gadzina: https://github.com/FeniXb3 |
|
||||||
- Kal O' Brien: https://github.com/kalenobrien15 |
|
||||||
- Hawmalt: https://github.com/hawmalt |
|
||||||
|
|
||||||
## Added |
|
||||||
- FungusLua: Lua scripting support for Fungus via wrapper components for using MoonSharp in Unity. #281, #317, #334, #237, #235, #232, #224 |
|
||||||
- LuaEnvironment component: Execution environment for running Lua scripts. |
|
||||||
- LuaUtils component: Extends LuaEnvironment with lots of useful features. |
|
||||||
- LuaBindings: Maps Unity objects & components to Lua variables for use in Lua scripts. |
|
||||||
- LuaScript: Runs Lua code from a text file or from a string property. |
|
||||||
- LuaStore: Stores variables in a global table which persists across scene loads. |
|
||||||
- FungusModule: A set of utility functions for scripting Unity and Fungus from Lua. |
|
||||||
- FungusPrefs: An improved version of PlayerPrefs that can be easily used from Lua. |
|
||||||
- ExecuteHandler: Listens for any standard Unity event and calls a method on a component in the gameobject. #247 |
|
||||||
- ExecuteLua command: Run some Lua script in a Fungus command. Return values can be stored in Fungus variables. |
|
||||||
- PODTypeFactory: Utility factory class for instantiating Plain-Old-Data (POD) types like Color, Vector3, etc. |
|
||||||
- Lots of FungusLua example scenes |
|
||||||
- Fungus documentation now has an extensive section on LuaScripting. |
|
||||||
- StringDataMulti: Like StringData, but uses a multi-line textbox in the inspector. |
|
||||||
- StopBlock command: Stop executing the named block. |
|
||||||
- Improved string substitution system. Now works with Lua global variables and Lua string table, as well as Flowchart variables. |
|
||||||
- Extend the string substitution system yourself using the new ISubstitutionHandler interface. |
|
||||||
- Added TaskManager library to Thirdparty folder. Allows better control over coroutine execution. |
|
||||||
- Show Line Numbers option in Flowchart. Shows the command index in the inspector (off by default). #231 |
|
||||||
- Play Animation State command. Plays an animation state directly without a transition. #378 |
|
||||||
- Open URL command #382 |
|
||||||
- Links to community articles in the help docs #385 |
|
||||||
- InfoText.cs component for displaying help information in the top-left of screen |
|
||||||
- "Play from Selected" and "Stop All and Play" context menu options in Block command list |
|
||||||
- Added Command Index property to Call command |
|
||||||
- LuaStore example scene to demonstrate persisting Lua variables between scene loads |
|
||||||
- Use stage.show(), stage.showPortrait & stage.hide() to control stage & portraits from Lua #490 |
|
||||||
See FungusExamples/FungusLua/Narrative/PortraitController.unity example scene |
|
||||||
- Portrait functionality moved to new PortraitController utility class for easier scripting. |
|
||||||
- Say and Menu Dialogs now support standard input manager (joystick / controller support) #507 #210 |
|
||||||
- Menu options can now be picked with keyboard only |
|
||||||
- Fast forward using Shift in Say Dialogs is now done using the Cancel input (Escape key by default). |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Draggable sprite anchors at exact point user clicked. |
|
||||||
- Replaced string with StringData, int with IntegerData, etc. in many command properties. Use variables or constants. |
|
||||||
- Block.Execute renamed to Block.StartExecute, can now specify a command index to start at. |
|
||||||
- Say command: Set the Character using an object field or the dropdown menu. Can now select Character prefabs. |
|
||||||
- Improved Flowchart UpdateVersion system |
|
||||||
- Portrait image is now hidden at startup in SayDialog |
|
||||||
- Use DialogAudio volume property for starting volume on voiceover audio |
|
||||||
- WriterAudio now respects the volume property in all cases |
|
||||||
- Added short open source license info header to all source files |
|
||||||
- SetAudioVolume.waitUntilFinished property #495 |
|
||||||
- String substitution uses StringBuilder to avoid string allocations (reduce garbage collection) #490 |
|
||||||
- Embed string substitution keys in substitution text (recursive substitution up to 5 levels) #488 |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- SetDraggable2D filename now matches class name. |
|
||||||
- Unity 5.4 beta errors & warnings |
|
||||||
- CsvParser.cs and InvokeMethod lineendings should be consistent with rest of project. |
|
||||||
- Faulty indent levels when inspector is not displayed #380 |
|
||||||
- Hide Portrait before Show Portrait breaks portrait system #384 |
|
||||||
- Private variable values being reset with multiple flowcharts #389 |
|
||||||
- Stage objects blocking raycasts #391 |
|
||||||
- Writer voiceover clip always stops when text stops #393 |
|
||||||
- Size tag in UI text is not supported #400 |
|
||||||
- Clickable sprites can be clicked through UI objects #377 |
|
||||||
- Don't destroy sprite objects in Scene Loader #386 |
|
||||||
- Add links to community articles in the help docs #385 |
|
||||||
- Control volume bug #464 |
|
||||||
- Unity Test Tools compile errors in Unity 5.0 |
|
||||||
- Edge of inspector window clipped incorreclty in Unity 5.4 beta #425 |
|
||||||
- Child Object gets deleted when having a flowchart on parent and child. #475 |
|
||||||
- Fixed command summary incorrect for Fade UI command #486 |
|
||||||
- No Music clip selected error summary in Play Sound command |
|
||||||
- Jump command properties incorrect when block duplicated #504 |
|
||||||
- menu() Lua command interactable param has no effect #493 |
|
||||||
- Set Anim Integer/Float/Bool lose property settings #492 |
|
||||||
- Can't select ExecuteBlock from Unity Event #496 |
|
||||||
- Fixed aliased commandIndex property in Call command. |
|
||||||
|
|
||||||
## Other closed issues |
|
||||||
- GameObjects get duplicated when flowchart is on a different scene #373 |
|
||||||
- TextMesh Pro integration #214 |
|
||||||
- Clickable3D component #195 |
|
||||||
|
|
||||||
v2.4.0 {#v2_4_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
- FungusLua: Lua scripting support for Fungus via wrapper components for using MoonSharp in Unity. #281, #317, #334, #237, #235, #232, #224 |
|
||||||
- LuaEnvironment component: Execution environment for running Lua scripts. |
|
||||||
- LuaUtils component: Extends LuaEnvironment with lots of useful features. |
|
||||||
- LuaBindings: Maps Unity objects & components to Lua variables for use in Lua scripts. |
|
||||||
- LuaScript: Runs Lua code from a text file or from a string property. |
|
||||||
- LuaStore: Stores variables in a global table which persists across scene loads. |
|
||||||
- FungusModule: A set of utility functions for scripting Unity and Fungus from Lua. |
|
||||||
- FungusPrefs: An improved version of PlayerPrefs that can be easily used from Lua. |
|
||||||
- ExecuteHandler: Listens for any standard Unity event and calls a method on a component in the gameobject. #247 |
|
||||||
- ExecuteLua command: Run some Lua script in a Fungus command. Return values can be stored in Fungus variables. |
|
||||||
- PODTypeFactory: Utility factory class for instantiating Plain-Old-Data (POD) types like Color, Vector3, etc. |
|
||||||
- Lots of FungusLua example scenes |
|
||||||
- Fungus documentation now has an extensive section on LuaScripting. |
|
||||||
- StringDataMulti: Like StringData, but uses a multi-line textbox in the inspector. |
|
||||||
- StopBlock command: Stop executing the named block. |
|
||||||
- Improved string substitution system. Now works with Lua global variables and Lua string table. |
|
||||||
- Extend the string substitution system yourself using the new ISubstitutionHandler interface. |
|
||||||
- Added TaskManager library to Thirdparty folder. Allows better control over coroutine execution. |
|
||||||
- Show Line Numbers option in Flowchart. Shows the command index in the inspector (off by default). #231 |
|
||||||
- Play Animation State command. Plays an animation state directly without a transition. #378 |
|
||||||
- Open URL command #382 |
|
||||||
- Links to community articles in the help docs #385 |
|
||||||
- InfoText.cs component for displaying help information in the top-left of screen |
|
||||||
- "Play from Selected" and "Stop All and Play" context menu options in Block command list |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Draggable sprite anchors at exact point user clicked. |
|
||||||
- Replaced string with StringData, int with IntegerData, etc. in many command properties. |
|
||||||
- Bock.Execute renamed to Block.StartExecute, can now specify a command index to start at. |
|
||||||
- Say command: Set the Character using an object field or the dropdown menu. Can now select Character prefabs. |
|
||||||
- Improved Flowchart UpdateVersion system |
|
||||||
- Portrait image is now hidden at startup in SayDialog |
|
||||||
- Use DialogAudio volume property for starting volume on voiceover audio |
|
||||||
- WriterAudio now respects the volume property in all cases |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- SetDraggable2D filename now matches class name. |
|
||||||
- Unity 5.4 beta errors & warnings |
|
||||||
- CsvParser.cs and InvokeMethod lineendings should be consistent with rest of project. |
|
||||||
- Faulty indent levels when inspector is not displayed #380 |
|
||||||
- Hide Portrait before Show Portrait breaks portrait system #384 |
|
||||||
- Private variable values being reset with multiple flowcharts #389 |
|
||||||
- Stage objects blocking raycasts #391 |
|
||||||
- Writer voiceover clip always stops when text stops #393 |
|
||||||
- Size tag in UI text is not supported #400 |
|
||||||
- Clickable sprites can be clicked through UI objects #377 |
|
||||||
- Don't destroy sprite objects in Scene Loader #386 |
|
||||||
- Add links to community articles in the help docs #385 |
|
||||||
- Control volume bug #464 |
|
||||||
- Unity Test Tools compile errors in Unity 5.0 |
|
||||||
- Edge of inspector window clipped incorreclty in Unity 5.4 beta #425 |
|
||||||
|
|
||||||
## Other closed issues |
|
||||||
- GameObjects get duplicated when flowchart is on a different scene #373 |
|
||||||
- TextMesh Pro integration #214 |
|
||||||
- Clickable3D component #195 |
|
||||||
|
|
||||||
v2.3.1 {#v2_3_1} |
|
||||||
====== |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Can't click on Say Dialog when a Menu Dialog is active #374 |
|
||||||
- Set Audio Pitch: OnComplete not called when duration = 0 #369 |
|
||||||
- Fade To View can sometimes not work in Unity 5.3 #370 |
|
||||||
|
|
||||||
v2.3.0 {#v2_3_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
- SetDraggable2D command #191 |
|
||||||
- WaitInput command #276 |
|
||||||
- Fade UI command to fade UI objects #349 |
|
||||||
- Read Text File command to read a text file into a string variable #344 |
|
||||||
- Added Set Audio Pitch command #340 |
|
||||||
- 'Center View' button to center Flowchart window on all Blocks #302 |
|
||||||
- Added Clear Menu command #300 |
|
||||||
- Set Slider Value command #297 |
|
||||||
- Stop Flowchart command #289 |
|
||||||
- Integration with Esoteric Spine animation system (available in Fungus/Integrations/Spine folder) |
|
||||||
|
|
||||||
## Changed |
|
||||||
- Added null checks in Flowchart variable accessors |
|
||||||
- Set Say Dialog property for characters |
|
||||||
- Can now specify the gameobject to shake for punch tag in Writer component |
|
||||||
- PlayMusic command has a loop property |
|
||||||
- Updated reorderable list control to v0.4.3 |
|
||||||
- Updated to LeanTween 2.30 |
|
||||||
- Added HasExecutingBlocks() and GetExecutingBlocks() to Flowchart class |
|
||||||
- Remove unused Text Width Scale property on Say Dialog |
|
||||||
- Can now specify a camera to use with Camera command (not just main) #319 #307 |
|
||||||
- Can now disable Camera Z being forced by View commands #319 |
|
||||||
- Text tags now support multiple parameters. |
|
||||||
- Write command now works with Text Mesh Pro text objects. |
|
||||||
- Writer.InstantComplete property controls click-to-complete writing. |
|
||||||
- Shake tag shakes camera instead of Writer game object. |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Ensure parentBlock is set when block executes #320 |
|
||||||
- While loop with following If doesn't loop correctly #354 |
|
||||||
- Auto cross fade music in Play Music command #199 |
|
||||||
- Play Music call doesn't restart if same music already playing |
|
||||||
- Play Music call doesn't restart if same music already playing |
|
||||||
- Concurrent Say commands on same Say Dialog should interrupt #356 |
|
||||||
- CustomGUI class not in Fungus namespace #353 |
|
||||||
- Whitespace trimming after {wc} & {c} tags #346 |
|
||||||
- iTween commands on the same gameobject can conflict #342 #303 |
|
||||||
- Show Sprite should affect child sprites #338 |
|
||||||
- Null reference if command classes have same name #312 |
|
||||||
- End command indents when not matched with an If #308 |
|
||||||
- Draggable objects behaving incorrectly #310 |
|
||||||
- Inactive localizeable game objects are now also cached #322 |
|
||||||
- SceneManager warnings in Unity 5.3 |
|
||||||
- Fixed Windows store build 268 |
|
||||||
- Fixed Writer beep timing issues in WebGL #295 |
|
||||||
- Removed say command from Flowchart prefab |
|
||||||
|
|
||||||
v2.2.2 {#v2_2_2} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
|
|
||||||
- Stop Flowchart command and Flowchart.StopAllBlocks() method #288 |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Only the first Flowchart added to a scene will have a default GameStarted event handler. |
|
||||||
- Null items in variable list are cleaned up on enable. |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Flowchart objects break when made into a prefab #275 |
|
||||||
- Localization language does not persist between scenes #271 |
|
||||||
- Voiceover clips not playing correctly in Say command #273 |
|
||||||
- Changing portrait facing flips incorrectly #190 |
|
||||||
- Variable substitution in Menu command #263 |
|
||||||
- Null variable reference when substituting variables #278 |
|
||||||
- Removed empty gameobject in sherlock demo |
|
||||||
- Removed unused GameStarted component from built-in Flowchart prefab |
|
||||||
|
|
||||||
v2.2.1 {#v2_2_1} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
|
|
||||||
- Set Interactable command to control UI button, input field, etc. interactivity #178 |
|
||||||
- Button Clicked event handler to execute a block when a UI button is clicked |
|
||||||
- End Edit event handler to execute a block when user presses enter in an input field |
|
||||||
- Hide specific commands & categories in the Add Command menu by setting the Hide Commands property on Flowchart |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Improved Enter Name example to demonstrate the new Write, Get Text, Set Text, Set Interactable, etc. commands. |
|
||||||
- Removed punctuation pause for last character in a sentence #168 |
|
||||||
- Removed unsupported 'shiver' item from tag help description in Say and Write commands |
|
||||||
- Moved LICENSE and README inside the Fungus folder #185 |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Concurrent Say calls cause Say Dialog to freeze up #156 |
|
||||||
- Null reference error after editing Flowchart code #181 |
|
||||||
- Markup text visible if rich text not enabled when using Write command #176 |
|
||||||
- ControlAudio waitUntilFinished property doesn't wait for correct time #174 |
|
||||||
- Removed legacy hidden objects in example scenes #159 |
|
||||||
- Undo for delete command doesn't work #161 |
|
||||||
- Flowchart in The Hunter example has Hide Components set to false #150 |
|
||||||
|
|
||||||
v2.2.0 {#v2_2_0} |
|
||||||
====== |
|
||||||
|
|
||||||
## Added |
|
||||||
|
|
||||||
- Write command for writing text to any text object |
|
||||||
- Writer, Writer Audio components for writing text to any text object with lots of new configuration options. |
|
||||||
- Say Dialog class has been split into Say Dialog, Dialog Input components |
|
||||||
- Dialog Input supports multiple input types; clicks & key presses |
|
||||||
- Can hold down shift while pressing a key to fast forward through dialog text |
|
||||||
- Say Dialog now adjusts Story Text rect when character image is visible. |
|
||||||
- Added Stop() method to Say Dialog and Writer to cancel writing immediately |
|
||||||
- Fullscreen command. https://trello.com/c/aA5GQlua |
|
||||||
- InputText example in FungusExamples |
|
||||||
- Localization support for the Set Text and Write commands. |
|
||||||
- Custom commands can integrate with the localisation system by implementing the ILocalizable interface. |
|
||||||
- Invoke Event command for calling script methods with a parameter using Unity's EventSystem. |
|
||||||
- Invoke Method command for calling script methods with multiple parameters using reflection. |
|
||||||
- Can now use UnityEvent variables in custom commands |
|
||||||
- Flowchart versioning and initialization |
|
||||||
- Menu command now has an Interactable property to add disabled menu options. https://trello.com/c/bFjmGfBc |
|
||||||
- Set Sprite Order command. https://trello.com/c/5yZ88Rh0 |
|
||||||
- Added Set Sorting Layer command to set renderer sorting layer |
|
||||||
- Set Mouse Cursor command and drag and drop support |
|
||||||
- Constructors and implicit operators for all Fungus variable types |
|
||||||
- Quit command to quit application - https://trello.com/c/qIVLgrDx |
|
||||||
- New Fungus/UI command category |
|
||||||
- Added ComboBox to Thirdparty folder |
|
||||||
- Added Tools > Fungus > Create > Fungus Logo menu option |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Simplifed Say Dialog hierarchy structure to be easier to customise |
|
||||||
- Say Dialog continue image is now a UI button |
|
||||||
- Say Dialog automatically fades in / out when writing |
|
||||||
- Updated The Facility example to work with new Say Dialog design |
|
||||||
- Updated Drag And Drop example to use new Set Mouse Cursor command |
|
||||||
- Improved rendering efficiency of Block inspector window. |
|
||||||
- Improved shift-selecting commands in Block inspector. |
|
||||||
- Portrait command now moves portraits using world position instead of anchored position |
|
||||||
- Portrait cross fading is now done using image alpha instead of a custom shader |
|
||||||
- Stage Show / Hide is now done by tweening the CanvasGroup alpha. |
|
||||||
- Portrait MoveSpeed is now MoveDuration |
|
||||||
- Portrait WaitUntilFinished option now works robustly |
|
||||||
- Additional flowcharts added to the scene no longer have their initial block start with the default 'Game Started' event. |
|
||||||
- Command array properties can now be flagged to use the reorderable list control |
|
||||||
- Custom commands can override IsPropertyVisible() to hide specific properties as needed. |
|
||||||
- SetActive command shows state in summary |
|
||||||
- Block Event Handler for additional Flowcharts now defaults to none. |
|
||||||
- Can assign default values to public Fungus variable properties |
|
||||||
- Can access Fungus variable values directly without using .Value accessor. |
|
||||||
- Say Command fade in / out replaced with automatic fading and Fade When Done property |
|
||||||
- Get Text and Set Text command now work on any text object (UI text, UI input fields & 3D text mesh) |
|
||||||
|
|
||||||
## Fixed |
|
||||||
|
|
||||||
- Shake Camera command timing issue #137 |
|
||||||
- CSV parser doesn't handle Windows-style line endings #131 |
|
||||||
- Intermittent init order issue with caching localizeable objects |
|
||||||
- Control Audio stopping all untagged audiosources #132 |
|
||||||
- Intermittent null reference error from command editors |
|
||||||
- Draggable objects don't return to start pos if drag completes #130 |
|
||||||
- Moving and fading portraits at the same time |
|
||||||
- Character portrait images have display artefacts #92 |
|
||||||
- Duplicate Block option does not do a deep copy #129 |
|
||||||
- Event System not created after Load Scene #121 |
|
||||||
- Voice over audio only works every second time #126 |
|
||||||
- Editing multiline command properties in block inspector. |
|
||||||
- Compile error when Fungus is used with "Draw On Screen" asset #120 |
|
||||||
- Null reference exception when spawning Fungus objects in Unity 5.1 |
|
||||||
- Story text box width is restored when using a character with no portrait #141 |
|
||||||
- Block inspector window resizes when using cut, copy, paste shortcuts #145 |
|
||||||
- Objects spawned from Tools > Fungus > Create menu center correctly in Unity 5.1.3f |
|
||||||
|
|
||||||
## Process Changes |
|
||||||
|
|
||||||
We are now using the Unity Test Tools framework for unit and integration testing. |
|
||||||
All new features and bug fixes now have automated tests where possible. |
|
||||||
|
|
||||||
## Upgrade Notes |
|
||||||
|
|
||||||
We made a LOT of improvements to the Say Dialogs in this release. Unfortunately these changes are likely to break existing customised Say Dialogs. If you upgrade an existing Fungus project and find the Say Dialog are no longer working you will need to delete your Say Dialogs and create new ones. |
|
||||||
|
|
||||||
v2.1.0 {#v2_1_0} |
|
||||||
====== |
|
||||||
|
|
||||||
First release on Unity Asset Store! |
|
||||||
|
|
||||||
## Added |
|
||||||
|
|
||||||
- Added Flowchart.FindBlock so you can check if a Block is executing before you try to execute it. |
|
||||||
- Cleanup any unreferenced components in Flowchart when scene loads |
|
||||||
|
|
||||||
## Changed |
|
||||||
|
|
||||||
- Call Method can now execute after a delay |
|
||||||
https://trello.com/c/a333r2QA |
|
||||||
|
|
||||||
- Can now control swipe pan speed in Start Swipe command |
|
||||||
https://trello.com/c/TmG9SiIa |
|
||||||
|
|
||||||
- Improved layout of Flowchart name and description |
|
||||||
https://trello.com/c/vwnzaOh2 |
|
||||||
|
|
||||||
## Removed |
|
||||||
|
|
||||||
- Removed obsolete commands and other dead code |
|
||||||
|
|
||||||
## Fixed |
|
||||||
- Fixed using iTween and Portrait commands in same Flowchart causes null exception #116 |
|
||||||
- Fixed whitespace and newlines not being trimmed after {wc} & {c} tags in story text #115 |
|
||||||
- Fixed Standard Text import strips out newline characters #114 |
|
||||||
- Fixed {x} text tag causing a null reference error #113 |
|
||||||
- Fixed Flowchart.ExecuteBlock() not being usable with UI events (e.g. a UI button event) #112 |
|
||||||
- Fixed Set Draggable command causing null exception error #111 |
|
||||||
- Fixed conflicting Block & command item ids (was breaking localization text export) #110 |
|
@ -1,33 +0,0 @@ |
|||||||
# Code of conduct # {#code_of_conduct} |
|
||||||
|
|
||||||
# TL;DR # |
|
||||||
Be nice to each other :) |
|
||||||
|
|
||||||
We want an open and respectful community at %Fungus. So we would ask you when communicating (for example, posting on our Forums, Comments or github repository ) to be friendly and helpful. We find, for most people, this is not a problem. Our list of guidelines below is not exhaustive but should give a strong indication of what we consider acceptable community behaviour. |
|
||||||
|
|
||||||
# Be welcoming # |
|
||||||
We welcome and support people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. |
|
||||||
|
|
||||||
# Be respectful # |
|
||||||
It's ok to disagree with someone. It's not ok to personally attack someone. Instead, focus on helping to resolve issues and learning from mistakes. |
|
||||||
|
|
||||||
Bullying or Harassment will not be tolerated |
|
||||||
The following behaviours are not acceptable: |
|
||||||
|
|
||||||
- Violent threats or language directed against another person. |
|
||||||
- Sexist, racist, or otherwise discriminatory jokes and language. |
|
||||||
- Posting sexually explicit or violent material. |
|
||||||
- Posting (or threatening to post) other people's personally identifying information ("doxing"). |
|
||||||
- Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history. |
|
||||||
- Personal insults, especially those using racist or sexist terms. |
|
||||||
- Unwelcome sexual attention. |
|
||||||
- Excessive or unnecessary profanity. |
|
||||||
- Repeated harassment of others. In general, if someone asks you to stop, then stop. |
|
||||||
- Advocating for, or encouraging, any of the above behaviour. |
|
||||||
|
|
||||||
# Assume Good Intentions # |
|
||||||
Give people the benefit of the doubt. If you believe they have acted against the code of conduct, please refer them to this document. Remember, although English is the primary language of %Fungus development, that not all members have English as their primary language. |
|
||||||
|
|
||||||
Thanks to [http://www.apache.org/foundation/policies/conduct.html](http://www.apache.org/foundation/policies/conduct.html) and [https://www.djangoproject.com/conduct](https://www.djangoproject.com/conduct) for inspiration and content. |
|
||||||
|
|
||||||
If you have any questions about these guidelines please contact us. |
|
@ -1,109 +0,0 @@ |
|||||||
# Coding Standard # {#coding_standard} |
|
||||||
|
|
||||||
\brief The %Fungus coding standard is designed to make the source code simple to understand for users and easy to maintain for contributors. |
|
||||||
|
|
||||||
This document is focussed on decisions that we've made for the %Fungus project. For general Unity coding tips, try [50 Tips and Best Practices for Unity](http://www.gamasutra.com/blogs/HermanTulleken/20160812/279100/50_Tips_and_Best_Practices_for_Unity_2016_Edition.php). |
|
||||||
|
|
||||||
# Code layout # {#code_layout} |
|
||||||
|
|
||||||
This is the typical layout of a class in %Fungus: |
|
||||||
|
|
||||||
``` |
|
||||||
using UnityEngine; |
|
||||||
|
|
||||||
namespace Fungus |
|
||||||
{ |
|
||||||
/// <summary> |
|
||||||
/// Description of the component. |
|
||||||
/// </summary> |
|
||||||
public class MyComponent : MonoBehaviour |
|
||||||
{ |
|
||||||
[Tooltip("Tooltip comment displayed in the editor.")] |
|
||||||
[SerializeField] protected float myProperty = 10f; |
|
||||||
|
|
||||||
protected virtual void MyMethod() |
|
||||||
{ |
|
||||||
if (myProperty > 5f) |
|
||||||
{ |
|
||||||
Debug.Log("A message"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
#region Public members |
|
||||||
|
|
||||||
/// <summary> |
|
||||||
/// Documentation comment for public property. |
|
||||||
/// </summary> |
|
||||||
public virtual float MyProperty { get; set; } |
|
||||||
|
|
||||||
/// <summary> |
|
||||||
/// Aspect ratio of the secondary view rectangle. e.g. a 2:1 aspect ratio = 2/1 = 2.0. |
|
||||||
/// </summary> |
|
||||||
public virtual void DoSomething() |
|
||||||
{ |
|
||||||
} |
|
||||||
|
|
||||||
#endregion |
|
||||||
} |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
Things to note: |
|
||||||
|
|
||||||
- using declarations all go together at the top of the file. |
|
||||||
- Remove any unused using declarations (can spot these easily with static code analysis - see below). |
|
||||||
- Runtime code goes in the Fungus namespace. |
|
||||||
- Editor code goes in the Fungus.EditorUtils namespace. |
|
||||||
- All public classes, structs, enums and class members should be documented using xml comments. |
|
||||||
- You can document private and protected members if you want to, but ALL public members must have at least a summary comment. |
|
||||||
- Parameter & return descriptions are optional, add them if you feel the parameters require a non-trivial explanation. |
|
||||||
- Serialized fields should NEVER be public. Use a public accessor property to access the field if external access is required. |
|
||||||
- All serialized fields should have a Tooltip attribute. This doubles as code documentation for the field. |
|
||||||
- All methods should be declared virtual and use protected instead of private. This allows for easy inheritance and extension (at the cost of some performance). |
|
||||||
- All public members of a class (including public static & delegate types) should be placed inside a 'Public members' region for easy access. |
|
||||||
- Braces go on a newline and use spaces exclusively instead of tabs. |
|
||||||
|
|
||||||
# Coding best practices # {#coding_best_practices} |
|
||||||
|
|
||||||
These are some general best practices when writing code for %Fungus. Where these go against the usual recommended coding practice (e.g. Assert) it's because of an issue in Unity with doing it 'the right way'. |
|
||||||
|
|
||||||
- Use the static code analyser in MonoDevelop. http://tinyurl.com/h7xqpwg |
|
||||||
- Use the c# xml comment style. https://msdn.microsoft.com/en-us/library/b2s063f7.aspx |
|
||||||
- Declare all public enums at namespace scope, not inside a class. (Consistency, easier sharing of enums between classes). |
|
||||||
- Use var instead of declaring variable types when possible. (More readable). |
|
||||||
- Use for instead of foreach when possible. (Avoids allocating an iterator & GC problems). |
|
||||||
- Use string.Format or StringBuilder instead of concatenating strings. (Avoids allocations & GC problems). |
|
||||||
- Don't use LINQ. (Avoids allocations & GC problems.) |
|
||||||
- Don't use Assert. (We support back to Unity 5.0, before Assert was introduced). |
|
||||||
- Use Mathf.Approximately when comparing float variables to constants. |
|
||||||
- Treat compiler warnings as errors. There should be zero warnings at build or runtime in normal operation. |
|
||||||
- Add global constants to FungusConstants.cs |
|
||||||
|
|
||||||
# Backwards compatibility # {#backwards_compatibility} |
|
||||||
|
|
||||||
We aim to maintain backwards compatibility with each new release (to a reasonable extent). |
|
||||||
|
|
||||||
- Projects should work correctly after upgrading to a newer %Fungus version. Minor behavior changes are acceptable. |
|
||||||
- Custom code which uses the %Fungus API should compile without error after upgrading. Minor compile errors that are trivial to fix are sometimes acceptable. |
|
||||||
- There are loads of %Fungus tutorial videos and articles on the Internet, so avoid changing the UI too dramatically. Small UI tweaks and adding new controls is acceptable. |
|
||||||
- We support Unity 5.0+ so beware of API differences in newer versions. If in doubt, install Unity 5.0 and test your changes. |
|
||||||
|
|
||||||
# Contributing # {#contributing} |
|
||||||
|
|
||||||
We welcome pull requests from everyone. By contributing to this project, you agree to abide by the @ref code_of_conduct. You also agree that by submitting a pull request for this project, your contribution will be licensed under the [Open Source license] for this project. |
|
||||||
|
|
||||||
- Fork and clone the %Fungus repo. |
|
||||||
- Make sure the tests pass locally (see the project readme for instructions). |
|
||||||
- Make your change. Add tests for your change. Make the tests pass locally. |
|
||||||
- Push to your fork and submit a pull request. |
|
||||||
|
|
||||||
Your pull request will have a better chance of being accepted if you do the following: |
|
||||||
|
|
||||||
- Send one pull request for each new feature / bug fix. It's time consuming to review multi-feature changes and we won't merge a change unless we know exactly what it does. |
|
||||||
- Write tests for each change / new feature (not always possible) |
|
||||||
- Follow our coding standard (see above) |
|
||||||
- Write a [good commit message][commit]. |
|
||||||
|
|
||||||
[commit]: http://chris.beams.io/posts/git-commit/ |
|
||||||
[fork a repo]: https://help.github.com/articles/fork-a-repo/ |
|
||||||
[Open Source license]: https://github.com/snozbot/Fungus/blob/master/LICENSE |
|
@ -1,95 +0,0 @@ |
|||||||
# Coding Tips # {#coding_tips} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
This is a collection of quick tips for scripting %Fungus from code. |
|
||||||
|
|
||||||
# Executing Blocks # {#executing_blocks} |
|
||||||
|
|
||||||
You first need to get a reference to your flowchart object. Add a public Flowchart property to your component and set it to reference your flowchart in the inspector. |
|
||||||
``` |
|
||||||
using UnityEngine; |
|
||||||
using Fungus; |
|
||||||
|
|
||||||
class MyComponent : public MonoBehaviour |
|
||||||
{ |
|
||||||
public Flowchart flowchart; |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
To execute a named Block in the Flowchart: |
|
||||||
``` |
|
||||||
flowchart.ExecuteBlock("BlockName"); |
|
||||||
``` |
|
||||||
|
|
||||||
To start execution at a specific command index: |
|
||||||
``` |
|
||||||
flowchart.ExecuteBlock("BlockName", 3); |
|
||||||
``` |
|
||||||
|
|
||||||
To tell if a Flowchart has any executing Blocks: |
|
||||||
``` |
|
||||||
if (flowchart.HasExecutingBlocks()) |
|
||||||
{ |
|
||||||
// Do something |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
# Block Signals # {#block_signals} |
|
||||||
|
|
||||||
You can use the BlockSignals class to listen for events from the Block execution system. |
|
||||||
|
|
||||||
``` |
|
||||||
using Fungus; |
|
||||||
|
|
||||||
public MyComponent : MonoBehaviour |
|
||||||
{ |
|
||||||
void OnEnable() |
|
||||||
{ |
|
||||||
// Register as listener for Block events |
|
||||||
BlockSignals.OnBlockStart += OnBlockStart; |
|
||||||
} |
|
||||||
|
|
||||||
void OnDisable() |
|
||||||
{ |
|
||||||
// Unregister as listener for Block events |
|
||||||
BlockSignals.OnBlockStart -= OnBlockStart; |
|
||||||
} |
|
||||||
|
|
||||||
void OnBlockStart(Block block) |
|
||||||
{ |
|
||||||
Debug.Log("Block started " + block.BlockName); |
|
||||||
} |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
# Writer Signals # {#writer_signals} |
|
||||||
|
|
||||||
You can use the WriterSignals class to listen for a variety of events from the text writing system. |
|
||||||
|
|
||||||
``` |
|
||||||
using Fungus; |
|
||||||
|
|
||||||
public MyComponent : MonoBehaviour |
|
||||||
{ |
|
||||||
void OnEnable() |
|
||||||
{ |
|
||||||
// Register as listener for Writer state change events |
|
||||||
WriterSignals.OnWriterState += OnWriterState; |
|
||||||
} |
|
||||||
|
|
||||||
void OnDisable() |
|
||||||
{ |
|
||||||
// Unregister as listener for Writer state change events |
|
||||||
WriterSignals.OnWriterState -= OnWriterState; |
|
||||||
} |
|
||||||
|
|
||||||
void OnWriterState(Writer writer, WriterState writerState) |
|
||||||
{ |
|
||||||
if (writerState == WriterState.Start) |
|
||||||
{ |
|
||||||
Debug.Log("Writing started"); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
@ -1,60 +0,0 @@ |
|||||||
# Community tutorials # {#community_tutorials} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
If you've created an article or video about %Fungus let us know on the forum and we'll add it here. |
|
||||||
|
|
||||||
# Jesse Shepherd # {#jesse_shepherd} |
|
||||||
|
|
||||||
An add-on for Fungus that simplifies the process of writing for characters with dynamic or user-defined gender pronouns. |
|
||||||
|
|
||||||
- [Fungus Gendered Terms](https://github.com/zelgadis/fungus-gendered-terms) |
|
||||||
|
|
||||||
# Game Dev Resources # {#game_dev_resources} |
|
||||||
|
|
||||||
- [Global Game Jam resources list](http://globalgamejam.org/jammer-resources) |
|
||||||
- [Open Game Art](http://opengameart.org) |
|
||||||
- [Choice of Games design articles](https://www.choiceofgames.com/category/blog/game-design) |
|
||||||
|
|
||||||
# Marco Secchi # {#marco_secchi} |
|
||||||
|
|
||||||
- [Interacting with a GameObject in Fungus](http://www.marcosecchi.it/2016/11/26/interacting-with-a-gameobject-in-fungus/?lang=en) |
|
||||||
- [Using Fungus and 3D in Unity](http://www.marcosecchi.it/2017/01/20/using-fungus-and-3d-in-unity/?lang=en) |
|
||||||
|
|
||||||
# Morning Fun Games # {#morning_fun} |
|
||||||
|
|
||||||
- [Custom Dialog Like A Comic](https://www.youtube.com/watch?v=RdCAjpQ3iGE) |
|
||||||
|
|
||||||
# Sercan Altun # {#sercun_altun} |
|
||||||
|
|
||||||
- [Input Dialog & Writing Custom Commands](http://sercanaltun.com/blog/fungus-game-input-dialog-writing-custom-commands) |
|
||||||
- [Loading Characters Dynamically](http://sercanaltun.com/blog/fungus-game-loading-characters-dynamically) |
|
||||||
|
|
||||||
# David Arcila # {#david_arcila} |
|
||||||
|
|
||||||
- [Game Development Resources](https://game-development.zeef.com/david.arcila?utm_source=Facebook&utm_medium=Post&utm_content=game-development&utm_campaign=Rob#block_60669) |
|
||||||
|
|
||||||
# David Sherlock # {#david_sherlock} |
|
||||||
|
|
||||||
[http://davidsherlock.co.uk](http://davidsherlock.co.uk) |
|
||||||
|
|
||||||
- [Creating Revision Apps as Text Adventures](http://davidsherlock.co.uk/creating-revision-apps-as-text-adventures/) |
|
||||||
- [More attempts to create revision apps using free resources](http://davidsherlock.co.uk/more-attempts-to-create-revision-apps-using-free-resources) |
|
||||||
- [Creating your own hidden object game](http://davidsherlock.co.uk/starting-your-own-hidden-object-game) |
|
||||||
- [Setting up Unity and %Fungus to make appliedgames](https://youtu.be/t1zf4Qq_GS8) |
|
||||||
|
|
||||||
# Leah Lee # {#leah_lee} |
|
||||||
|
|
||||||
[http://leahlee.studio](http://leahlee.studio) |
|
||||||
|
|
||||||
- [%Fungus Research](http://leahlee.studio/fungus-research-week-1) |
|
||||||
- [Contributing to %Fungus](http://leahlee.studio/contributing-to-fungus-for-unity-week-2/) |
|
||||||
- [Using a video as a texture](http://leahlee.studio/using-a-video-as-a-texture) |
|
||||||
|
|
||||||
# Konrad Gadzina # {#konrad_gadzina} |
|
||||||
|
|
||||||
- [Visual scripting w Unity (Polish)](https://www.youtube.com/watch?v=sXRt7pKT4ls&feature=youtu.be) |
|
||||||
|
|
||||||
# Chen # {#chen} |
|
||||||
|
|
||||||
[2D text adventure game dialogue system in Unity 5 (Chinese)](https://www.youtube.com/playlist?list=PLYGd-m5DMaRZgSXtQ4JX3uEKXN67_Jzrp) |
|
||||||
|
|
@ -1,72 +0,0 @@ |
|||||||
# Conversation system # {#conversation_system} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The Say and Portrait commands are a powerful way to build character dialogue, but it can be tedious to add large amounts of dialogue this way. |
|
||||||
|
|
||||||
The Conversation system provides a simplified format that allows you to quickly control: |
|
||||||
|
|
||||||
- Which character is speaking |
|
||||||
- Which portrait image to use (either on the Say Dialog or on the Stage portrait) |
|
||||||
- Which stage position to move to the character to (if using the Stage) |
|
||||||
- When to hide a character |
|
||||||
|
|
||||||
To create a conversation, add the Conversation command (Narrative > Conversation) to a Block and enter the conversation text. |
|
||||||
|
|
||||||
# Example # {#example} |
|
||||||
|
|
||||||
```text |
|
||||||
john bored left: Oh, so that's how you use the Conversation command. |
|
||||||
sherlock eyeroll right: Yes, well done John. |
|
||||||
You catch on quickly don't you? |
|
||||||
hide john "offscreen left": I sure do. |
|
||||||
|
|
||||||
-- This is a comment, it doesn't appear in the conversation |
|
||||||
|
|
||||||
john angry middle: Wait, what! |
|
||||||
left: There's no need to be rude Sherlock! |
|
||||||
bored: Not like that would stop you. |
|
||||||
|
|
||||||
sherlock excited: AHA! So that's how you do a conversation from Lua! |
|
||||||
Fascinating. |
|
||||||
john <<<: Yes, riveting. |
|
||||||
|
|
||||||
john hide: |
|
||||||
sherlock hide: |
|
||||||
``` |
|
||||||
|
|
||||||
# Format # {#format} |
|
||||||
|
|
||||||
The format for conversation text is: |
|
||||||
```text |
|
||||||
[character] [portrait] [position] [hide] [<<< | >>>] [clear | noclear] [wait | nowait] [fade | nofade]: [Dialogue text] |
|
||||||
``` |
|
||||||
|
|
||||||
- character: The gameobject name or Name Text value of the speaking character. |
|
||||||
- portrait: The name of a sprite in the character's Portraits list. |
|
||||||
- position: The name of a position object in the Stage (e.g. Left, Middle, Right, Offscreen Left, Offscreen Right) |
|
||||||
- hide: Hides the character |
|
||||||
- <<<: Portrait face left |
|
||||||
- >>>: Portrait face right |
|
||||||
- clear | noclear: override the ClearPreviousLine default with true on clear or with false with noclear |
|
||||||
- wait | nowait: override the WaitForInput default with true on wait or with false with nowait |
|
||||||
- fade | nofade: override the FadeDone default with true on fade or with false with nofade. This is rarely required as it only really makes a difference on the last say of the conversation anyway. |
|
||||||
|
|
||||||
Parameters go on the left of the colon and the dialogue text goes on the right. You can omit any parameter and specify them in any order. Parameters are separated by spaces. If you need to use a name which contains spaces, wrap it in quotation marks e.g. "John Watson". Parameters are case insensitive. Blank lines and comment lines starting with -- are ignored. A line of dialogue text on its own will be spoken by the most recent character. You can omit dialogue text, but remember you still need to add the : character at the end of the line. |
|
||||||
|
|
||||||
# String substitution # {#string_substitution} |
|
||||||
|
|
||||||
You can use the normal string subsitution syntax {$VarName} anywhere in the conversation text. For example if you have a string Flowchart variable called PlayerName you can embed this in a conversation like this: |
|
||||||
|
|
||||||
```text |
|
||||||
john: Hi there {$PlayerName}. |
|
||||||
``` |
|
||||||
|
|
||||||
# Localization # {#localization} |
|
||||||
|
|
||||||
You can use the string substitution feature above with a @ref lua_string_table "Lua string table" to localize the conversation for multiple languages. |
|
||||||
|
|
||||||
The Conversation system does not work with the Localization component in %Fungus because the syntax makes it difficult to localize that way. |
|
||||||
|
|
||||||
# Lua # {#lua} |
|
||||||
|
|
||||||
The conversation system can also be used @ref lua_controlling_fungus "from Lua". |
|
@ -1,65 +0,0 @@ |
|||||||
# Frequently Asked Questions # {#faq} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
# What is Fungus? # {#faq_what_is_fungus} |
|
||||||
%Fungus is a free open source tool for creating storytelling games, with a strong focus on accessibility for novice game developers. Users all over the world are now using it to create a wonderfully diverse range of storytelling games. |
|
||||||
|
|
||||||
# Who makes Fungus? # {#faq_who_makes} |
|
||||||
%Fungus is developed by [Snozbot], a small independent games company. Chris Gregan is the main developer of %Fungus. |
|
||||||
|
|
||||||
# Where do I get Fungus? # {#faq_where_get} |
|
||||||
%Fungus is available on the [Unity Asset Store] and in the [releases section] of the Fungus github repository. |
|
||||||
|
|
||||||
# Is Fungus really free to use? # {#faq_really_free} |
|
||||||
Yes. %Fungus has an Open Source M.I.T. license. You can use %Fungus with both the free personal and pro versions of the Unity game engine. |
|
||||||
|
|
||||||
# Can I sell the apps I make with Fungus? # {#faq_can_sell} |
|
||||||
Yes. We do not charge a license fee. |
|
||||||
|
|
||||||
# What platforms does Fungus support? # {#faq_platforms} |
|
||||||
%Fungus runs on any platform supported by the Unity game engine. See here for a list of supported platforms. |
|
||||||
|
|
||||||
# Do I need to be a programmer to use Fungus? # {#faq_non_coders} |
|
||||||
No. %Fungus can be used to make a variety of story-driven games with no coding required, via its visual scripting Flowchart system. |
|
||||||
|
|
||||||
# Is Fungus useful for programmers? # {#faq_coders} |
|
||||||
Yes. %Fungus provides an easy way to add visual novel features to any Unity game. It is also possible to extend %Fungus to customise the workflow for your team. Checkout the documentation and tutorials for more information. |
|
||||||
|
|
||||||
# Where can I learn more about Fungus? # {#faq_learn_more} |
|
||||||
We provide extensive tutorials and documentation on our website. There is also a comprehensive online training course suitable for beginners at Udemy. |
|
||||||
|
|
||||||
# I've made something cool with Fungus. Wanna see? # {#faq_show_and_tell} |
|
||||||
Most definitely! Please tweet [gofungus] and/or post an item in the announcements section of our forum. |
|
||||||
|
|
||||||
# How can I upload my Fungus game for others to see? # {#faq_where_upload} |
|
||||||
After creating a build, you can use a hosting service such as [itch.io], [gamejolt.com] or [newgrounds.com] |
|
||||||
|
|
||||||
# How can I report a bug or suggest new features for Fungus? # {#faq_bug_reports} |
|
||||||
Please use the forum to report bugs and request new features. You can also checkout our github issues list to see what we have planned. |
|
||||||
|
|
||||||
# How long will I have to wait for a bug-fix? # {#faq_how_long} |
|
||||||
If a bug is critical and we can't offer a sensible workaround, we will try to fix it as soon as possible. Otherwise, we will aim to fix the issue in the next release. |
|
||||||
|
|
||||||
# Can I get my hands on beta versions of Fungus? # {#faq_beta_version} |
|
||||||
The very latest version is always available at our [github repository] |
|
||||||
|
|
||||||
# How can I contribute to Fungus? # {#faq_contribute} |
|
||||||
There are lots of ways to help the %Fungus community to grow! |
|
||||||
|
|
||||||
1. Answer questions and post tips on the forum |
|
||||||
2. Contribute code either via a Github pull request or post code snippets in the forums. |
|
||||||
3. Improve the documentation by editing the Docs folder on github and send in a pull request. |
|
||||||
4. Let us know on the forum if you've made a game with %Fungus so we can add it to the site. |
|
||||||
5. If you write an article, blog post, podcast, etc. about %Fungus send it in and we'll add it to the @ref community_tutorials section. |
|
||||||
|
|
||||||
# Are you planning to integrate Fungus into other game engines? # {#faq_other_engines} |
|
||||||
Not currently. We're sticking with Unity for the foreseeable future. |
|
||||||
|
|
||||||
[gofungus]: http://twitter.com/gofungus |
|
||||||
[Snozbot]: http://snozbot.com |
|
||||||
[Unity Asset Store]: http://u3d.as/f0T |
|
||||||
[itch.io]: http://itch.io |
|
||||||
[gamejolt.com]: http://gamejolt.com |
|
||||||
[newgrounds.com]: http://newgrounds.com |
|
||||||
[github repository]: https://github.com/snozbot/fungus |
|
||||||
[releases section]: https://github.com/snozbot/fungus/releases |
|
@ -1,83 +0,0 @@ |
|||||||
# Flowcharts # {#flowcharts} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
A fundamental concept of %Fungus is the **Flowchart**. Scenes can contain a single Flowchart or multiple Flowcharts. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# What is a Flowchart? # {#flowchart} |
|
||||||
|
|
||||||
A %Fungus **Flowchart** contains the Blocks in which all your %Fungus Commands are located. A Unity scene can contain multiple Flowcharts, and commands can be executing simultaneously in different Flowcharts. However, for many games it is sufficient for one Block in one Flowcart to be executing at any one time. |
|
||||||
|
|
||||||
Here is an example of a %Fungus Flowchart: |
|
||||||
|
|
||||||
![flowchart example] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# The Flowchart window # {#flowcharts_flowchart_window} |
|
||||||
You'll need the %Fungus Flowchart window when working with %Fungus. Open and dock this window somewhere handy by following these steps: |
|
||||||
|
|
||||||
1. Choose menu: ``Tools | %Fungus | Flowchart Window`` |
|
||||||
|
|
||||||
![Menu open %Fungus window] |
|
||||||
|
|
||||||
2. Drag-and-drop the Flowchart window to the location you wish to dock it: |
|
||||||
|
|
||||||
![Drag %Fungus window] |
|
||||||
|
|
||||||
3. The Flowchart window is now docked and part of your Unity window layout: |
|
||||||
|
|
||||||
![Docked %Fungus window] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Creating a Flowchart # {#creating_flowchart} |
|
||||||
To create a %Fungus Flowchart do the following: |
|
||||||
|
|
||||||
1. Choose menu: ```Tools | %Fungus | Create Flowchart``` |
|
||||||
|
|
||||||
![menu create Flowchart] |
|
||||||
|
|
||||||
2. A new **Flowchart** gameObject should appear in the Hierarchy window. |
|
||||||
|
|
||||||
![new Flowchart gameobject] |
|
||||||
|
|
||||||
3. Select the **Flowchart** gameObject in the Hierarchy window, and you'll see the **Flowchart's** properties in the Inspector Window: |
|
||||||
|
|
||||||
![Flowchart properties] |
|
||||||
|
|
||||||
4. If you have not already displayed the Flowchart Window, you can do so by clicking the Flowchart Window button in the Inspector. |
|
||||||
|
|
||||||
5. As you can see, when a new Flowchat is created a single command Block named "New Block" is automatically created, with the Event handler "Game Started" (so it will start executing %Fungus commands as soon as the scene goes into **Play Mode**). |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Panning the Flowchart # {#panning} |
|
||||||
Panning means moving the contents of the Flowchart window as if they are on a piece of paper. Click and drag with the RIGHT mouse button to pan the contents of the Flowchart window. |
|
||||||
|
|
||||||
![pan flowchart 1] |
|
||||||
|
|
||||||
![pan flowchart 2] |
|
||||||
|
|
||||||
![pan flowchart animated] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Zooming the Flowchart # {#zooming} |
|
||||||
Zooming refers to making the contents larger or smaller. To zoom the Flowchart window contents either click and drag the UI slider, or use the mouse wheel (or trackpad). |
|
||||||
|
|
||||||
![zoom flowchart 1] |
|
||||||
|
|
||||||
![zoom flowchart 2] |
|
||||||
|
|
||||||
![zoom flowchart 2] |
|
||||||
|
|
||||||
[flowchart example]: ./flowcharts/001_what_is/1_example_flowchart.png "flowchart example" |
|
||||||
[Menu open %Fungus window]: ./flowcharts/002_docking/1_menu.png "Menu open %Fungus window" |
|
||||||
[Drag %Fungus window]: ./flowcharts/002_docking/2_window.png "Drag %Fungus window" |
|
||||||
[Docked %Fungus window]: ./flowcharts/002_docking/3_docked.png "Docked %Fungus window" |
|
||||||
[menu create Flowchart]: ./flowcharts/005_create_flowchart/1_tools_create.png "menu create Flowchart" |
|
||||||
[new Flowchart gameobject]: ./flowcharts/005_create_flowchart/2_flowchart_gameobject.png "new Flowchart gameobject" |
|
||||||
[Flowchart properties]: ./flowcharts/005_create_flowchart/3_flowchart_properties.png "Flowchart properties" |
|
||||||
[pan flowchart 1]: ./flowcharts/003_panning/1_pan1.png "pan flowchart 1" |
|
||||||
[pan flowchart 2]: ./flowcharts/003_panning/2_pan2.png "pan flowchart 2" |
|
||||||
[pan flowchart animated]: ./flowcharts/003_panning/animated_drag_to_pan.gif "pan flowchart animated" |
|
||||||
[zoom flowchart 1]: ./flowcharts/004_zooming/1_zoom1.png "zoom flowchart 1" |
|
||||||
[zoom flowchart 2]: ./flowcharts/004_zooming/2_zoom2.png "zoom flowchart 2" |
|
||||||
[zoom flowchart 2]: ./flowcharts/004_zooming/animated_zoom.gif "zoom flowchart animated" |
|
@ -1,204 +0,0 @@ |
|||||||
# Getting Started # {#getting_started} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
Follow these steps to get up and running with %Fungus quickly, then learn more about what %Fungus can do and how to do it from the other documentation pages and videos. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# The Flowchart window # {#getting_started_flowchart_window} |
|
||||||
You'll need the %Fungus Flowchart window when working with %Fungus. Open and dock this window somewhere handy by following these steps: |
|
||||||
|
|
||||||
1. Choose menu: ``Tools | %Fungus | Flowchart Window`` |
|
||||||
|
|
||||||
![Menu open %Fungus window] |
|
||||||
|
|
||||||
2. Drag-and-drop the Flowchart window to the location you wish to dock it: |
|
||||||
|
|
||||||
![Drag %Fungus window] |
|
||||||
|
|
||||||
3. The Flowchart window is now docked and part of your Unity window layout: |
|
||||||
|
|
||||||
![Docked %Fungus window] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Example scenes # {#examples} |
|
||||||
Two folders are created when you install %Fungus, the %Fungus features themslves (in folder '%Fungus') and a set of examples (in folder 'FungusExamples'). |
|
||||||
|
|
||||||
Examples include Drag and Drop, Sherlock and %Fungus Town: |
|
||||||
|
|
||||||
![%Fungus Examples] |
|
||||||
|
|
||||||
You can use the left-hand side of the Unity Project window to explore each example folder: |
|
||||||
|
|
||||||
![%Fungus Examples Project window] |
|
||||||
|
|
||||||
Alternatively, you can 'filter' the Project view to show all scenes (and no other files) by clicking the scene filter icon to the right of the search bar: |
|
||||||
|
|
||||||
![%Fungus Examples Project window filter scenes] |
|
||||||
|
|
||||||
You can cancel the filter by clicking the 'x' in the search bar: |
|
||||||
|
|
||||||
![%Fungus Examples Project window filter scenes cancel] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Running the examples # {#running_examples} |
|
||||||
To **load** an example scene, double click the desired example's scene object in the Project window, and the scene should load. For example, this screenshot shows the scene and Flowchart windows when the DragAndDrop example scene has been loaded: |
|
||||||
|
|
||||||
![%Fungus Examples Drag Drop] |
|
||||||
|
|
||||||
To **run** the currently loaded scene (i.e. to enter **Play-mode**), click the Unity 'play' triangle button at the center top of the Unity application window, and then do whatever makes sense in that scene (e..g click/type text/drag-and-drop objects etc.!): |
|
||||||
|
|
||||||
![Unity play scene] |
|
||||||
|
|
||||||
Note: you click the 'play' button a second time to end **Play-mode**. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Playmode changes # {#playmode} |
|
||||||
As with all Unity projects, you can **change** the properties of gameObjects while a scene is running, but these changes are 'ephemeral' - they only last while the scene is running. As soon as you end play mode the properties of all objects in the Hierarchy will revert to those saved in the Scene file. |
|
||||||
|
|
||||||
This makes it easy to 'tweak' values of objects in **Play-mode**, and then when the desired behaviour is achieved, those values can be set for the saved scene properties. |
|
||||||
|
|
||||||
Values set when Unity is in **Edit-mode** will be saved when you saved your scene (``CTRL-S`` / ``Command-S``, or menu: ``File | Save Scene``). |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Playmode tint # {#playmode_tint} |
|
||||||
Sometimes we can forget we are in Unity **Play-mode**, and then make changes to Hierarchy gameObject values that are then 'fogotton' when we do stop playing the scene. A good way to avoid this problem is to to set a 'tint' to the Unity editor to make it visually very clear to us when we are in **Play-mode**. To add a tint to **Play-mode** do the following: |
|
||||||
|
|
||||||
1. Open the Unity preferences dialog by choosing menu: ```File | Preferences ...``` |
|
||||||
|
|
||||||
2. Select the ```Colors``` preferences, and choose a light colored tint (we chose a light green in this case): |
|
||||||
|
|
||||||
![Unity preferences dialog] |
|
||||||
|
|
||||||
3. Close the dialog (changes are saved automatically). |
|
||||||
|
|
||||||
4. When you next enter **Play-mode** you'll see most of the Unity Editor windows turn green (apart from the Game and Flowchart windows): |
|
||||||
|
|
||||||
![Unity Play Mode tinted] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Creating a new scene # {#new_scene} |
|
||||||
To create a new scene in Unity do the following: |
|
||||||
|
|
||||||
1. Choose menu: ```File | New Scene``` |
|
||||||
|
|
||||||
2. Note: if you have any unsaved changes for the current scene you need to either save or abandon them before a new scene can be created. |
|
||||||
|
|
||||||
3. You should now have a shiny new scene, with a Hierarchy containing just one gameObject, a Main Camera. The new scene will have been give the default name "Untitled", which you can see in the title of the Application window: |
|
||||||
|
|
||||||
![New Scene] |
|
||||||
|
|
||||||
4. Good practice is to save your scene (in the right place, with the right name), before creating your work in the scene. Let's save this scene in the root of our project "Assets" folder, naming it "demo1". First choose menu: ```File | Save Scene As...``` |
|
||||||
|
|
||||||
5. Choose the location and name (we'll choose folders "Assets" and scene name "demo1"): |
|
||||||
|
|
||||||
![Save Scene As dialog] |
|
||||||
|
|
||||||
6. Once you have successfully saved the scene you should now see the new scene file "demo1" in your Assets folder in the Project window, and you should also see in the Application window title that you are currently editing the scene named "demo1": |
|
||||||
|
|
||||||
![Editing newly saved scene] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Menu: Tools | Fungus # {#fungus_menu} |
|
||||||
The core %Fungus operations are available from the Unity ```Tools``` menu. |
|
||||||
|
|
||||||
Choose menu: ```Tools | %Fungus``` to see the options available: |
|
||||||
|
|
||||||
![%Fungus Tools menu] |
|
||||||
|
|
||||||
As can be seen, there are 2 submenus, ```Create``` and ```Utilities```, plus the ```Flowchart Window``` action (which reveals the window if already open, or opens a new window if the Flowchart window was not previously opened). |
|
||||||
|
|
||||||
<!-- *********** --> |
|
||||||
# Menu: Tools | Fungus | Create # {#create_menu} |
|
||||||
The %Fungus Tools ```Create``` submenu offers the following actions: |
|
||||||
|
|
||||||
![%Fungus Tools Create menu] |
|
||||||
|
|
||||||
<!-- *********** --> |
|
||||||
# Menu: Tools | Fungus | Utilities # {#utilities_menu} |
|
||||||
The %Fungus Tools ```Utilties``` submenu offers the following actions: |
|
||||||
|
|
||||||
![%Fungus Tools Utilties menu] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Create a Flowchart # {#create_flowchart} |
|
||||||
To create a %Fungus Flowchart do the following: |
|
||||||
|
|
||||||
1. Choose menu: ```Tools | %Fungus | Create Flowchart``` |
|
||||||
|
|
||||||
![menu create Flowchart] |
|
||||||
|
|
||||||
2. A new **Flowchart** gameObject should appear in the Hierarchy window. |
|
||||||
|
|
||||||
![new Flowchart gameobject] |
|
||||||
|
|
||||||
3. Select the **Flowchart** gameObject in the Hierarchy window, and you'll see the **Flowchart's** properties in the Inspector Window: |
|
||||||
|
|
||||||
![Flowchart properties] |
|
||||||
|
|
||||||
4. If you have not already displayed the Flowchart Window, you can do so by clicking the Flowchart Window button in the Inspector. |
|
||||||
|
|
||||||
5. As you can see, when a new Flowchat is created a single command Block named "New Block" is automatically created, with the Event handler "Game Started" (so it will start executing %Fungus commands as soon as the scene goes into **Play Mode**). |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Block properties # {#block_properties} |
|
||||||
Let's change the name of the default command Block of a new Flowchart in the Flowchart window to "hello". Do the following: |
|
||||||
|
|
||||||
1. Create a new %Fungus Flowchart (if you haven't already done so). |
|
||||||
|
|
||||||
2. Click to select the Block in the Flowchart window (when multiple blocks are present, the selected one gets a green highlight border). |
|
||||||
|
|
||||||
3. In the Inspector change the text for the Block Name property to "hello". You should see the Block name change in the Flowchart window: |
|
||||||
|
|
||||||
![rename Block] |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# Add a command # {#add_command} |
|
||||||
To add a "Say" command to a Block do the following: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene. |
|
||||||
|
|
||||||
2. Ensure the Block is selected, and you can see its properties in the Inspector, and ensure the name of the Block is "hello". |
|
||||||
|
|
||||||
3. Click the Plus button in the bottom half of the Inspector window, to add a new Command to the Block's properties: |
|
||||||
|
|
||||||
![new command button] |
|
||||||
|
|
||||||
4. Choose menu: ```Narrative | Say```: |
|
||||||
|
|
||||||
![add Say command] |
|
||||||
|
|
||||||
5. Since this Block only has one Command, that command is automatically selected (shown with a green highlight). |
|
||||||
|
|
||||||
6. In the "Story Text" textbox in the bottom half of the Inspector window type in "hello Fugus world": |
|
||||||
|
|
||||||
![story text] |
|
||||||
|
|
||||||
7. Run the scene, and see %Fungus create a dialog window, and output the text contents of your Say command: |
|
||||||
|
|
||||||
![story text output] |
|
||||||
|
|
||||||
[Menu open %Fungus window]: ./getting_started/002_docking/1_menu.png "Menu open %Fungus window" |
|
||||||
[Drag %Fungus window]: ./getting_started/002_docking/2_window.png "Drag %Fungus window" |
|
||||||
[Docked %Fungus window]: ./getting_started/002_docking/3_docked.png "Docked %Fungus window" |
|
||||||
[%Fungus Examples]: ./getting_started/004_examples/1_examples.png "%Fungus Examples" |
|
||||||
[%Fungus Examples Project window]: ./getting_started/004_examples/3_project_window.png "%Fungus Examples Project window" |
|
||||||
[%Fungus Examples Project window filter scenes]: ./getting_started/004_examples/2_filter_scenes.png "%Fungus Examples Project window filter scenes" |
|
||||||
[%Fungus Examples Project window filter scenes cancel]: ./getting_started/004_examples/4_filter_scenes_cancel.png "%Fungus Examples Project window filter scenes cancel" |
|
||||||
[%Fungus Examples Drag Drop]: ./getting_started/004_examples/5_drag_drop.png "%Fungus Examples Drag Drop" |
|
||||||
[Unity play scene]: ./getting_started/004_examples/6_drag_running.png "Unity play scene" |
|
||||||
[Unity preferences dialog]: ./getting_started/005_highlight_play_mode/1_prefs_tint.png "Unity preferences dialog" |
|
||||||
[Unity Play Mode tinted]: ./getting_started/005_highlight_play_mode/2_green_play_mode.png "Unity Play Mode tinted" |
|
||||||
[New Scene]: ./getting_started/006_new_scene/1_default.png "New Scene" |
|
||||||
[Save Scene As dialog]: ./getting_started/006_new_scene/2_save_as.png "Save Scene As dialog" |
|
||||||
[Editing newly saved scene]: ./getting_started/006_new_scene/3_saved_scene.png "Editing newly saved scene" |
|
||||||
[%Fungus Tools menu]: ./getting_started/007_tools_menu/3_fungus_tools.png "%Fungus Tools menu" |
|
||||||
[%Fungus Tools Create menu]: ./getting_started/007_tools_menu/1_tools_create.png "%Fungus Tools Create menu" |
|
||||||
[%Fungus Tools Utilties menu]: ./getting_started/007_tools_menu/2_tools_utilities.png "%Fungus Tools Utilities menu" |
|
||||||
[menu create Flowchart]: ./getting_started/008_create_flowchart/1_tools_create.png "menu create Flowchart" |
|
||||||
[new Flowchart gameobject]: ./getting_started/008_create_flowchart/2_flowchart_gameobject.png "new Flowchart gameobject" |
|
||||||
[Flowchart properties]: ./getting_started/008_create_flowchart/3_flowchart_properties.png "Flowchart properties" |
|
||||||
[rename Block]: ./getting_started/009_rename_block/1_rename.png "rename Block" |
|
||||||
[new command button]: ./getting_started/010_say_command/1_plus.png "new command button" |
|
||||||
[add Say command]: ./getting_started/010_say_command/2_narrative_say.png "add Say command" |
|
||||||
[story text]: ./getting_started/010_say_command/3_hello_fungus_world.png "story text" |
|
||||||
[story text output]: ./getting_started/010_say_command/4_scene_running.png "story text output" |
|
@ -1,524 +0,0 @@ |
|||||||
# Glossary {#glossary} |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- A ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## A |
|
||||||
|
|
||||||
**Animator parameter**: |
|
||||||
Special variables that can be used to change what happens in an animation chart, such as when to trigger a chance from one animation state to another. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Assets**: |
|
||||||
The files on the computer/device, that are used in a game. Asset files include audio clips, video clips, 2D images, 3D models, and text files containing computer program code. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Audio tag**: |
|
||||||
One of the tags specially allowing the control of Audio from within the Story Text of a Say Command. |
|
||||||
|
|
||||||
There are four audio related tags: |
|
||||||
|
|
||||||
{audio=AudioObjectName} Play Audio Once |
|
||||||
{audioloop=AudioObjectName} Play Audio Loop |
|
||||||
{audiopause=AudioObjectName} Pause Audio |
|
||||||
{audiostop=AudioObjectName} Stop Audio |
|
||||||
|
|
||||||
For more information see: [Audio Tags recipe](../../audio/#audio-tags-in-say-commands/index.html) |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Audiosource**: |
|
||||||
A special component of Unity objects that can refer to a particular audio clip file, and control its playing / pausing / 3d effects etc. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- B ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## B |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Block**: |
|
||||||
A %Fungus Block is a sequence of Commands that have been created inside a %Fungus Flowchart. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Block connection**: |
|
||||||
When Commands in one Block cause the execution of Commands in another Block. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Boolean variable**: |
|
||||||
A true/false variable. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Branching block**: |
|
||||||
A Block that is **not** an Event Block, and causes execution of 2 or more other Blocks. |
|
||||||
|
|
||||||
Note: Branching Blocks are displayed as an orange hexagon in the Flowchart window. |
|
||||||
|
|
||||||
![branching block](./images/001_3_block_types/2_branching_block.png "branching block") |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Branching narrative**: |
|
||||||
When choices by the user (via the Menu Command for example) will change what Narrative Commands are executed and displayed to the user. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Build platform**: |
|
||||||
The target device for which a Unity game application will be built. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Build settings**: |
|
||||||
Build settings include the target platform, screen resolution, input devices, scenes to be included etc. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
<!-- ******************************* --> |
|
||||||
<!-- ******************************* --> |
|
||||||
<!-- ******************************* --> |
|
||||||
<!-- ******************************* --> |
|
||||||
<!-- ******************************* --> |
|
||||||
<!-- ******************************* --> |
|
||||||
|
|
||||||
<!-- |
|
||||||
## Button |
|
||||||
--> |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- C ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## C |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Csharp (C#)**: |
|
||||||
A computer programming language developed by Microsoft, similar to Java. C# is one of the programming languages that can be used to write scripts for controlling Unity games. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Character**: |
|
||||||
A %Fungus gameObject allowing the personalisation of narrative, allowing characters to have names, special colours for their text on screen, and a range of different named images so character images can be displayed corresponding to the content of their dialog. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Clickable Sprite**: |
|
||||||
A 2D image on screen that has been code to do something when clicked with the mouse or selected by the trackpad. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Coding / Scripting**: |
|
||||||
Writing lines of computer code to control execution of a computer program, such as a Unity game (as opposed to using a visual language such as %Fungus Flowcharts). |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Command**: |
|
||||||
An instruction for the Unity game engine to do something, examples are to play or stop a sound, or to display some text to the user in a dialog. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Command category**: |
|
||||||
THe %Fungus commands are grouped according to what kind of action they will lead to. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Command property panel**: |
|
||||||
When a Block is selected in a %Fungus Flowchart, the top-half of the Inspector window will show the properties and list of Commands for that Block. When one of the Commands is selected, that its properties are displayed in the bottom-half of the Inspector window. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Condition**: |
|
||||||
Conditions are tests that are either "TRUE" or "FALSE" at a particular point in time. Different Commands can be defined to be executed depending on the value of a condition test in a %Fungus Block. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**CSV**: |
|
||||||
Comma Separated Variable - a computer file format where the values of rows and columns are recorded, in a form that can be loaded into a spreadsheet.. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Custom strings**: |
|
||||||
As well as the automatically generated rows for each Say, Menu, Command etc., you can also add your own rows to the localisation file using any string id you want. To use these custom strings, you use variable substitution. |
|
||||||
|
|
||||||
For example, say you have a custom string called "PlayerName", you can put {$PlayerName} in any Say text to substitute the correct localised value from the localisation file. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- D ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## D |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Draggable Sprite**: |
|
||||||
A 2D image on screen that has been code to do something when clicked-and-dragged with the mouse or trackpad. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**DragTarget Sprite**: |
|
||||||
A 2D image that has been defined to execute some action(s) if a Draggable Sprite is dragged and released over it. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- E ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## E |
|
||||||
|
|
||||||
<!-- ****************************** --> |
|
||||||
**Editor**: |
|
||||||
An application allowing the editing of game resources. The Unity Editor has multiple windows for viewing / editing properties of files, scene contents, UI dialogs, camera settings etc. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Event Handler**: |
|
||||||
A %Fungus Block or a Unity coded "method" that will be executed when a particular "Event" occurs. For example when the "SPACE" key is pressed the game should respond to the user having executed a spell or fired a gun or whatever. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Event block**: |
|
||||||
Any Block whose execution is triggered by an Event, such as Game Started or Key Preses. |
|
||||||
|
|
||||||
Note: Event Blocks are displayed as rounded blue rectangles in the Flowchart window. |
|
||||||
|
|
||||||
![event block](./images/001_3_block_types/1_event_block.png "event block") |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Excel**: |
|
||||||
A computer spreadsheet application program from Microsoft, part of the MS Office suite. |
|
||||||
|
|
||||||
see the Microsoft website: [Microsoft Excel application] |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Execution**: |
|
||||||
The running of Commands or statements in a computer script / program. Making the computer do something. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- F ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## F |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Float variable**: |
|
||||||
A variable that stores decimal numbers, such as 5.5, -0.11 etc. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Flowchart**: |
|
||||||
A %Fungus Flowchart contains a set of Blocks, each containing Commands to be executed. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Flow control**: |
|
||||||
A general term referring to how a computer decides what to do next. So it is deciding which %Fungus Command or Unity code statement to execute next. Typical Flow commands include decision choices such as loops or IF-conditions etc. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Flowchart item id**: |
|
||||||
The unique number that is created for each Block of a Flowchart. This ID is used fpr serialisation (save and load) purposes, and not usually seen by the developer. |
|
||||||
|
|
||||||
<!-- *************************** --> |
|
||||||
**Flowchart Localization id**: |
|
||||||
A special, unique name, used for associating language localization data for each %Fungus game project. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Flowchart Message**: |
|
||||||
A Message is basically a piece of text, but one that plays the role of being able to act as a 'trigger event' to cause Blocks to start executing. |
|
||||||
|
|
||||||
Messages can be sent (via the ```Flow | Send Message``` Command), either to the current Flowchart, or to **ALL** Flowcharts. One of the Events that can be defined to start the execution of a Block is if a particular Message has been received by the Flowchart. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Flowchart Window**: |
|
||||||
A special window available in the Unity Editor for editing and working with %Fungus Flowcharts and their Blocks. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- I ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## I |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Integer variable**: |
|
||||||
A variable that stores whole numbers, such as 100, 2, 0, -2 etc. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- L ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## L |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Landscape orientation**: |
|
||||||
An orientation of an image or computer screen, where the width is greater than the height. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Language Column**: |
|
||||||
When you first export the localization .csv (Comma-Separated-Variable) file it has 3 columns (Key, Description, Standard). |
|
||||||
When you want to add a new language to the file you add a new column for that language. You can use whatever column name you like, though it's typical to use two letter language codes (FR, ES, DE, etc.). |
|
||||||
|
|
||||||
The Set Language command is provided with the name of the column for the language you wish to use in %Fungus. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Libre Office**: |
|
||||||
A free and Open Source alternative to Microsoft Office. |
|
||||||
|
|
||||||
Lean more and download from: [LibreOffice.org] |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Localization**: |
|
||||||
Localization and Internationalization refer to coding a game in such a way that it can be deployed in a manner supporting playing and interactions in multiple human languages. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Logging**: |
|
||||||
The ```Scripting | Debug Log``` Command allows the writing ('logging') of messages to the Console window while a scene is running. Logs provide a record of what has happened when the game is running, useful for checking what happened was what was intended, or for debugging (hunting down where errors are located). |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- M ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## M |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Mecanim Animation**: |
|
||||||
A Unity file representing an animation clip or pose. Animators manage the changes or mixing between one Animation clip and another. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Mecanim Animator**: |
|
||||||
A Unity state-chart controller, which manages animated gameObjects - deciding when and how quickly objects should 'blend' into a different state or animation. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Menu Dialog**: |
|
||||||
The UI elements (background / lines / text) that define the visual style of how the Text of Menu Commands is presented to the user. |
|
||||||
|
|
||||||
![menu running](./images/011_menu_maths/9_menu_running.png "menu running") |
|
||||||
|
|
||||||
%Fungus provides a default Menu Dialog, but custom variations can be defined, for different games / scenes / characters etc. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- O ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## O |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Order in layer**: |
|
||||||
If multiple objects have been assigned to the same Unity Sorting Layer, then the numeric value of the Order in Layer property determines their visual sorting order (what appears in front of what). |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- P ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
##P |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Parallax Sprite**: |
|
||||||
The use of 2D sprites, moving at different speeds, to give the impression of 3D movement (where sprites for objects meant to be further away from the user move more slowly than objects closer to the game object. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Platform build**: |
|
||||||
Refers to the device and type of application that the Unity editor will create. Examples are stand alone applications for Windows, Mac OS, iOS phone, Android phone, X-BOX etc. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Portrait**: |
|
||||||
The %Fungus Portrait Command is used to make the game display one of the Character Portrait images on the Stage. A particular image can be selected, and it can be made to move on/off stage. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Portrait orientation**: |
|
||||||
An orientation of an image or computer screen, where the height is greater than the width. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Procedural Sound**: |
|
||||||
A method of creating sounds using computer algorithms. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Private / Public variables**: |
|
||||||
A Private variable as one that can only be accessed by Cmmands in Blocks in that Flowchart. A Public variable is one that can be accessed by Commands in Blocks in other Flowcharts as well as its own one. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- S ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## S |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Save profile**: |
|
||||||
The Save Profile is basically a string that gets prepended to the key used to save & load variables in PlayerPrefs. This allows you to create separate save profiles using different names. For example, player 1's save data might use the Save Profile 'Chris', while player 2's data would use the Save Profile 'Matt', and their data can be saved / loaded independently. |
|
||||||
|
|
||||||
The typical workflow would be: |
|
||||||
|
|
||||||
1. Choose a suitable value fo the Save Profile (e.g. "player1") |
|
||||||
|
|
||||||
2. Set Save Profile. |
|
||||||
|
|
||||||
3. Save Variable(s). |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Say Dialog**: |
|
||||||
The UI elements (background / lines / text) that define the visual style of how the Story Text of Say Commands is presented to the user. |
|
||||||
|
|
||||||
![story text output](./images/010_say_command/4_scene_running.png "story text output") |
|
||||||
|
|
||||||
|
|
||||||
%Fungus provides a default Say Dialog, but custom variations can be defined, for different games / scenes / characters etc. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Scenes**: |
|
||||||
Unity Scenes are like chapters in a book, or "screens" in a game, or "levels" in a game. They allow the logic of a computer game to be broken into components. The "gameObjects" in a scene determine what software components will be created when a Scene starts running (others may be created or deleted once the Scene has started). |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Screen aspect ratio**: |
|
||||||
The relationship of the width of an image or screen to its height. Typical rations include 4:3 ad 16:10. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Screen resolution**: |
|
||||||
The number of pixels wide and high a window or device supports. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Sorting layer**: |
|
||||||
Unity 2D objects are assigned to a "Sorting Layer". This allows images/text to be assigned to layers such as Background, Foreground, Middleground, UI (on top of everything) etc. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Spine**: |
|
||||||
Spine is a third-party 2D animation system from [EsotericSoftware.com]. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Spine Animation**: |
|
||||||
Animation clip based on the Spine 2D system, that can be controlled from %Fungus Commands (once the Unity Spine and %Fungus Spine add-on packages have been installed). |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Sprites**: |
|
||||||
2D Images, that may be hidden / revealed. Sprite may be moved through %Fungus Commands, or Unity code. Sprites can also be defined to be "draggable" by the users computer mouse pointer or mobile device touch gestures. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Stage**: |
|
||||||
A %Fungus gameObject in the scene, used to define the position and start-end movements of Character Portrait images controlled by %Fungus Portrait Commands. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Standard block**: |
|
||||||
A %Fungus Block whose execution is **not** triggered by an event (so it is not an Event Block), and which does **not** cause the execution of 2 or more other Blocks (so is **not** a Branching Block). |
|
||||||
|
|
||||||
Note: Standard Blocks are displayed as yellow rectangles in the Flowchart window. |
|
||||||
|
|
||||||
![standard block](./images/001_3_block_types/3_standard_block.png "standard block") |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Standard Text**: |
|
||||||
When you export the localization file, there is a Standard Text field. This is populated with the text that has been entered into the Say, Menu, etc. text fields in the Unity editor. In normal usage, this field is in the localisation file for reference so localizers know what text needs to be translated. For example, if the project is drafted using English, then the text in Say, Menu Commands etc. would be in English, and in the exported localization file this text would appear in the Standard Text fields. |
|
||||||
|
|
||||||
Note, if you use the Set Language command with an empty language string then the values in the Standard Text field will be used when %Fungus runs. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Story Text Tags**: |
|
||||||
Special instructions that can be embedded inside the Story Text of Say commands. Examples are tags that start/stop playing a sound, or send a message. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**String ID**: |
|
||||||
This is an automatically generated ID code, that is stored in the first column of the localisation file. These IDs are generated automatically when you export the strings using the Localization object. |
|
||||||
|
|
||||||
The ID is needed since every localised text string needs a unique identifying name so that it can be mapped it back to the Say, Menu, etc. command that references it. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**String variable**: |
|
||||||
A variable that stores text characters, such as the player's name, or colour of the potion they are carrying. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- T ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## T |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Tag**: |
|
||||||
Special characters that can be inserted into %Fungus Say Commands, to control other aspects of the scene, such as the playing of a sound, or the shaking of the camera, or the sending of a message to cause other Blocks to start executing. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- U ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## U |
|
||||||
|
|
||||||
<!-- ****************************** --> |
|
||||||
**Unity**: |
|
||||||
A game engine and IDE (Interactive Development Environment) - with program code editor, and audio/graphics editing facilities. Able to build applications for deployment to Windows, Mac, Linus, iOS, Android, XBox etc. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Unity UI**: |
|
||||||
The building of visual interfaces for computer programs deployed by Unity. |
|
||||||
|
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Usfxr**: |
|
||||||
A system for generating sound effects from mathematical parameters. |
|
||||||
|
|
||||||
Built into %Fungus and based on the open source project at: [Usfxr at GitHub] |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- V ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## V |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Variable**: |
|
||||||
A named memory location, from which values can be retrieved at a later date. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Variable default value**: |
|
||||||
A "default" value refers to the value given to a variable automatically, if no particular value is specified. In the Variables section at the bottom of the Flowchart window, as well as defining the names and data types of variables, you can also set default values here. |
|
||||||
|
|
||||||
![default variable value](./images/001_variables/1_default_values.png "default variable value") |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Variables Panel**: |
|
||||||
The very bottom section of the Flowchart window is where variables (such as score, playerName, carryingGreenKey etc.) can be defined for use in %Fungus Commands. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Variable saving**: |
|
||||||
The saving of the value of a variable to the devices 'disk'. So when another Unity Scene is loaded, the saved value can be loaded from saved memory. The saved value can also be loaded the next time the game application is executed on a device. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Variable substitution**: |
|
||||||
|
|
||||||
This relates to the use of a tag in the Story Text of a Say Command, whereby the contents of a Variable will be inserted into that part of the text for the Say Command |
|
||||||
|
|
||||||
```{$VarName} Substitute variable``` |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**View, Move, Rotate, Scale & Rectangle tools**: |
|
||||||
The core tools offered in the Unity editor for changing basic properties of 2D and 3D objects |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**View**: |
|
||||||
A %Fungus gameObject that helps ensure good visual experience regardless of device aspect ration, and used for camera movements and control by %Fungus Commands. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Voice over**: |
|
||||||
A sound clip file containing recorded audio that corresponds to text being displayed on screen. |
|
||||||
|
|
||||||
<!-- ------------------------ --> |
|
||||||
<!-- ---------- W ----------- --> |
|
||||||
<!-- ------------------------ --> |
|
||||||
|
|
||||||
## W |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**Webplayer**: |
|
||||||
A Build option in Unity that creates an application that can play inside web pages that have the Unity Web Player plug-in installed. The need fo the plug-in and web-player option are being replaced by the WebGL Unity build facility. |
|
||||||
|
|
||||||
<!-- ******************************* --> |
|
||||||
**WebGL**: |
|
||||||
[WebGL] is a technology available in modern browsers that allows for interactive, high quality computer graphics within web pages, without the need for any special plug-ins (such as Flash or the Unity Player). It promised to be the future for multimedia web page content and interaction. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[WebGL]: https://en.wikipedia.org/wiki/WebGL |
|
||||||
[LibreOffice.org]: http://www.libreoffice.org/ |
|
||||||
[EsotericSoftware.com]: http://esotericsoftware.com/ |
|
||||||
[Usfxr at GitHub]: https://github.com/zeh/usfxr |
|
||||||
[Microsoft Excel application]: http://products.office.com/excel |
|
@ -1,62 +0,0 @@ |
|||||||
# Installation # {#installation} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
This page explains how to download and install Unity and %Fungus. |
|
||||||
|
|
||||||
# Video Tutorial # {#video} |
|
||||||
|
|
||||||
@htmlonly |
|
||||||
<div align="center"> |
|
||||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/BQRdRz9Q5VY" frameborder="0" allowfullscreen></iframe> |
|
||||||
</div> |
|
||||||
@endhtmlonly |
|
||||||
|
|
||||||
# How do I install Fungus? # {#how_install} |
|
||||||
|
|
||||||
1. Install the latest version of [Unity]. |
|
||||||
3. Launch Unity and create a new Project by selecting File > New Project. |
|
||||||
4. Select 'Use Defaults for 2D' when creating the new project. |
|
||||||
|
|
||||||
## To install %Fungus from the Asset Store (recommended): |
|
||||||
|
|
||||||
1. Open the Asset Store window in Unity |
|
||||||
2. Search for %Fungus on the [Asset Store] |
|
||||||
3. Download and import %Fungus to your project using the Asset Store window. |
|
||||||
|
|
||||||
## To install %Fungus from the latest release on Github: |
|
||||||
|
|
||||||
1. Download the latest %Fungus .unitypackage from [Github] |
|
||||||
2. Import %Fungus into the new project by selecting Assets > Import Package > Custom Package. |
|
||||||
|
|
||||||
# First steps # {#first_steps} |
|
||||||
|
|
||||||
1. Display the Flowchart editor window by selecting Window > Tools > %Fungus > Flowchart Window. |
|
||||||
2. For convenience, you should dock the Flowchart window somewhere in the editor window. |
|
||||||
3. In the project window, open The Hunter example scene (FungusExamples > TheHunter > TheHunter.unity). |
|
||||||
4. Press play and click through the example game. |
|
||||||
|
|
||||||
Try playing the other example scenes and watch how the gameplay is controlled by the flowchart in the %Fungus Script window. |
|
||||||
|
|
||||||
# How do I upgrade? # {#upgrade} |
|
||||||
|
|
||||||
To upgrade an existing project to the latest version of %Fungus. |
|
||||||
|
|
||||||
1. Take a backup of your project. No really, do it! |
|
||||||
2. We recommend updating to the latest version of [Unity]. |
|
||||||
3. Delete the %Fungus and FungusExamples folders from your project. |
|
||||||
4. Download and import the latest version of %Fungus. |
|
||||||
|
|
||||||
We try to maintain backwards compatibility between releases but sometimes breaking changes are necessary. If you're having trouble upgrading your project just ask for assistance on the forum. |
|
||||||
|
|
||||||
# System Requirements # {#system_requirements} |
|
||||||
|
|
||||||
- We recommend installing the latest version of [Unity]. |
|
||||||
- %Fungus requires at least Unity 5.0 and is not compatible with Unity 4.x or earlier. |
|
||||||
- %Fungus works with both the PC & Mac versions of Unity |
|
||||||
- %Fungus works with both the free Personal and Professional editions of Unity |
|
||||||
- Official Unity list of [system requirements]. |
|
||||||
|
|
||||||
[Unity]: http://unity3D.com/get-unity |
|
||||||
[Asset Store]: http://u3d.as/f0T |
|
||||||
[Github]: https://github.com/FungusGames/Fungus/releases/latest |
|
||||||
[system requirements]: http://unity3d.com/unity/system-requirements |
|
@ -1,35 +0,0 @@ |
|||||||
# Narrative Text Tags # {#narrative_text_tags} |
|
||||||
|
|
||||||
The following tokens can be used within Story Text to do things such as change the styling of text or clear the contents of a dialog area on input and much more. You can see this list in the editor by pressing the Tag Help button in the Say command. |
|
||||||
|
|
||||||
* {b} Bold Text {/b} |
|
||||||
* {i} Italic Text {/i} |
|
||||||
* {color=red} Color Text (color){/color} |
|
||||||
* {size=30} Text size {/size} |
|
||||||
* {s}, {s=60} Writing speed (chars per sec){/s} |
|
||||||
* {w}, {w=0.5} Wait (seconds) |
|
||||||
* {wi} Wait for input |
|
||||||
* {wc} Wait for input and clear |
|
||||||
* {wvo} Wait for voice over line to complete |
|
||||||
* {wp}, {wp=0.5} Wait on punctuation (seconds){/wp} |
|
||||||
* {c} Clear |
|
||||||
* {x} Exit, advance to the next command without waiting for input |
|
||||||
* {vpunch=10,0.5} Vertically punch screen (intensity,time) |
|
||||||
* {hpunch=10,0.5} Horizontally punch screen (intensity,time) |
|
||||||
* {punch=10,0.5} Punch screen (intensity,time) |
|
||||||
* {flash=0.5} Flash screen (duration) |
|
||||||
* {audio=AudioObjectName} Play Audio Once |
|
||||||
* {audioloop=AudioObjectName} Play Audio Loop |
|
||||||
* {audiopause=AudioObjectName} Pause Audio |
|
||||||
* {audiostop=AudioObjectName} Stop Audio |
|
||||||
* {m=MessageName} Broadcast message |
|
||||||
* {$VarName} Substitute variable |
|
||||||
|
|
||||||
Examples: |
|
||||||
|
|
||||||
``` |
|
||||||
This is a line of dialog. |
|
||||||
{wc} |
|
||||||
This is another line of dialog with some {b}bold{/b} styling. |
|
||||||
This is another line of dialog with some {color=blue}blue{/b} text. |
|
||||||
``` |
|
@ -1,222 +0,0 @@ |
|||||||
# Playing Audio # {#playing_audio} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
Almost every game benefits from some sound! Often we categorise audio clips into three kinds: |
|
||||||
|
|
||||||
1. Music |
|
||||||
2. Sound effects |
|
||||||
3. Speech |
|
||||||
|
|
||||||
%Fungus provides straightforward ways to include all 3 kinds of audio clip in your game, using the techniques presented here. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Sources of free audio # {#free_audio} |
|
||||||
Before you can **add** audio clips to a game you need to get some audio clips. Here are some sources of audio clips to use when learning about audio in %Fungus, in case you don't have some of your own to hand. |
|
||||||
|
|
||||||
The following are some good places online to fine music and sound effects for games. Some are free for any use (including commerical), some are just free for personal use. As always, check the licence of media assets before using them for any commerical products ... |
|
||||||
|
|
||||||
- [Freesound.org] |
|
||||||
- lots of creative commons and royalty free sounds at [SoundBible.com] |
|
||||||
- a great list of audio sources in peoples answers to questions at [Answers.unity3d] and [StackOverflow.com] |
|
||||||
- mixture of free and paid music sources at [PixelProspector.com] |
|
||||||
|
|
||||||
You'll find a range of audio clips included inside the %Fungus Examples folders: |
|
||||||
|
|
||||||
![%Fungus Examples audio] |
|
||||||
|
|
||||||
# Adding audio to your project # {#adding} |
|
||||||
Once you have some audio clips on your computer, you need to import them into your Unity project. |
|
||||||
|
|
||||||
## Method 1 (menu) |
|
||||||
You can do this one clip at a time, by choosing menu: ```Assets | Import New Asset...``` and navigating to and selecting each clip. |
|
||||||
|
|
||||||
## Method 2 (drag-drop) |
|
||||||
Alternatively you can **drag** files or entire folders into your Unity Project window, and Unity will make a copy of, and then import the dragged files: |
|
||||||
|
|
||||||
![drag audio folder into Unity] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Working with audio # {#working} |
|
||||||
There are 3 main ways to work with audio in %Fungus games. These are the Audio commands, the Say command, and gameObjects containing Unity Audio Source components. All three are discussed below: |
|
||||||
|
|
||||||
![audio big picture] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Fungus audio commands # {#commands} |
|
||||||
The range of audio **Commands** you can add to a Block are as follows: |
|
||||||
|
|
||||||
![%Fungus audio commands] |
|
||||||
|
|
||||||
Also you can declare an audio clip that contains the speech voiceover to correspond to text displayed with a **Say** command: |
|
||||||
|
|
||||||
![%Fungus audio commands2] |
|
||||||
[%Fungus audio commands2]: ./playing_audio/003_fungus_audio_commands/2_say_voiceover_clip.png "%Fungus audio commands" |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
## Play Music command |
|
||||||
Music sound clips loop, so they are restarted once they have finished playing. Often the first Command in a Block is a **Play Music** Command. Add music to a Block as follows: |
|
||||||
|
|
||||||
1. (if you have not already done so: Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart). |
|
||||||
2. Add a Play Music Command to the current Block by clicking the Add Command (plus-sign "+" button) in the Inspector, and then choosing menu: ```Audio | Play Music```. |
|
||||||
3. Ensure the Play Music command is selected (green highlight) in the top of the Inspector, and then drag the desired music clip file into the "Music Clip" property in the bottom half of the Inspector: |
|
||||||
![Add Play Music command] |
|
||||||
4. Change the volume as desired |
|
||||||
(the default is 1, values are between 0.0 and 1.0, representing percentages of volume from 0% - 100%). |
|
||||||
5. Play your scene - the music clip should play, and keep looping. |
|
||||||
|
|
||||||
NOTE: If you wish to start playing the music clip from a known time-point (rather than from the beginning), then enter the desired timepoint in the Inspector property "At Time" for your Play Music command. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
## Play Sound command |
|
||||||
The %Fungus Play Sound Command will play a stated audio clip once. With your Flowchart Block selected, click the Add Command button in the Inspector and choose menu: ```Audio | Play Sound```. Drag in a sound effect (we chose the BearRoad sound from the Hunter example): |
|
||||||
|
|
||||||
![Play Sound command] |
|
||||||
|
|
||||||
Play the scene, you should hear your sound effect play once. |
|
||||||
|
|
||||||
Note. The default %Fungus setting is for the sound effect to start playing, and while it is playing the next Command in the Block will start executing. However, you if you check the "Wait Until Finished" checkbox, then %Fungus will wait until the sound effect has finished playing, before moving on to execute the next Command in the block: |
|
||||||
|
|
||||||
![wait until finished] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
## Set Audio Volume command |
|
||||||
|
|
||||||
The default volume for music being played is 1 (100%). However, we can change this easily with the Set Audio Volume command. Do the following: |
|
||||||
|
|
||||||
1. (if you have not already done so: Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart). |
|
||||||
2. Rename this Block "Play Music". |
|
||||||
3. Add a Play Music Command to the current Block, then drag the desired music clip file into the "Music Clip" property in the bottom half of the Inspector: |
|
||||||
![sherlock music] |
|
||||||
4. If you play the scene now, the music will play at full volume (1 = 100%). |
|
||||||
5. Now create a second Block in the Flowchart window named "quieter". |
|
||||||
![new block quieter] |
|
||||||
6. Add to this new Block a Set Audio Volume Command. |
|
||||||
![Add audio volume command] |
|
||||||
7. In the properties of the Set Audio Volume Command set the volume to 0.25 (25%). |
|
||||||
![set audio volume quieter] |
|
||||||
8. Select the "Play Music" block, and add a Menu command by clicking the plus-sign add Command button in the Inspector and then choosing menu: ```Narrative | Menu```. |
|
||||||
![add menu command] |
|
||||||
9. Set the Text Property to "Make Quieter" and the Target Block to Block "Quieter": |
|
||||||
![menu properties] |
|
||||||
10. In the Flowchart window you should now see a green arrow, showing that a Command in Block "Play Music" passes control to Block "quieter": |
|
||||||
![green arrow] |
|
||||||
11. When you run the scene, the music will start playing at full volume, then when y ou click the "Make Quieter" button, control will pass to the "quieter" block, and you'll hear the music become much quieter after the Set Audio Volume Command has been executed with a value of 25% (0.25): |
|
||||||
![set audio running] |
|
||||||
|
|
||||||
## The 3 Unity audio concepts |
|
||||||
Unity has 3 different kinds of Audio 'object', that it is worth understanding when working with audio in %Fungus (or any other) Unity project: |
|
||||||
|
|
||||||
1. Audio Clip |
|
||||||
2. Audio Listener |
|
||||||
3. Audio Source |
|
||||||
|
|
||||||
### Unity Audio Clip |
|
||||||
Unity uses the term Audio "Clip" to refer to the physical sound files (.mp3, .wav, .ogg etc.) that are stored in your Project folder. It is these Audio Clip files that you drag and drop into the "Music Clip" and "Sound Clip" properties in the Inspector Window, when creating Play Music and Play Sound Commands in a %Fungus Block. |
|
||||||
|
|
||||||
### Unity Audio "Listener" |
|
||||||
Basically, if you want sound to be played there must be an Audio Listener component inside one of the gameObjects in your scene. The Main Camera of a scene has one by default, so in most cases you just leave this alone and can rest assured that you have an Audio Listener. |
|
||||||
|
|
||||||
If a scene has no Audio Listener in any gameObject, then no audio will be heard by the user of the game, regardless of how many music and sound clips might be playing. |
|
||||||
|
|
||||||
Sometimes you may add gameObjects to your scene that contain another Audio Listener component. In this case, Unity will present a warning message stating that more than 1 Audio Listener is present in the scene. If you see such a message, then its best to resolve this problem by disabling all but one Audio Listener... |
|
||||||
|
|
||||||
If you are working with a 3D game, and/or you wish to present a sophisticated stereo sound experience for your user, then you may need to learn about 3D audio. In such games the 3D "position" of the gameObject containing the Audio Listener becomes important - but don't worry about this if you are just getting started with audio in %Fungus. For 3D effects the Audio Listener is like an "electronic ear", so its location determines things like how loud a sound is played (distance from "ear") and left-right stereo balance (which "side" audio is to the "ear") etc. |
|
||||||
|
|
||||||
### Unity Audio Source |
|
||||||
In Unity the link between an Audio Clip (music/sound) file that we wish to be played, and the Audio Listener in the scene is a Unity Audio Source component of a gameObject. However, in most cases %Fungus creates one of these if needed, so we don't need to worry about them! |
|
||||||
|
|
||||||
However, for sophisticated control of music and sound and speech in your game there is the facility to make %Fungus have detailed control of Unity Audio Sources. It is an Audio Source component that controls how and when and which part of an audio clip is playing (and whether it should loop or not), and whether it is playing or paused, and when resuming should continue from where paused or restart. The volume of a playing clip can also be controlled by properties of an Audio Source. |
|
||||||
|
|
||||||
Learn more about audio in Unity at the [Unity Manual Audio Page]. |
|
||||||
<!-- **************************************** --> |
|
||||||
## Control Audio command |
|
||||||
|
|
||||||
The %Fungus Audio Commands cover all common music and sound effect actions, for specialist audio work you may need to access the raw (and complicated) power of Unity audio. The %Fungus Command "Control Audio" lets %Fungus Blocks communicate directly with Unity Audio Source components in any gameObject in the current scene, so your wizard audio team member can do what they need to do with the Unity toolkit, and you can still control playing / looping / volume etc. of the audio in those complex gameObjects. |
|
||||||
|
|
||||||
The Control Audio Command offers five actions that can be communicated to Unity Audio Source components: |
|
||||||
|
|
||||||
![control audio options] |
|
||||||
|
|
||||||
We'll learn about this with a simple Unity gameObject that plays a bear sound two times, first at full volume and then reduces the volume before playing a second time, using three "Control Audio" %Fungus Commands. Do the following: |
|
||||||
|
|
||||||
1. (setup) If you have not already done so: Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename this Block "Control Audio". |
|
||||||
3. In the Hierarchy Window create a new Empty gameObject, choose menu: ```Create | Create Empty```: |
|
||||||
![create empty] |
|
||||||
4. Rename this new empty gameObject "GameObject - bear sound" (or whatever sound name makes sense in your project). |
|
||||||
5. Locate your desired audio clip file in the Project window, and (with "GameObject - bear sound" selected), drag a reference to the audio clip from the Project window into the Inspector: |
|
||||||
![rename empty] |
|
||||||
6. An Audio Source component should now be added in the Inspector to "GameObject - bear sound". Un-check the Play On Awake property in the Inspector (to stop this sound from playing as soon as the scene begins - **we** want to be in control of this Audio Source object...): |
|
||||||
![audio source added] |
|
||||||
7. With your Flowchart Block selected, click the Add Command button in the Inspector and choose menu: ```Audio | Control Audio```. |
|
||||||
![Control Audio command] |
|
||||||
. Drag the "GameObject - bear sound" gameObject from the Hierarchy into the Audio Source property in the Inspector, and select the Wait Until Finished checkbox (so %Fungus will wait for the sound to finish playing before moving on): |
|
||||||
![drag gameobject] |
|
||||||
8. Note that the default Control action for a Control Audio Command is "Play Once" - we'll leave this property unchanged, since we want our bear sound inside our gameObject to be played once. |
|
||||||
9. If you run the scene now, you'll hear the bear sound play once at full volume. |
|
||||||
10. Since all three of the Control Audio commands we need use a link to "GameObject - bear sound" the fastest workflow is to **duplicate** each Command, and just change the bits we need. So duplicate your Control Audio command by clicking the Duplicate Command button: |
|
||||||
![duplicate command] |
|
||||||
11. In the newly copied command, change the Command action to Change Volume, and choose a volume of 0.25 (25%): |
|
||||||
![set volume] |
|
||||||
12. Once again, make a duplicate of the first Control Audio Command (that Plays the sound). Drag this new Command to be last in the sequence of commands. |
|
||||||
![another play again command] |
|
||||||
13. Now when you play the scene, first the bear sound linked to in the Audio Source component of gameObject "GameObject - bear sound" should play at full volume, then (after having its volume reduced to 25%) it should play a second time at a much reduced volume. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Audio Tags # {#tags} |
|
||||||
|
|
||||||
Since often dialog authors will know just what sound effects or music they wish to associate with their characters utterances, %Fungus allows audio-related 'tags' to be embedded in the text of Say Commands. There are four audio related tags: |
|
||||||
|
|
||||||
{audio=AudioObjectName} Play Audio Once |
|
||||||
{audioloop=AudioObjectName} Play Audio Loop |
|
||||||
{audiopause=AudioObjectName} Pause Audio |
|
||||||
{audiostop=AudioObjectName} Stop Audio |
|
||||||
|
|
||||||
Using tags like this make it important to carefully **name** the gameObjects in the Hierarchy window. To explore how to control sounds in gameObjects do the following: |
|
||||||
|
|
||||||
1. (setup) If you have not already done so: Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename this Block "Say audio tags". |
|
||||||
3. In the Hierarchy Window create a new Empty gameObject, choose menu: ```Create | Create Empty```: |
|
||||||
![create empty] |
|
||||||
4. Rename this new empty gameObject "audioBearRoar", or whatever sound name makes sense in your project, but avoid spaces in the name of this game object. |
|
||||||
5. Locate your desired audio clip file in the Project window, and (with "audioBearRoar" selected), drag a reference to the audio clip from the Project window into the Inspector. |
|
||||||
6. Un-check the Play On Awake property in the Inspector for the Audio Source component (to stop this sound from playing as soon as the scene begins - **we** want to be in control of this Audio Source object...): |
|
||||||
7. With your Flowchart Block selected, click the Add Command button in the Inspector and choose menu: ```Narrative | Say```. Enter the following for the Story Text property of this Say Command "... and then the bear roared loudly {audio=audioBearRoar}": |
|
||||||
![Say audio tag] |
|
||||||
8. Run your scene - the bear sound will play after the text has been displayed: |
|
||||||
![Say audio tag - output] |
|
||||||
|
|
||||||
[Freesound.org]: http://www.freesound.org/ |
|
||||||
[Answers.unity3d]: http://answers.unity3d.com/questions/7743/where-can-i-find-music-or-sound-effects-for-my-gam.html |
|
||||||
[SoundBible.com]: http://soundbible.com/royalty-free-sounds-1.html |
|
||||||
[StackOverflow.com]: http://stackoverflow.com/questions/1210286/where-can-i-find-free-sound-effects-for-a-game |
|
||||||
[PixelProspector.com]: http://www.pixelprospector.com/the-big-list-of-royalty-free-music-and-sounds-free-edition/ |
|
||||||
[Unity Manual Audio Page]: http://docs.unity3d.com/Manual/AudioOverview.html |
|
||||||
|
|
||||||
[%Fungus Examples audio]: ./playing_audio/001_clips/0_audio_in_examples.png "%Fungus Examples audio" |
|
||||||
[drag audio folder into Unity]: ./playing_audio/002_audio_into_unity/1_drag_folder.png "drag audio folder into Unity" |
|
||||||
[audio big picture]: ./playing_audio/000_big_picture/1_big_picture.png "audio big picture" |
|
||||||
[%Fungus audio commands]: ./playing_audio/003_fungus_audio_commands/1_audio_commands.png "%Fungus audio commands" |
|
||||||
[Add Play Music command]: ./playing_audio/004_play_music/1_add_playmusic_command.png "Add Play Music command" |
|
||||||
[Play Sound command]: ./playing_audio/005_play_sound/1_play_sound.png "Play Sound command" |
|
||||||
[wait until finished]: ./playing_audio/005_play_sound/2_wait_until_finished.png "wait until finished" |
|
||||||
[sherlock music]: ./playing_audio/006_set_audio_volume/1_drag_music_clip.png "sherlock music" |
|
||||||
[new block quieter]: ./playing_audio/006_set_audio_volume/2_second_block.png "new block quieter" |
|
||||||
[set audio volume quieter]: ./playing_audio/006_set_audio_volume/3_quieter.png "set audio volume quieter" |
|
||||||
[add menu command]: ./playing_audio/006_set_audio_volume/5_add_menu.png "add menu command" |
|
||||||
[menu properties]: ./playing_audio/006_set_audio_volume/6_link_to_quieter.png "menu properties" |
|
||||||
[green arrow]: ./playing_audio/006_set_audio_volume/7_green_arrow.png "green arrow" |
|
||||||
[set audio running]: ./playing_audio/006_set_audio_volume/8_output.png "set audio running" |
|
||||||
[Add audio volume command]: ./playing_audio/006_set_audio_volume/4_audio_volume_command.png "Add audio volume command" |
|
||||||
[control audio options]: ./playing_audio/007_control_audio/6_control_audio_actions.png "control audio options" |
|
||||||
[create empty]: ./playing_audio/007_control_audio/1_create_empty.png "create empty" |
|
||||||
[rename empty]: ./playing_audio/007_control_audio/2_rename.png "rename empty" |
|
||||||
[audio source added]: ./playing_audio/007_control_audio/3_drag_clip.png "audio source added" |
|
||||||
[Control Audio command]: ./playing_audio/007_control_audio/4_add_command.png "Control Audio command" |
|
||||||
[drag gameobject]: ./playing_audio/007_control_audio/5_drag_gameobject.png "drag gameobject" |
|
||||||
[duplicate command]: ./playing_audio/007_control_audio/7_duplicate.png "duplicate command" |
|
||||||
[set volume]: ./playing_audio/007_control_audio/8_set_volume.png "set volume" |
|
||||||
[another play again command]: ./playing_audio/007_control_audio/9_final_commands.png "another play again command" |
|
||||||
[create empty]: ./playing_audio/007_control_audio/1_create_empty.png "create empty" |
|
||||||
[Say audio tag]: ./playing_audio/008_say_audio_tags/1_say_tags.png "Say audio tag" |
|
||||||
[Say audio tag - output]: ./playing_audio/008_say_audio_tags/2_output.png "Say audio tag - output" |
|
@ -1,139 +0,0 @@ |
|||||||
# Saving and Loading # {#save_system} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
# Introduction # {#save_introduction} |
|
||||||
|
|
||||||
**N.B. The Save System is currently in Beta to get feedback from the community. There will probably be breaking changes in future updates as we improve the design.** |
|
||||||
|
|
||||||
The %Fungus Save System provides an easy way to save and load the execution state of Flowcharts in your game. |
|
||||||
|
|
||||||
This [tutorial video](https://www.youtube.com/watch?v=Bd4RDcCc0lE&list=PLiMlyObJfJmUohJ_M2pJhtrNKuNECo2Uk&index=20) shows how you can quickly add saving functionality to a %Fungus game. |
|
||||||
|
|
||||||
The save system works by storing a series of Save Points as the player progresses through the game, to build up a Save History. A basic Save Menu UI is provided to allow the player to Save, Load, Restart, Rewind and Fast Forward through the Save History. |
|
||||||
|
|
||||||
![img save_history] |
|
||||||
|
|
||||||
A Save Point is created by executing a Save Point command in a Flowchart. When a Save Point is loaded back later, execution resumes from immediately after this Save Point command. The save system looks after restoring the state of Flowchart variables at each Save Point and you can also be notified when a particular Save Point has loaded via the Save Point Loaded event handler. |
|
||||||
|
|
||||||
If you are using the old commands for saving individual variables (Set Save Profile, Save Variable, Load Variable), they still work but they’re separate to this new save system. |
|
||||||
|
|
||||||
# The Save Game example scene # {#save_example_scene} |
|
||||||
|
|
||||||
To see how the save system works, open the example scene *FungusExamples/Savegame/SaveGame.unity* |
|
||||||
|
|
||||||
Press play in Unity and click through the short story. The Save Menu can be accessed at any time by clicking the small gears icon in the top right. Try saving, loading, rewinding, fast forwarding and restarting at different points as you play through the story. Also try saving the game in the middle of the story and stopping the game. Press Play again and notice that the game resumes where you left off. |
|
||||||
|
|
||||||
The Save Menu also supports an auto-saving mode where the game is saved to disk at every Save Point. You can enable this by selecting the Save Menu object and selecting the Auto Save property. The Save and Load buttons are disabled when using Auto Save. |
|
||||||
|
|
||||||
The following are the key elements that are used to implement saving in this example scene. |
|
||||||
|
|
||||||
## The Save Menu UI ## {#save_menu_ui} |
|
||||||
|
|
||||||
![img save_menu] |
|
||||||
|
|
||||||
The Save Menu object can be seen In the root of the hierarchy window. This object controls the UI menu that the player uses to interact with the save system. The Save Menu is a singleton object that persists across scene loads, so you only need to add it once in the first scene of your game. |
|
||||||
|
|
||||||
To add a Save Menu to your game, select *Tools > %Fungus > Create > Save Menu*. |
|
||||||
|
|
||||||
## Creating Save Points ## {#save_creating_save_points} |
|
||||||
|
|
||||||
Save Points are created by executing Save Point commands in a Flowchart. |
|
||||||
|
|
||||||
To see this in the example scene, ensure the Flowchart window is displayed (via *Tools > %Fungus > Flowchart Window*), then select the Flowchart object in the hierarchy window and select each of the Blocks in the Flowchart. The first command in each Block is a Save Point command (added via *Flow > Save Point*). |
|
||||||
|
|
||||||
When each Save Point command executes, it adds a new Save Point to the Save History. When you load a previously saved game, execution resumes from immediately after the Save Point command that created that Save Point. |
|
||||||
|
|
||||||
In the example scene, select the ‘Start’ Block in the Flowchart window, and select the Save Point command at the top of the command list. Notice that the Is Start Point property is enabled and that this is the only Save Point command in the Flowchart which has this option enabled. There should only ever be one Start Point in a scene. |
|
||||||
|
|
||||||
When you start a new game, %Fungus looks for a Save Point command with the Is Start Point property enabled and executes it. When loading a previously saved game, %Fungus starts execution at the relevant Save Point command and ignores the start point. |
|
||||||
|
|
||||||
This means that if your game supports saving then you should always have exactly one Save Point command with the Is Start Point property enabled in every scene. |
|
||||||
|
|
||||||
N.B. The Game Started event handler will fire for both new games and loaded games which is generally not what you want, so avoid using it in games that support saving. |
|
||||||
|
|
||||||
## Handling Save Point Loaded events ## {#save_point_loaded_events} |
|
||||||
|
|
||||||
You often need to do some additional work when a saved game loads up to ensure the scene is in the correct state. E.g. The camera might need to be moved to the appropriate location or a certain music track played at this point in the game. An easy way to do this is via the Save Point Loaded event handler. |
|
||||||
|
|
||||||
In the example scene, select the ‘Play Music 1’ Block in the Flowchart, and see it has a Save Point Loaded event handler. This will execute the Block when any of the Save Points in the Save Point Keys list loads. In this case we simply play the correct piece of music for this part of the game, but you could do any setup needed here. |
|
||||||
|
|
||||||
The Save Point Loaded event handler will also fire when a matching Save Point command executes (if the Fire Event property is enabled). This allows you to place all the scene setup commands into a single shared Block which will be called when a Save Point command is first reached or when loading a previously saved game at that Save Point. |
|
||||||
|
|
||||||
## Saving Flowchart variables ## {#save_flowchart_variables} |
|
||||||
|
|
||||||
Each Save Point can store the state of Flowchart variables at that point in time. You use a Save Data object to let the save system know which Flowcharts are to be included in this. Note that only Boolean, Integer, Float and String variables are saved at present. |
|
||||||
|
|
||||||
In the example scene, the Save Data object can be seen in the root of the hierarchy window. The Flowcharts property contains a list of the Flowchart objects to be saved in this scene. |
|
||||||
|
|
||||||
To add a Save Data object to your scene, select *Tools > %Fungus > Create > Save Data*. You can add as many Flowcharts as you like to the list, but make sure that each one has a unique name (e.g. Flowchart1, Flowchart2, etc.) or loading won’t work correctly. |
|
||||||
|
|
||||||
If you are interested in extending the save system to support saving other types of data (besides Flowchart variables), you can either modify or subclass the SaveData component to achieve this. |
|
||||||
|
|
||||||
# The Save Menu # {#save_menu_ui} |
|
||||||
|
|
||||||
The Save Menu is a simple UI which allows players to interact with the %Fungus save system. This section explains what each button does and how to configure the Save Menu properties. |
|
||||||
|
|
||||||
## Save Menu properties ## {#save_menu_properties} |
|
||||||
|
|
||||||
There are 4 main properties that you might want to configure in the Save Menu. |
|
||||||
|
|
||||||
- Save Data Key: The string key used to store save game data in Player Prefs. If you have multiple games defined in the same Unity project, use a unique key for each one. |
|
||||||
- Load On Start: Automatically load the previously saved game on startup. |
|
||||||
- Auto Save: Automatically save the game to disk at every Save Point. When this option is enabled the Save and Load buttons are disabled. |
|
||||||
- Restart Deletes Save: Delete the save data from disk when the player restarts the game. This is useful when testing your game to ensure you’re starting from a blank save state. |
|
||||||
|
|
||||||
N.B. If your game uses multiple scenes (e.g. via the Load Scene command), make sure to add all the scene to the Scenes in Build list in the [Build Settings](https://docs.unity3d.com/Manual/BuildSettings.html). |
|
||||||
|
|
||||||
## Save button ## {#save_save_button} |
|
||||||
|
|
||||||
Pressing the Save button causes the current Save History to be serialized to JSON text and written to persistent storage via the PlayerPrefs class. |
|
||||||
|
|
||||||
## Load button ## {#save_load_button} |
|
||||||
|
|
||||||
Pressing the Load button causes the previously stored JSON data to be deserialized and used to populate the Save History. The most recent Save Point is then used to restore the game state in the following order. |
|
||||||
- Load the scene stored in the Save Point (even if it’s the currently loaded scene). |
|
||||||
- Restore Flowchart variables to the saved values |
|
||||||
- Call Save Point Loaded event handlers and start Flowchart execution after the appropriate Save Point command. |
|
||||||
|
|
||||||
## Rewind and Fast Forward buttons ## {#save_rewind_button} |
|
||||||
|
|
||||||
The Rewind and Fast Forward buttons allow you to move backwards and forwards between Save Points in the Save History. |
|
||||||
|
|
||||||
Each move simply loads the Save Point stored at a particular point in the Save History. This by itself doesn’t change the Save History or write anything to persistent storage. However, if you rewind to an earlier Save Point and start playing again, the next time a Save Point command is executed it will cause all Save Points that are further ahead in time to be discarded permanently. |
|
||||||
|
|
||||||
## Restart button ## {#save_restart_button} |
|
||||||
|
|
||||||
The Restart button clears the Save History and loads the start scene. The start scene is the scene that was active when the Save Menu was first initialized. |
|
||||||
|
|
||||||
# Game Startup # {#save_game_startup} |
|
||||||
|
|
||||||
Remember that the player can choose to load or restart the game at any time. Follow these simple rules to ensure game startup is handled correctly in all cases. |
|
||||||
|
|
||||||
1. Every scene in your game should have exactly one Save Point command with the Is Start Point property enabled. If you have multiple scenes in your game, make sure each one has a start Save Point defined and that it’s the first command executed in the scene. |
|
||||||
2. Avoid using the Game Started event handler. This will only work correctly the first time the game is played, not after a saved game is loaded. After loading a saved game, you want execution to start from the Save Point, not at the beginning of your Flowchart again. |
|
||||||
3. Use the Save Point Loaded event handler when you want to execute a Block when specific Save Points are loaded. These event handlers are called before execution resumes at the Save Point command, so it gives you a chance to do setup work before gameplay resumes. |
|
||||||
|
|
||||||
# Terminology # {#save_terminology} |
|
||||||
|
|
||||||
## Save Point ## {#save_term_save_point} |
|
||||||
|
|
||||||
A Save Point is a snapshot of the state of the game at a point in time. Each Save Point records the current scene, the current point of Flowchart execution (i.e. at the Save Point command) and the current values of Flowchart variables. Only Boolean, Integer, Float and String variables are saved at present. |
|
||||||
|
|
||||||
## Save Point command ## {#save_term_save_point_command} |
|
||||||
|
|
||||||
The Save Point command is used in a Flowchart to create a Save Point at that point in the execution. Each individual Save Point command should have a unique Save Point Key. The Resume On Load option causes execution to resume from this point after the Save Point is loaded. |
|
||||||
|
|
||||||
## Save Point Key ## {#save_term_save_point_key} |
|
||||||
|
|
||||||
A Save Point Key is a unique string identifier for a single Save Point. By default, the name of the parent Block is used for the Save Point Key, but you can also use a custom key if required (e.g. multiple Save Point commands in a single Block). |
|
||||||
|
|
||||||
N.B. Each key must be unique per scene or loading won’t work correctly! |
|
||||||
|
|
||||||
## Save History ## {#save_term_history} |
|
||||||
|
|
||||||
The Save History contains a list of previously recorded Save Points, stored in chronological order. When a Save Point command is executed, a new Save Point is created and appended to the Save History. |
|
||||||
|
|
||||||
To visualize the Save History at runtime, expand the Save Menu object in the hierarchy, select Save Menu > Panel > Debug View and enable the gameobject. A summary of the Save Points in the Save History will be displayed in a text window. |
|
||||||
|
|
||||||
[img save_menu]: ./save_system/save_menu.png |
|
||||||
[img save_history]: ./save_system/save_history.png |
|
@ -1,280 +0,0 @@ |
|||||||
# Telling a story # {#telling_a_story} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
Having got up and running, here are some next steps to get you familiar with the storytelling features in %Fungus. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Adding Characters # {#characters} |
|
||||||
|
|
||||||
We can associated words spoken by the Say Command with a particular Character. Consider the following Tom and Jerry scene: |
|
||||||
|
|
||||||
``` |
|
||||||
[Tom] Where is that mouse? |
|
||||||
[Jerry] Where is that cat? |
|
||||||
[Tom] Aha... |
|
||||||
[Jerry] Arrrrggggggg!!!!!!! |
|
||||||
``` |
|
||||||
|
|
||||||
To implement the above in %Fungus we need to create and name two Characters. Do the following: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename the Flowchart Block "cat and mouse". |
|
||||||
3. Choose menu: |
|
||||||
```Tools | %Fungus | Create | Character```: |
|
||||||
![Menu create character] |
|
||||||
4. You should now see a new gameObject "Character" in the Hierarchy window, named Character. |
|
||||||
![new character] |
|
||||||
5. Ensure gameObject "Character" is selected, and edit its properties in the Inspector. Rename the gameObject to "Character1 - Tom", then in its Character (Script) component set the Name Text to "Tom" and the Name Color to red: |
|
||||||
![character tom red] |
|
||||||
6. Repeat the previous two steps to create a second character "Character2 - Jerry", then in its Character (Script) component set the Name Text to "Jerry" and the Name Color to blue: |
|
||||||
![character jerry blue] |
|
||||||
7. Now we have our two character gameObjects, we can assign them to any Say commands as appropriate. |
|
||||||
8. Create a Say Command for Tom, with text "Where is that mouse?", setting the Character of this Say command to "Character1 - Tom": |
|
||||||
![tom say where cat] |
|
||||||
9. Repeat the above step for the 3 remaining statements, for: |
|
||||||
- Jerry "Where is that cat?" |
|
||||||
- Tom "Aha..." |
|
||||||
- Jerry "Arrrrggggggg!!!!!!!" |
|
||||||
Assigning the appropriate Character for each Say Command from the menu of Character gameObjects in the Hiearchy. |
|
||||||
10. You should now have a sequence of 4 Say commands in your Block: |
|
||||||
![tom jerry conversation] |
|
||||||
11. When you run the scene you should see a sequence of statements, clearly showing who is saying what - both the character name is given, and also that name is coloured according to the properties we set for the character gameObjects (red for Tom, and blue for Jerry): |
|
||||||
![tom jerry conversation output] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Character portrait images # {#portraits} |
|
||||||
|
|
||||||
If you add one or more portrait images to a character, then each Say command for that character can define which of those portrait images should be displayed, alongside the (colored) name of the Character. |
|
||||||
|
|
||||||
To add portrait images to a character do the following: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename the Flowchart Block "The case of the missing violin". |
|
||||||
3. Create a character, and in the Inspector give your character Name Text (we chose "Sherlock") and a name color. |
|
||||||
4. Now in the Inspector click the Add Portrait button (the plus-sign "+"), to get a 'slot' into which to add a portrait image: |
|
||||||
![add portrait] |
|
||||||
5. Drag the appropriate image into your new portrait image slot (in this screenshot we used the 'condident' image from the Sherlock example project). Also set the direction that the image is facing (left / front / right): |
|
||||||
![sherlock image] |
|
||||||
6. Create a second character (e.g. John, using Name Color blue, and portrait image 'annoyed'). |
|
||||||
7. Now select your Block in the %Fungus Flowchart, so you can add some Commands to be executed... |
|
||||||
8. Create a Say command, for your Sherlock Character, saying "Watson, have you seen my violin?" and choosing portrait 'confident' (since this is the only we added to the Character): |
|
||||||
![sherlock Say command] |
|
||||||
9. Add a second Say command, this time for Character John, saying "No, why don't you find it yourself using your amazing powers of deduction..." and choosing the 'annoyed' portrait for John. |
|
||||||
![2 say commands] |
|
||||||
10. When you run the scene you should see a sequence of statements, clearly showing who is saying both with (colored) name text AND also the portrait image you selected for each Say command: |
|
||||||
![sherlock output] |
|
||||||
![john output] |
|
||||||
As you can see in some of the %Fungus Example projects, many games will have a wide range of different portrait images for each character, to allow a full range of visual expression of emotion to support the text of Say commands: |
|
||||||
![sherlock image list] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Character Stage # {#stage} |
|
||||||
|
|
||||||
Portrait images can be used in two ways in %Fungus. |
|
||||||
|
|
||||||
- They can be shown as part of the **Say** commands in the Say Dialog. |
|
||||||
- Alternatively Portraits can be displayed and moved around the screen inside %Fungus **Stages**, using the Portrait Command. |
|
||||||
|
|
||||||
Create a simple stage that covers the whole game Window as follows: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename the Flowchart Block "stage demo". |
|
||||||
3. Create a %Fungus Stage gameObject in the scene by choosing menu: |
|
||||||
```Tools | %Fungus | Create | Stage```: |
|
||||||
![menu add stage] |
|
||||||
4. You should now see a new gameObject "Stage" added to the scene Hierarchy. |
|
||||||
5. If you select it you will see its properties in the Inspector. We can leave the default settings, since these are for the stage to cover the whole Game window. There are some child gameObjects inside the Stage, but you don't need to worry about these unless you are doing some advanced customisation of stages for a particular game effect. |
|
||||||
|
|
||||||
![stage gameObject] |
|
||||||
|
|
||||||
Now you have added a %Fungus Stage to your scene, you will be able to make large Portrait images appear / move in-out of the screen using the **Portrait** Command in %Fungus Flowchart Blocks... |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Portrait command # {#portrait_command} |
|
||||||
|
|
||||||
Once you have a %Fungus Stage, and a character then you can instruct %Fungus to display / move onscreen the Character Portrait images. To make character images appear as part of a scene do the following: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename the Flowchart Block "sherlock enters dramatically". |
|
||||||
3. Create a %Fungus Stage gameObject in the scene by choosing menu: |
|
||||||
```Tools | %Fungus | Create | Stage```. |
|
||||||
4. Create a new character, name the gameObject "Character1 - Sherlock", set the Name Text to "sherlock" and the Name Color to green. Add to this character a portrait (we used the sherlock-confident image from the %Fungus Example project "Sherlock"). And set the image facing to the appropriate side (in our case: left): |
|
||||||
![sherlock image] |
|
||||||
5. Add a Portrait Command by clicking the Add Command button (the plus-sign "+"), then choosing menu: |
|
||||||
```Narrative | Portrait```: |
|
||||||
![add command portrait] |
|
||||||
6. You will now see your new Portrait command in the top half of the Inspector, and its Command properties in the bottom half of the Inspector. Note the red exclamation mark at the right of the highlighted (green) Command row - this indicated when a command has one or more required properties that have not been set. We see the error message *"No character selected"*: |
|
||||||
![new command portrait] |
|
||||||
7. Set the portrait's character to "Character1 - sherlock", and set the following properties: |
|
||||||
- Portrait: confident |
|
||||||
- Facing: <-- (left) |
|
||||||
- Move: Yes (check the checkbox) |
|
||||||
- From Position: Offscreen Right |
|
||||||
- To Position: Right |
|
||||||
![command portrait for sherlock] |
|
||||||
8. When you run the scene, the Sherlock portrait image should move into view having started from Offscreen - Right. The image stops when it gets to about a third the way onto the screen: |
|
||||||
![sherlock portrait output] |
|
||||||
|
|
||||||
Note, a common Command flow sequence is: |
|
||||||
|
|
||||||
- to have a character enter on screen (Portrait command), |
|
||||||
- then have that character say something (Say command), |
|
||||||
- then have another character enter the screen (Portrait command), |
|
||||||
- and then that second character says something (Say command). |
|
||||||
|
|
||||||
Here is just such a sequence for the "Case of the missing violin" two-sentence scenario explored in the recipe to learning how to create %Fungus Characters (recipe: Listing portrait image(s) for use by Characters): |
|
||||||
![sherlock portrait output] |
|
||||||
|
|
||||||
Here we see the Play Mode user experience of the output of running such a workflow: |
|
||||||
|
|
||||||
![sherlock portrait then say] |
|
||||||
|
|
||||||
![john portrait then say] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Playing music # {#playing_music} |
|
||||||
Music sound clips loop, so they are restarted once they have finished playing. Often the first Command in a Block is a **Play Music** Command. Add music to a Block as follows: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Add a Play Music Command to the current Block by clicking the Add Command (plus-sign "+" button) in the Inspector, and then choosing menu: ```Audio | Play Music```. |
|
||||||
3. Ensure the Play Music command is selected (green highlight) in the top of the Inspector, and then drag the desired music clip file into the "Music Clip" property in the bottom half of the Inspector: |
|
||||||
![Add Play Music command] |
|
||||||
4. Change the volume as desired |
|
||||||
(the default is 1, values are between 0.0 and 1.0, representing percentages of volume from 0% - 100%). |
|
||||||
5. Play your scene - the music clip should play, and keep looping. |
|
||||||
|
|
||||||
NOTE: If you wish to start playing the music clip from a known time-point (rather than from the beginning), then enter the desired time-point in the Inspector property "At Time" for your Play Music command. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Branching narrative # {#branching} |
|
||||||
Let's use a Say command above to ask a tricky mathematical question, and demonstrate the Menu command by offering the user a choice been "correct' and "incorrect" answers. Menu commands transfer control to another block - so we'll need to add 2 new blocks to correspond to the 2 answers. |
|
||||||
Do the following: |
|
||||||
|
|
||||||
1. (setup) Create a new scene, add a %Fungus Flowchart to the scene, and select the Block in the Flowchart. |
|
||||||
2. Rename the Block in the Flowchart to "Question". |
|
||||||
3. Create a Say command, with **Story Text** to ask the question: "Is 2 + 2?". |
|
||||||
4. Uncheck the "Wait For Click" checkbox (this is so we see the menu options immediately after the Say command has displayed the question): |
|
||||||
![maths say command] |
|
||||||
5. Create a new Block, named "Correct" which contains a **Say** command with the text "Well done, you are very mathematical!". Click the plus-sign button in the Flowchart window to add a new Block to the Flowchart, rename it "Correct" and then add that Say command: |
|
||||||
![correct block] |
|
||||||
6. Select the "Question" block, and add a Menu command by clicking the plus-sign add Command button in the Inspector and then choosing menu: ```Narrative | Menu```. |
|
||||||
![add menu command] |
|
||||||
7. With this new Menu command selected (green) in the top half of the Inspector window, set the **Text** to "Yes" and the **Target Block** to your new "Correct" block: |
|
||||||
![menu command] |
|
||||||
8. You should now see how the 'flow' of commands can change from Block "hello" to Block "Correct" in the Flowchart window: |
|
||||||
![flow between blocks in Flowchart] |
|
||||||
9. Add a second new Block named "Wrong", containing a Say command with text "Bad luck, perhaps consider a non-mathematical career path..." |
|
||||||
![block for wrong answer] |
|
||||||
10. Now we need to add another Menu command to our "hello" block, offering the user the "No" answer to our maths question, and passing control to Block "Wrong" if they disagree that 2 + 2 = 4. Select the "hello" block, and add a Menu command. With this new Menu command selected (green) in the top half of the Inspector window, set the **Text** to "No" and the **Target Block** to your new "Wrong" block. |
|
||||||
11. You should now see in the Flowchart window how block "hello" can pass control to either block "Correct" or Block "Wrong" - depending on which menu answer the user selects. |
|
||||||
![block connected to 2 others] |
|
||||||
12. Run the scene, and you should see the Say question appear at the bottom of the screen, and also the two Menu buttons "Yes" and "No" in the middle of the screen. Clicking "Yes" then runs the "Correct" Block's commands, and clicking "No" runs the "Wrong" block's commands: |
|
||||||
|
|
||||||
![menu running] |
|
||||||
|
|
||||||
![correct screen] |
|
||||||
|
|
||||||
![wrong screen] |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Change background colour # {#background_color} |
|
||||||
|
|
||||||
Unity cameras determine what the user sees when a scene is running. When nothing is present in all or part of the camera's rectangle a solid "Background" colour is displayed. Unity cameras have a default Background of a medium dark blue colour. You can change this as follows: |
|
||||||
|
|
||||||
1. (setup) Create a new 2D scene, unless you already have a scene with which to work. |
|
||||||
2. Select the Main Camera in the Hierarchy. |
|
||||||
3. In the Inspector for the Camera component, click and choose a different value for the Background property - often black works well. |
|
||||||
![camera background colour] |
|
||||||
4. Now when any part of the camera rectangle (frustrum) shows no gameOjects then your custom Background colour will be what the user sees. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Background sprite # {#background_sprite} |
|
||||||
|
|
||||||
To add any sprite image file from your Unity Project folder into the current scene, simply drag a reference to the sprite image file from the Project window onto the Scene window, and rotate / resize desired. The sprite will appear as a new gameObject (with same name as Sprite Project image file) in the Hierarchy window: |
|
||||||
|
|
||||||
![sprite into scene] |
|
||||||
|
|
||||||
NOTE: You may not be able to see the sprite, because what we see depends on the current settings for the camera. What the camera shows, how it moves etc. can be controlled by %Fungus Views and Commmands relating to Views. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Using Views # {#view} |
|
||||||
|
|
||||||
What the main camera of a scene displays to the user, and how it moves etc. can be controlled by %Fungus Views and %Fungus Commmands relating to Views. A %Fungus View is a special gameObject in the Hierarchy, it appears as a green outlined inner rectangle, with two filled green rectangles on the left and the right. The ratio of the outlined inner rectangle is 4:3. The ratio of the outer rectangle (which includes the two filled green left and right rectangles) is 16:9. These two ratios cover almost every common phone, tablet and computer screen width-to-height ratio. So arranging the view so that a background Sprite image looks good for both inner- and outer- rectangles of a view, pretty much ensures your game will look good on any device. Setting the background color of the camera to something like black also means on the rare device that has an odd ratio showing content outside of the view outer rectangle, the game should still look perfectly acceptable. |
|
||||||
|
|
||||||
To add a view to the current scene do the following: |
|
||||||
|
|
||||||
1. (setup) Create / Edit a scene that has a Sprite background image gameObject |
|
||||||
2. Choose menu: ```Tools | %Fungus | Create | View```: |
|
||||||
![menu new view] |
|
||||||
3. Rename this View as "View1". |
|
||||||
4. Use the two white squares to resize the view (it maintains its proportions). Use the center square outline, or vertical and horizontal arrows to move the View around the Scene window. |
|
||||||
![move and resize handles] |
|
||||||
![new view] |
|
||||||
5. Ensure the View is selected in the Hierarchy, then position the view so that it is approximately centered on your background sprite image |
|
||||||
6. Resize (and if necessary reposition) the View to be as big as possible, but ensuring that its outer rectangle stays within the bounds of the background sprite. (Note we've tinted the Sprite red so the green View rectangles can be more easily seen in this screenshot): |
|
||||||
![resize view] |
|
||||||
7. Note: You can also rotate the view with the Unity Rotate tool |
|
||||||
|
|
||||||
NOTE: Until you add a "Fade To View" %Fungus command, you still may not see the Sprite in the Game window when the scene plays, since the Main Camera has not been oriented to resize and align with the view. |
|
||||||
|
|
||||||
<!-- **************************************** --> |
|
||||||
# Fade To View command # {#fade_to_view} |
|
||||||
|
|
||||||
Once you have a Scene that contains some background Sprites and %Fungus Views, you are ready to use the %Fungus camera related Commands to control what the user sees. The simplest camera control is to make the Game window fade from a solid colour to the Main Camera being sized, positioned (and if necessary rotated) to show a specified %Fungus View. Do the following: |
|
||||||
|
|
||||||
1. (setup) Create / being editing a Scene containing a background Sprite image, and a %Fungus View that has been positioned to show all / some of the Sprite. |
|
||||||
2. In the %Fungus Flowchart rename the Block "Camera Control". |
|
||||||
3. Add a new "Fade to View" Command to the Block. First click the Plus button in the bottom half of the Inspector window, to add a new Command, then choose menu: ```Camera | Fade To View```: |
|
||||||
![menu Fade to View] |
|
||||||
4. Now Drag "View1" from the Hierarchy window into the "Target View" property of the Fade to View Command in the Inspector: |
|
||||||
![assign Target View] |
|
||||||
[assign Target View]: ./telling_a_story/08_add_view/6_drag_view.png "assign Target View" |
|
||||||
5. (We'll keep the defaults of 1 second and fade From Color of black). |
|
||||||
6. When you run the Scene the Game window should start off solid black, and then slowly the background Sprite image within the View rectangle should fade into view. |
|
||||||
7. Now Drag "View1" from the Hierarchy window into the |
|
||||||
|
|
||||||
![menu Fade to View] |
|
||||||
|
|
||||||
[Menu create character]: ./telling_a_story/001_characters/1_menu_character.png "Menu create character" |
|
||||||
[new character]: ./telling_a_story/001_characters/2_new_character.png "new character" |
|
||||||
[character tom red]: ./telling_a_story/001_characters/3_tom.png "character tom red" |
|
||||||
[character jerry blue]: ./telling_a_story/001_characters/4_jerry.png "character jerry blue" |
|
||||||
[tom say where cat]: ./telling_a_story/001_characters/5_tom_say1.png "tom say where cat" |
|
||||||
[tom jerry conversation]: ./telling_a_story/001_characters/6_four_says.png "tom jerry conversation" |
|
||||||
[tom jerry conversation output]: ./telling_a_story/001_characters/7_tom_jerry_chat.png "tom jerry conversation output" |
|
||||||
[add portrait]: ./telling_a_story/002_portrait/2_add_portrait.png "add portrait" |
|
||||||
[sherlock image]: ./telling_a_story/002_portrait/1_sherlock.png "sherlock image" |
|
||||||
[sherlock Say command]: ./telling_a_story/002_portrait/6_say_sherlock.png "sherlock Say command" |
|
||||||
[2 say commands]: ./telling_a_story/002_portrait/8_two_say_commands.png "2 say commands" |
|
||||||
[sherlock output]: ./telling_a_story/002_portrait/4_sherlock_output.png "sherlock output" |
|
||||||
[john output]: ./telling_a_story/002_portrait/5_john_output.png "john output" |
|
||||||
[sherlock image list]: ./telling_a_story/002_portrait/7_many_portait_images.png "sherlock image list" |
|
||||||
[menu add stage]: ./telling_a_story/003_stage/1_menu_stage.png "menu add stage" |
|
||||||
[stage gameObject]: ./telling_a_story/003_stage/2_stage_gameobject.png "stage gameObject" |
|
||||||
[sherlock image]: ./telling_a_story/002_portrait/1_sherlock.png "sherlock image" |
|
||||||
[add command portrait]: ./telling_a_story/005_portrait_command/1_menu_command_portrait.png "add command portrait" |
|
||||||
[new command portrait]: ./telling_a_story/005_portrait_command/4_new_command_portrait.png "new command portrait" |
|
||||||
[command portrait for sherlock]: ./telling_a_story/005_portrait_command/2_portrait_command.png "command portrait for sherlock" |
|
||||||
[sherlock portrait output]: ./telling_a_story/005_portrait_command/3_portrait_output.png "sherlock portrait output" |
|
||||||
[sherlock portrait output]: ./telling_a_story/005_portrait_command/3_portrait_output.png "sherlock portrait output" |
|
||||||
[sherlock portrait then say]: ./telling_a_story/005_portrait_command/5_sherlock_say.png "sherlock portrait then say" |
|
||||||
[john portrait then say]: ./telling_a_story/005_portrait_command/6_john_say.png "john portrait then say" |
|
||||||
[Add Play Music command]: ./telling_a_story/004_play_music/1_add_playmusic_command.png "Add Play Music command" |
|
||||||
[maths say command]: ./telling_a_story/011_menu_maths/2_edited_say.png "maths say command" |
|
||||||
[correct block]: ./telling_a_story/011_menu_maths/1_correct_block.png "correct block" |
|
||||||
[add menu command]: ./telling_a_story/011_menu_maths/6_add_menu.png "add menu command" |
|
||||||
[menu command]: ./telling_a_story/011_menu_maths/4_menu_correct.png "menu command" |
|
||||||
[flow between blocks in Flowchart]: ./telling_a_story/011_menu_maths/5_connected_blocks.png "flow between blocks in Flowchart" |
|
||||||
[block for wrong answer]: ./telling_a_story/011_menu_maths/7_wrong_block.png "block for wrong answer" |
|
||||||
[block connected to 2 others]: ./telling_a_story/011_menu_maths/8_three_block_menu.png "block connected to 2 others" |
|
||||||
[menu running]: ./telling_a_story/011_menu_maths/9_menu_running.png "menu running" |
|
||||||
[correct screen]: ./telling_a_story/011_menu_maths/10_correct.png "correct screen" |
|
||||||
[wrong screen]: ./telling_a_story/011_menu_maths/11_wrong.png "wrong screen" |
|
||||||
[camera background colour]: ./telling_a_story/06_camera_background/1_background_black.png "camera background colour" |
|
||||||
[sprite into scene]: ./telling_a_story/07_background_sprite/1_sprite.png "sprite into scene" |
|
||||||
[menu new view]: ./telling_a_story/08_add_view/1_menu_view.png "menu new view" |
|
||||||
[move and resize handles]: ./telling_a_story/08_add_view/4_move_resize_handles.png "move and resize handles" |
|
||||||
[new view]: ./telling_a_story/08_add_view/2_gameobjects.png "new view" |
|
||||||
[resize view]: ./telling_a_story/08_add_view/3_resize_view.png "resize view" |
|
||||||
[menu Fade to View]: ./telling_a_story/08_add_view/5_menu_fade_to_view.png "menu Fade to View" |
|
||||||
[menu Fade to View]: ./telling_a_story/08_add_view/7_scene_running.png "menu Fade to View" |
|
@ -1,60 +0,0 @@ |
|||||||
# Text Variation System # {#text_variation_system} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
A system for selecting a sub section of a larger string. Allows for simple changes to occur within the same block of text, instead of having to create multiple commands. The Text Variation System is inspired by [Ink]'s [Variable Text system](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#6-variable-text). Fungus' Writer and Menu classes currently use this system, as such Say, Menu and Conversation commands can make use of it. Fungus Lua actions that result in Lua passing strings to the Fungus Writer or Menu will also work. |
|
||||||
|
|
||||||
Handles replacing vary text segments. Keeps history of previous replacements to allow for ordered sequence of variation. |
|
||||||
* [] mark the bounds of the vary section |
|
||||||
* | divide elements within the variation |
|
||||||
|
|
||||||
Default behaviour is to show one element after another and hold the final element. Such that [1|2|3] will show |
|
||||||
1 the first time it is parsed, 2 the second and every subsequent time it will show 3. |
|
||||||
|
|
||||||
Empty sections are allowed, such that [a||c], on second showing it will have 0 characters. |
|
||||||
|
|
||||||
Supports nested sections, that are only evaluated if their parent element is chosen. |
|
||||||
|
|
||||||
This behaviour can be modified with certain characters at the start of the [], e.g. [&a|b|c]; |
|
||||||
- & does not hold the final element it wraps back around to the beginning in a looping fashion |
|
||||||
- ! does not hold the final element, it instead returns empty for the varying section |
|
||||||
- ~ chooses a random element every time it is encountered |
|
||||||
|
|
||||||
# Example Usage # {#example} |
|
||||||
|
|
||||||
In a simple case you may want to have a line read differently the first time the user encounters it. Perhaps a shop keeper, first time they say |
|
||||||
``` |
|
||||||
Hail and well met, stranger. What can I help you with? |
|
||||||
``` |
|
||||||
but when the same block is run again you want it to be more friendly |
|
||||||
``` |
|
||||||
Welcome back, friend. What can I help you with? |
|
||||||
``` |
|
||||||
Instead of creating diverging blocks of commands we could use text variation of. |
|
||||||
``` |
|
||||||
[Hail and well met, stranger|Welcome back, friend]. What can I help you with? |
|
||||||
``` |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Another common usage is for commonly repeated blocks where players return for menus or story branching points. You may want there to be some variation so it feels more natural. Perhaps by varying the greeting used to be randomised, among; |
|
||||||
* Mornin. |
|
||||||
* G'day. |
|
||||||
* How's it hanging? |
|
||||||
* Oi oi. |
|
||||||
* How are we? |
|
||||||
* Let's do this. |
|
||||||
|
|
||||||
We could do a variation of |
|
||||||
``` |
|
||||||
[~Mornin.|G'day.|How's it hanging?|Oi oi.|How are we?|Let's do this.] |
|
||||||
``` |
|
||||||
|
|
||||||
For a more complete and thorough example, see example scene at FungusExamples\VariationText\TextVariation.unity |
|
||||||
|
|
||||||
# Future Work # {#future_work} |
|
||||||
|
|
||||||
* Bundling of state tracking of variations so they can be saved along with other fungus data in save files |
|
||||||
* Loading and Unbundling of state tracking for variations so that variations can continue across instances of the applications life. |
|
||||||
* Conditional vary sections: sections that are only valid if a fungus variable is in a certain state. |
|
||||||
|
|
||||||
[Ink]: https://github.com/inkle/ink |
|
@ -1,40 +0,0 @@ |
|||||||
# Fungus Training Course # {#training_course} |
|
||||||
|
|
||||||
# Course Description # {#description} |
|
||||||
|
|
||||||
We've teamed up with Paul Mc Grath to create an extensive [training course] which teaches how to make storytelling games using %Fungus and Unity. Sales of this course help us to continue developing %Fungus, so it's a nice way to learn %Fungus and to support the work we're doing on the project. |
|
||||||
|
|
||||||
@htmlonly |
|
||||||
<div> |
|
||||||
<a target="_blank" href="https://www.udemy.com/make-interactive-games-with-fungus-unity3d-no-coding-required/?couponCode=FungusDiscount2016"><img hspace="20" src="./training.png"></a> |
|
||||||
</div> |
|
||||||
@endhtmlonly |
|
||||||
|
|
||||||
This course is aimed at anyone who wants to make interactive story based games, but, who doesn't know how to code. |
|
||||||
|
|
||||||
%Fungus is a free Unity 3D plugin that allows non coders (like Paul) access to some of Unity's core features. If you have never used game development software, or if you have struggled with code trying to make games, %Fungus and this course are exactly what you need. |
|
||||||
|
|
||||||
# Course requirements # {#requirements} |
|
||||||
|
|
||||||
- A Mac or PC that is capable of running Unity 3D. |
|
||||||
- The latest version of Unity 3D (we will talk you through download and install on the course). |
|
||||||
- The latest Version of %Fungus (we will talk you through download and install on the course). |
|
||||||
|
|
||||||
# What to expect # {#expect} |
|
||||||
|
|
||||||
- Over 43 lectures and 8 hours of content! |
|
||||||
- You will have a full working knowledge of %Fungus and how it integrates with Unity. |
|
||||||
- You will be able to create narrative story games, point and click adventures and hidden object games. |
|
||||||
- You will be able to publish your games to Unity’s WebGL platform and have them on your own website, publish them to Android and iOS versions (if you have a Apple developer Licence) and sell them through Google play or the iOS Store. |
|
||||||
- Most importantly you will be able to do all of this **without writing a line of code.** |
|
||||||
|
|
||||||
# Target audience # {#target_audience} |
|
||||||
|
|
||||||
- If you don’t know how to code and want to make interactive storytelling games, this course is for you. |
|
||||||
- If you’re an artist, illustrator or writer and would like to delve into game development in an easy and approachable manner, this course if for you. |
|
||||||
- If you have struggled with code to create games in unity, this course is for you. |
|
||||||
- If you're able to code and know your way round Unity and love the joy of a visual coding interface, this course is for you. |
|
||||||
|
|
||||||
[training course]: https://www.udemy.com/make-interactive-games-with-fungus-unity3d-no-coding-required/?couponCode=FungusDiscount2016 |
|
||||||
|
|
||||||
[img training]: ./training_course/training.png |
|
@ -1,59 +0,0 @@ |
|||||||
# Tutorial Videos {#tutorial_videos} |
|
||||||
|
|
||||||
These free tutorial videos cover most of the functionality available in %Fungus. Many thanks to [Paul Mc Grath](http://whackala.com) for contributing the videos, and [Eric Chen](https://twitter.com/Eric_hjk) for Chinese subtitles. |
|
||||||
|
|
||||||
@htmlonly |
|
||||||
<div align="center" style="float:right;"> |
|
||||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/F1vmEtQ7k6M?list=PLiMlyObJfJmUohJ_M2pJhtrNKuNECo2Uk" frameborder="0" allowfullscreen></iframe> |
|
||||||
</div> |
|
||||||
@endhtmlonly |
|
||||||
|
|
||||||
* [%Fungus Overview] |
|
||||||
* [Installing %Fungus in your project] |
|
||||||
* [Basics of using %Fungus] |
|
||||||
* [Using Event Handlers] |
|
||||||
* [Controlling the camera] |
|
||||||
* [2D graphics with Sprites] |
|
||||||
* [Playing music and sound effects] |
|
||||||
* [Controlling animations] |
|
||||||
* [Narrative based gameplay] |
|
||||||
* [Command flow and loops] |
|
||||||
* [Scripting scene objects] |
|
||||||
* [Using variables to track state] |
|
||||||
* [Tweening game objects using iTween] |
|
||||||
* [Supporting multiple languages] |
|
||||||
* [Editing story text] |
|
||||||
* [Using Spine animations] |
|
||||||
* [Custom commands and event handlers] |
|
||||||
* [Controlling Unity UI objects] |
|
||||||
* [Unite Europe 2015 talk] |
|
||||||
* [%Fungus Live Stream #1] |
|
||||||
* [%Fungus Live Stream #2] |
|
||||||
* [%Fungus Live Stream #3] |
|
||||||
* [Using Lua scripting] |
|
||||||
* [Saving and Loading] |
|
||||||
|
|
||||||
[%Fungus Overview]: https://www.youtube.com/watch?v=F1vmEtQ7k6M |
|
||||||
[Installing %Fungus in your project]: https://www.youtube.com/watch?v=BQRdRz9Q5VY |
|
||||||
[Basics of using %Fungus]: https://www.youtube.com/watch?v=u5fhU7xAz2o |
|
||||||
[Using Event Handlers]: https://www.youtube.com/watch?v=-rtnk9OGCQY |
|
||||||
[Controlling the camera]: https://www.youtube.com/watch?v=BTJpWheqTLA |
|
||||||
[2D graphics with Sprites]: https://www.youtube.com/watch?v=SLcJkKblqhE |
|
||||||
[Playing music and sound effects]: https://www.youtube.com/watch?v=lNfM83XRSNQ |
|
||||||
[Controlling animations]: https://www.youtube.com/watch?v=HPktzBc7zv4 |
|
||||||
[Narrative based gameplay]: https://www.youtube.com/watch?v=BVGMVCIUoVc |
|
||||||
[Command flow and loops]: https://www.youtube.com/watch?v=vrLNeFsoCyw |
|
||||||
[Scripting scene objects]: https://www.youtube.com/watch?v=GY8iJWSbLZg |
|
||||||
[Using variables to track state]: https://www.youtube.com/watch?v=uRh7INbed2I |
|
||||||
[Tweening game objects using iTween]: https://www.youtube.com/watch?v=Ii2kz0AgqkU |
|
||||||
[Supporting multiple languages]: https://www.youtube.com/watch?v=kBIXOwfaaaU |
|
||||||
[Editing story text]: https://www.youtube.com/watch?v=WBA-shjuTBA |
|
||||||
[Using Spine animations]: https://www.youtube.com/watch?v=4nxfjlKcAhs |
|
||||||
[Custom commands and event handlers]: https://www.youtube.com/watch?v=WFEGnS7MU74 |
|
||||||
[Controlling Unity UI objects]: https://www.youtube.com/watch?v=S3TKQ86xsJM |
|
||||||
[Unite Europe 2015 talk]: https://www.youtube.com/watch?v=9zqUx0xZBv4 |
|
||||||
[%Fungus Live Stream #1]: https://www.youtube.com/watch?v=W_lcfZS5REU |
|
||||||
[%Fungus Live Stream #2]: https://www.youtube.com/watch?v=skxTOqvif3g |
|
||||||
[%Fungus Live Stream #3]: https://www.youtube.com/watch?v=LTSHaxPsB-M |
|
||||||
[Using Lua scripting]: https://www.youtube.com/watch?v=M_Oo9FpVTos |
|
||||||
[Saving and Loading]: https://www.youtube.com/watch?v=Bd4RDcCc0lE |
|
@ -1,79 +0,0 @@ |
|||||||
# Variables # {#variables} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
%Fungus Variables live on flowcharts. Acting like a blackboard, they allow Commands, Blocks and Flowcharts to set and share data. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# What is a Variable? # {#variable} |
|
||||||
|
|
||||||
If you have scripted or programmed before you are most likely familiar with the concept. At it's most simple, a variable is a named place or location to keep data. Since variables in %fungus live on Flowcharts they exist for the life of the flowchart. |
|
||||||
They are commonly used to keep track of progress or choices made by the player. They are also commonly used to pass data from one command to another. |
|
||||||
|
|
||||||
Variables do not automatically save and restore themselves between runs of the application. The saving mechanisms can, however, be used to load and save variables to disk. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# The Variable list # {#variable_list_window} |
|
||||||
|
|
||||||
they are in the flowchart window |
|
||||||
![variable window] |
|
||||||
|
|
||||||
also on the flowchart inspector |
|
||||||
![variable inspector] |
|
||||||
|
|
||||||
The large variable button toggles showing the variable list. Hiding it can be useful when you have a large number of variables on a flowchart and need the extra screen real estate to see the flowchart blocks within the window or other components on the GameObject you want to be able to see. |
|
||||||
|
|
||||||
This is where fungus variables are added (created) and removed. Clicking the plus button shows a menu to select the type of variable to add. Pressing the minus button will remove the currently selected variable from the list. |
|
||||||
![variable add button] |
|
||||||
|
|
||||||
Variables will highlight when they are being referenced by the currently selected %Commmand. |
|
||||||
![variable highlight] |
|
||||||
|
|
||||||
Each variable needs a name, this is how it is shown to you in command drop downs and how it is referred to when using variable substitution within strings. You can set the value of variables directly in the variable list for most variable types. In all cases you will want to make sure that the starting value makes sense. For example, an Integer variable called Lives, might want to start at 3. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# What is a Variable Type? # {#variable_type} |
|
||||||
|
|
||||||
Mimicing c#, %Fungus Variables declare the type of data they are going to contain. |
|
||||||
![variable data type] |
|
||||||
|
|
||||||
Simple applications will most commonly use Booleans, variables that hold either true or false, and Strings, Unicode characters, such as words, sentences and paragraphs. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# What is Variable Scope? # {#variable_scope} |
|
||||||
|
|
||||||
The scope of the variable determines how the variable is used by fungus and how it is exposed to other parts of the system. |
|
||||||
![variable scope] |
|
||||||
|
|
||||||
Presently these can be set to, private, public or global. |
|
||||||
|
|
||||||
Private is not directly available to other flowcharts. Indicating that the variable is only relevant and only to be used by the flowchart it is declared on. This does not limit its ability to be used by commands. |
|
||||||
|
|
||||||
Public indicates that the variable can be found and is intended to be used or modified by other flowcharts. Those other flowcharts will need to be able to directly access the flowchart the variable is declared on to modify it. Public also makes the variable available to other flowcharts during variable substitution. |
|
||||||
|
|
||||||
Global allow for sharing state among all flowcharts, without direct access to the other flowcharts. It also allows for the value of the variable to outlive the flowchart that declared it. All flowcharts that have a variable of the same type and name and are global access have the same underlying value, stored on the FungusManager. |
|
||||||
|
|
||||||
During variable substitution, the flowchart looks for name matches on itself. Then public variables on all active flowcharts. |
|
||||||
|
|
||||||
<!-- **************************************************** --> |
|
||||||
# What is a Fungus Variable Data? # {#variable_data} |
|
||||||
|
|
||||||
Commands within blocks may use either a Variable reference directly or a Variable Data. Variable Data is a mechanism for %Fungus to use either a Fungus Variable or a manually entered value of the same type. This allows for more generic commands. |
|
||||||
![variable data] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[variable window]: ./variables/variable_window.png "Variable section of the flowchart window" |
|
||||||
[variable inspector]: ./variables/variable_inspector.png "Variable section of the flowchart inspector" |
|
||||||
[variable add button]: ./variables/variable_add_button.png "Plus button shows selection of variable types to add." |
|
||||||
[variable highlight]: ./variables/variable_highlight.png "The variable(s) being referenced by the current command are highlighted in the list." |
|
||||||
[variable data type]: ./variables/variable_data_type.png "Fungus supports a number of types of variables" |
|
||||||
[variable scope]: ./variables/variable_scope.png "Scope determines where and how the variable is accessable." |
|
||||||
[variable data]: ./variables/variable_data.png "Data with a manual value entered. The drop down shows the compatible variable types on this flowchart that could be used instead of the manually entered value." |
|
||||||
|
|
||||||
|
|
||||||
<!-- |
|
||||||
-adding your own variables to fungus |
|
||||||
-variableinfo |
|
||||||
-variableproperty |
|
||||||
-accessing variable in c# code |
|
||||||
--> |
|
@ -1,62 +0,0 @@ |
|||||||
# About FungusLua # {#lua_about_funguslua} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
FungusLua is a simple way to embed Lua scripting into your Unity project. Lua is an easy to learn scripting language so it's a great way to empower artists, writers and designers to use more of the power of Unity. |
|
||||||
|
|
||||||
At its core, FungusLua allows you to control any Unity object from Lua script. It has useful utilities for using %Fungus flowcharts and dialogs, persisting variables between scene loads, localization, and working with the Unity Test Tools. |
|
||||||
|
|
||||||
We made FungusLua in response to requests from the %Fungus community for a way to script %Fungus commands from a text file or spreadsheet. We figured that if people are going to be writing commands in text files, why not go all the way and add a powerful embedded scripting language? |
|
||||||
|
|
||||||
FungusLua comes as part of the [%Fungus asset] available on the Unity Asset Store. |
|
||||||
|
|
||||||
# Platform Compatibility # {#lua_platform_compatibility} |
|
||||||
|
|
||||||
%FungusLua should work on most platforms supported by Unity. We list any known platform compatibility issues here, please let us know if you find more. |
|
||||||
|
|
||||||
- Windows Store (.NET scripting backend): Both %Fungus & %FungusLua compile ok, but generate runtime errors when executing Lua scripts. The IL2CPP scripting backend compiles and runs fine. |
|
||||||
|
|
||||||
# Tutorial Video # {#lua_tutorial_video} |
|
||||||
|
|
||||||
This video shows how to use many of the features available in FungusLua. It's more of a demonstration than a step-by-step tutorial, but hopefully between this video, the docs and the forums you'll have enough to figure it all out :) |
|
||||||
|
|
||||||
@htmlonly |
|
||||||
<div align="center"> |
|
||||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/M_Oo9FpVTos" frameborder="0" allowfullscreen></iframe> |
|
||||||
</div> |
|
||||||
@endhtmlonly |
|
||||||
|
|
||||||
# FungusLua without Fungus # {#funguslua_without_fungus} |
|
||||||
|
|
||||||
FungusLua can easily be used on its own if you don't need the rest of the functionality in %Fungus. |
|
||||||
|
|
||||||
1. In the project window, move the %Fungus/Thirdparty/FungusLua folder up to the root of the project. |
|
||||||
2. Delete the %Fungus and FungusExamples folders. |
|
||||||
3. Add FUNGUSLUA_STANDALONE to the Scripting Define Symbols in Edit > Project Settings > Player |
|
||||||
|
|
||||||
The Tools > %Fungus menu will now only show options for creating FungusLua objects. Obviously you won't be able to use %Fungus functions like say(), menu(), etc. anymore, but you can still use LuaEnvironment, LuaBindings, LuaScript to add Lua scripting to your game. |
|
||||||
|
|
||||||
# About Lua # {#about_lua} |
|
||||||
|
|
||||||
[Lua] is a powerful, fast, lightweight, embeddable scripting language. It is a popular language for game development and supporting user modding. The standard resource for learning Lua is [Programming in Lua]. |
|
||||||
|
|
||||||
![Lua logo] |
|
||||||
|
|
||||||
# About MoonSharp # {#about_moonsharp} |
|
||||||
|
|
||||||
[MoonSharp] is an open source implementation of the Lua scripting language written entirely in C#. |
|
||||||
|
|
||||||
![MoonSharp Logo] |
|
||||||
|
|
||||||
FungusLua is essentially a set of wrapper components built on top of MoonSharp which make it easier to use Lua scripting directly in the Unity editor. MoonSharp does all the hard work really and is a completely awesome project :) |
|
||||||
|
|
||||||
The [MoonSharp tutorials] and [MoonSharp forum] are great resources to learn how MoonSharp works, especially for more advanced usage. |
|
||||||
|
|
||||||
[Lua]: http://www.lua.org/about.html |
|
||||||
[%Fungus asset]: http://u3d.as/f0T |
|
||||||
[Programming in Lua]: http://www.lua.org/pil/1.html |
|
||||||
[MoonSharp]: http://www.moonsharp.org |
|
||||||
[MoonSharp tutorials]: http://www.moonsharp.org/getting_started.html |
|
||||||
[MoonSharp forum]: https://groups.google.com/forum/#!forum/moonsharp |
|
||||||
|
|
||||||
[Lua logo]: ./fungus_lua/lua.png |
|
||||||
[MoonSharp Logo]: ./fungus_lua/moonsharp.png |
|
@ -1,40 +0,0 @@ |
|||||||
# LuaBindings # {#lua_bindings} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The LuaBindings component allows you map gameobjects and components in your scenes to Lua variables which you can then access in your Lua scripts. You can bind to any component, including standard Unity components, components from the Unity Asset Store and your own custom scripts. |
|
||||||
|
|
||||||
As well as scene GameObjects and components, you can bind to any Unity object in your project. This includes things like Prefabs, Materials, TextAssets, Textures, ScriptableObjects, etc. |
|
||||||
|
|
||||||
![LuaBinding](fungus_lua/lua_bindings.png) |
|
||||||
|
|
||||||
# Adding LuaBindings # {#adding_luabindings} |
|
||||||
|
|
||||||
To setup LuaBindings in your scene: |
|
||||||
|
|
||||||
1. Create a LuaBindings object (Tools > %Fungus > Create > LuaBindings) |
|
||||||
2. Drag the Unity object you want to access to the Object field in the Object Bindings list. |
|
||||||
3. The Key field is automatically populated based on the object name. This will be the variable name you use to access the bound object from Lua script. You can change this key to whatever string you prefer. |
|
||||||
4. If the bound object is a GameObject, you can optionally select a component within it to bind to. |
|
||||||
|
|
||||||
# Using a global table # {#global_table} |
|
||||||
|
|
||||||
The bindings specified in a LuaBindings component are automatically registered as global variables in all LuaEnvironments in the scene at startup. |
|
||||||
|
|
||||||
Registering as global variables is convenient when writing short scripts, but for more complex scripts it could cause problems if you accidentally define another variable with the same name as a binding. To avoid this problem, you can use the Table Name property to register bindings in a global table to add a degree of namespace safety. |
|
||||||
|
|
||||||
For example, if your binding is called 'camera' and you've set Table Name to "myobjects", you would access the camera object like this: |
|
||||||
```lua |
|
||||||
myobjects.camera |
|
||||||
``` |
|
||||||
|
|
||||||
Note that by default the LuaBindings component will register its bindings with all LuaEnvironments in the scene. If you don't want this behaviour, deselect the 'All Environments' option and select the specific LuaEnvironment you want to use instead. |
|
||||||
|
|
||||||
# Finding member info {#finding_member_info} |
|
||||||
|
|
||||||
The Member Info dropdown box lets you to quickly lookup properties and methods for any bound object. When you select a member, a description of the member is displayed together with the Lua script needed to access it. When binding to standard Unity objects, you can also check the API docs to find out more about the supported methods and properties. |
|
||||||
|
|
||||||
# Register Types option {#register_types_option} |
|
||||||
|
|
||||||
In order to access a C# type from Lua, that type has to be registered with MoonSharp. When the Register Types option is selected, LuaBindings will automatically register the types of bound objects and all public properties & methods that the type uses. |
|
||||||
|
|
||||||
|
|
@ -1,272 +0,0 @@ |
|||||||
# Controlling %Fungus # {#lua_controlling_fungus} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The %Fungus module provides several functions for working with the standard %Fungus narrative features and flowcharts. |
|
||||||
|
|
||||||
You can control Say and Menu dialogs in much the same way you use Say and Menu commands in a normal %Fungus flowchart. |
|
||||||
|
|
||||||
When you use the menu() function, you supply another Lua function to call when that menu option is selected. Make sure to define the function higher up in the file before referencing it in a menu() call. If you don't explicitly set a SayDialog or MenuDialog object to use default ones are created automatically. |
|
||||||
|
|
||||||
# Narrative example # {#narrative_example} |
|
||||||
|
|
||||||
This example Lua script demonstrates some of the Say and Menu dialog functions. To try it out, add a Lua object to the scene (Tools > %Fungus > Create > Lua) and copy this script into the Lua Script text box. You may also need to add an EventSystem object in the scene (GameObject > UI > Event System) so that the menu buttons will respond to user input. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Display text in a SayDialog |
|
||||||
say("Hi there") |
|
||||||
say "This syntax also works for say commands" |
|
||||||
|
|
||||||
-- Display a list of options in a MenuDialog |
|
||||||
-- (Note the curly braces here!) |
|
||||||
local choice = choose{ "Go left", "Go right" } |
|
||||||
|
|
||||||
if choice == 1 then |
|
||||||
say("You chose left") |
|
||||||
elseif choice == 2 then |
|
||||||
say("You chose right") |
|
||||||
end |
|
||||||
``` |
|
||||||
|
|
||||||
Note: The curly braces syntax means that the list of options is passed as a single table parameter to the choose() function. It's a shortcut for writing this: |
|
||||||
```lua |
|
||||||
local choice = choose( {"Go left", "Go right"} ) |
|
||||||
``` |
|
||||||
|
|
||||||
# Say Dialog functions # {#say_dialog_functions} |
|
||||||
|
|
||||||
To use a custom SayDialog: |
|
||||||
|
|
||||||
1. Add as SayDialog to the scene (Tools > %Fungus > Create > SayDialog) |
|
||||||
2. Select the Lua object in the hierarchy and find the LuaBindings component. |
|
||||||
3. Add a binding to the SayDialog game object, and select the SayDialog component. N.B. Make sure to select the correct component! |
|
||||||
4. In Lua script, you can now activate this SayDialog using the setsaydialog() function, by passing the key of the SayDialog binding. |
|
||||||
|
|
||||||
To change the behaviour of the say() function, e.g. to not wait for input when done, do this: |
|
||||||
```lua |
|
||||||
sayoptions.waitforinput = false |
|
||||||
``` |
|
||||||
|
|
||||||
You can bind Character objects in a similar fashion, and set the speaking character using the setcharacter() function. |
|
||||||
|
|
||||||
This is the list of available functions for controlling SayDialogs. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Options for configuring Say Dialog behaviour |
|
||||||
sayoptions.clearprevious = true | false |
|
||||||
sayoptions.waitforinput = true | false |
|
||||||
sayoptions.fadewhendone = true | false |
|
||||||
sayoptions.stopvoiceover = true | false |
|
||||||
|
|
||||||
-- Set the active saydialog to use with the say function |
|
||||||
-- saydialog: A binding to a SayDialog component |
|
||||||
setsaydialog(saydialog) |
|
||||||
|
|
||||||
-- Gets the active say dialog, or creates one if none exists yet |
|
||||||
getsaydialog() |
|
||||||
|
|
||||||
-- Set the active character on the Say Dialog |
|
||||||
-- character: A Fungus.Character component |
|
||||||
-- portrait: The name of a sprite in the character's portrait list |
|
||||||
setcharacter(character, portrait) |
|
||||||
|
|
||||||
-- Write text to the active Say Dialog |
|
||||||
-- text: A string to write to the say dialog |
|
||||||
-- voice: A voiceover audioclip to play |
|
||||||
say(text, voiceclip) |
|
||||||
``` |
|
||||||
|
|
||||||
# Menu Dialog functions # {#menu_dialog_functions} |
|
||||||
|
|
||||||
You setup custom MenuDialogs in the same manner as SayDialogs, use the setmenudialog() function to set the active MenuDialog. |
|
||||||
|
|
||||||
The easiest way to display a list of options is using the choose() function. Remember that in Lua array indices start at 1 instead of 0 like in most other languages. |
|
||||||
|
|
||||||
You can set an option to be displayed but not selectable by prepending it with the ~ character. |
|
||||||
|
|
||||||
```lua |
|
||||||
local choice = choose { "Option 1", "Option 2", "~Option 3" } |
|
||||||
|
|
||||||
if choice == 1 then |
|
||||||
say "Chose option 1" |
|
||||||
elseif choice == 2 then |
|
||||||
say "Chose option 2" |
|
||||||
end |
|
||||||
-- Option 3 is displayed but can't be selected |
|
||||||
|
|
||||||
say "End options" |
|
||||||
``` |
|
||||||
|
|
||||||
A useful pattern is to use choose() together with Lua's goto statement and labels. This can be handy for 'flattening out' nested menu options. The [goto statement] doesn't support jumping into the scope of a local variable, but it's easy to work around this by declaring the local variable in the outer scope. You could also use a global variable (by not using the local keyword). |
|
||||||
|
|
||||||
```lua |
|
||||||
local choice = 0 |
|
||||||
|
|
||||||
choice = choose { "Option A", "Option B" } |
|
||||||
if choice == 1 then goto optionA end |
|
||||||
if choice == 2 then goto optionB end |
|
||||||
|
|
||||||
::optionA:: |
|
||||||
say "Chose option A" |
|
||||||
goto endoptions |
|
||||||
|
|
||||||
::optionB:: |
|
||||||
choice = choose { "Option C", "Option D" } |
|
||||||
if choice == 1 then goto optionC end |
|
||||||
if choice == 2 then goto optionD end |
|
||||||
goto endoptions |
|
||||||
|
|
||||||
::optionC:: |
|
||||||
say "Chose option C" |
|
||||||
goto endoptions |
|
||||||
|
|
||||||
::optionD:: |
|
||||||
say "Chose option D" |
|
||||||
goto endoptions |
|
||||||
|
|
||||||
::endoptions:: |
|
||||||
say "End options" |
|
||||||
``` |
|
||||||
|
|
||||||
The menu() and menutimer() functions provide an alternative way to use the MenuDialog. These functions return immediately, and a callback function is called when the player selects an option from the menu. |
|
||||||
|
|
||||||
This is the list of available MenuDialog functions. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Set the active menudialog to use with the menu function |
|
||||||
setmenudialog(menudialog) |
|
||||||
|
|
||||||
-- Gets the active menu dialog, or creates one if none exists yet |
|
||||||
getmenudialog() |
|
||||||
|
|
||||||
-- Display a list of menu options and wait for user to choose one. |
|
||||||
-- When an option starts with the ~ character it will be displayed but not be selectable. |
|
||||||
-- Returns the index of the selected option. |
|
||||||
-- Returns 0 if options list is empty. Note: Lua array indices start at 1, not 0). |
|
||||||
-- options: an array of option strings. e.g. { "Option 1", "Option 2" } |
|
||||||
choose(options) |
|
||||||
|
|
||||||
-- Display a list of menu options and wait for user to choose one, or for a timer to expire. |
|
||||||
-- When an option starts with the ~ character it will be displayed but not be selectable. |
|
||||||
-- Returns the index of the selected option, or the defaultoption if the timer expires. |
|
||||||
-- Returns 0 if options list is empty. Note: Lua array indices start at 1, not 0). |
|
||||||
-- options: an array of option strings. e.g. { "Option 1", "Option 2" } |
|
||||||
-- duration: Time player has to pick an option. |
|
||||||
-- defaultoption: Option index to return if the timer expires. |
|
||||||
choosetimer(options, duration, defaultoption) |
|
||||||
|
|
||||||
-- Display a menu button |
|
||||||
-- text: text to display on the button |
|
||||||
-- callback: function to call when this option is selected |
|
||||||
-- interactive (optional): if false, displays the option as disabled |
|
||||||
menu(text, callback, interactive) |
|
||||||
|
|
||||||
-- Display a timer during which the player has to choose an option. |
|
||||||
-- duration: The length of time to display the timer. |
|
||||||
-- callback: Function to call if the timer expires before an option is selected. |
|
||||||
menutimer(duration, callback) |
|
||||||
|
|
||||||
-- Clear all currently displayed menu options |
|
||||||
clearmenu() |
|
||||||
``` |
|
||||||
|
|
||||||
# Portrait functions # {#portrait_functions} |
|
||||||
|
|
||||||
Stage portraits can be controlled by using the stage. |
|
||||||
|
|
||||||
First, add your characters and stage to the LuaBindings list. |
|
||||||
|
|
||||||
![Lua Stage Binding] |
|
||||||
|
|
||||||
Then, in a lua script, use the stage commands show, showPortrait and hide to control the portraits on stage. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Show a character at this stage position |
|
||||||
stage.show(character, "left") |
|
||||||
|
|
||||||
-- show a character with a specific portrait and move it |
|
||||||
-- from one stage position to another. |
|
||||||
stage.show(character, "happy", "offscreen right", "right") |
|
||||||
|
|
||||||
-- show a specific portrait |
|
||||||
stage.showPortrait(character, "amused") |
|
||||||
|
|
||||||
-- hide a character |
|
||||||
stage.hide(character) |
|
||||||
|
|
||||||
-- Hide a character fading out to a position |
|
||||||
stage.hide(character, "offscreen left") |
|
||||||
``` |
|
||||||
You can also specify any Portrait option available by using named arguments. |
|
||||||
|
|
||||||
```lua |
|
||||||
stage.show{character=character, fromPosition="left", toPosition="right"} |
|
||||||
|
|
||||||
stage.show{character=character, portrait="angry", facing="left"} |
|
||||||
|
|
||||||
stage.hide{character=character} |
|
||||||
``` |
|
||||||
|
|
||||||
# Conversation function # {#conversation_function} |
|
||||||
|
|
||||||
The conversation() function allows you to perform long dialogue exchanges with a single function call. Lua's multiline string syntax [[ ]] is handy here. As the conversation() function takes a single string parameter you can also omit the usual function parentheses. |
|
||||||
|
|
||||||
```text |
|
||||||
conversation [[ |
|
||||||
john: Hello! |
|
||||||
sherlock: Greetings. |
|
||||||
]] |
|
||||||
``` |
|
||||||
|
|
||||||
See the docs for the @ref conversation_system. |
|
||||||
|
|
||||||
# Flowchart functions # {#flowchart_functions} |
|
||||||
|
|
||||||
We've added special functions for say() and menu() because these are so common in %Fungus games. To execute any other commands in %Fungus from Lua, you must do it in conjunction with a Flowchart & Block, like this: |
|
||||||
|
|
||||||
1. Add a Flowchart and a Block (e.g. "MyBlock") in the scene. |
|
||||||
2. Add the %Fungus commands you want to execute from Lua in the Block. (e.g Play Sound) |
|
||||||
3. Add a Lua object to the scene (Tools > %Fungus > Create > Lua) |
|
||||||
4. In the LuaBindings component, add a binding to the Flowchart gameobject, and select the Flowchart component. |
|
||||||
5. In the LuaScript component, use the runblock() function to execute the Block, passing the bound flowchart and name of the block as parameters. |
|
||||||
|
|
||||||
```lua |
|
||||||
runblock(flowchart, "MyBlock") |
|
||||||
``` |
|
||||||
|
|
||||||
You can also access any Flowchart variable from Lua via the getvar() function. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Assume the 'flowchart' variable is bound to a Flowchart component in LuaBindings |
|
||||||
-- MyVar is a string variable defined on the Flowchart |
|
||||||
|
|
||||||
local myvar = getvar(flowchart, "MyVar") |
|
||||||
|
|
||||||
print(myvar.value) |
|
||||||
|
|
||||||
myvar.value = "New value for string" |
|
||||||
``` |
|
||||||
|
|
||||||
This is the list of available functions for controlling Flowcharts. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Returns the specified Variable in a Flowchart. |
|
||||||
-- To access the value of the variable, use its .value property. e.g. |
|
||||||
-- v = getvar(flowchart, "FloatVar") |
|
||||||
-- v.value = 10 -- Sets the value of the variable to 10 |
|
||||||
-- f = v.value -- f now contains 10 |
|
||||||
-- flowchart: The Fungus Flowchart containing the Block to run. |
|
||||||
-- varname: The name of the Variable to get. |
|
||||||
getvar(flowchart, varname) |
|
||||||
|
|
||||||
-- Runs the specified Block in a Flowchart |
|
||||||
-- flowchart: The Fungus Flowchart containing the Block to run. |
|
||||||
-- blockname: The name of the Block to run. |
|
||||||
-- commandindex: Index of the command to start execution at |
|
||||||
-- nowait: If false, will yield until the Block finishes execution. If true will continue immediately. |
|
||||||
runblock(flowchart, blockname, commandindex, nowait) |
|
||||||
``` |
|
||||||
|
|
||||||
[goto statement]: http://lua-users.org/wiki/GotoStatement |
|
||||||
|
|
||||||
[Lua Stage Binding]: fungus_lua/lua_stage_binding.png |
|
||||||
|
|
@ -1,42 +0,0 @@ |
|||||||
# The Create Menu # {#lua_create_menu} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The easiest way to add Lua scripting to your scene is via the Tools > %Fungus > Create menu. This allows you to quickly instantiate one of the Lua prefabs that comes with FungusLua. The FungusLua prefabs all begin with 'Lua'. |
|
||||||
|
|
||||||
You can also access these prefabs from %Fungus/Thirdparty/FungusLua/Resources/Prefabs. |
|
||||||
|
|
||||||
![%Fungus Create Menu](fungus_lua/create_menu.png) |
|
||||||
|
|
||||||
# Lua Prefab # {#lua_prefab} |
|
||||||
|
|
||||||
This prefab provides a complete Lua setup, including the @ref lua_environment "LuaEnvironment", @ref lua_utils "LuaUtils", @ref lua_bindings "LuaBindings" and @ref lua_script "LuaScript" components in a single game object. |
|
||||||
|
|
||||||
This is perfect when you want to quickly set up a single script with a few bindings. If you're learning FungusLua, use the Lua object until you're comfortable with how all these components work. |
|
||||||
|
|
||||||
For more sophisticated scenarios it can be better to place these components in different game objects, e.g. one LuaEnvironment object, one LuaBindings object and multiple LuaScript objects that share the environment and bindings. The other prefab types listed below make it easy to set up this kind of configuration. |
|
||||||
|
|
||||||
# Lua File # {#lua_file} |
|
||||||
|
|
||||||
This option creates a Lua file in the folder you select. In Unity, Lua files use the .txt extension so they work properly with TextAsset properties and can be opened in the code editor. |
|
||||||
|
|
||||||
When you create a Lua file, add your Lua script to it in a text editor, and then select the file in the Lua File property of a LuaScript component or Execute Lua command to execute it. You can also use Lua's @ref lua_script "module system" and the require() function to include Lua code from other files. |
|
||||||
|
|
||||||
# Lua Environment Prefab {#lua_environment_prefab} |
|
||||||
|
|
||||||
This prefab provides a @ref lua_environment "LuaEnvironment" component for executing Lua script, and the @ref lua_utils "LuaUtils" component which provides useful utilities for working with Lua, Unity and %Fungus. |
|
||||||
|
|
||||||
FungusLua will automatically create a default LuaEnvironment if none exists when the scene starts, so you really only need to create a Lua Environment in your scene when you want to customize the default environment setup (e.g. Adding a string table file or registering additional c# types). |
|
||||||
|
|
||||||
# Lua Bindings Prefab # {#lua_bindings_prefab} |
|
||||||
|
|
||||||
This prefab provides a @ref lua_bindings "LuaBindings" component which you can use to bind objects in your scene / project to Lua variables so they can be accessed from Lua script. You can have multiple Lua Bindings in a scene, or additively load in a scene which contains a Lua Bindings for objects in that scene. At startup, all loaded Lua Bindings register their bindings with every Lua Environment in the scene (unless the All Environments option is switched off). |
|
||||||
|
|
||||||
If you want to make a prefab using Lua Bindings, all the bound objects must be children of the Lua Bindings prefab in the hierarchy so that Unity can maintain the object references correctly. This is a limitation of how Unity works. |
|
||||||
|
|
||||||
# Lua Script Prefab # {#lua_script_prefab} |
|
||||||
|
|
||||||
This prefab contains a @ref lua_script "Lua Script" component which you can use to execute Lua script, either typed in the inspector window or loaded via a text file. It also contains an Execute Handler component which supports executing the Lua Script when a Unity event occurs (e.g. start, update, on enter trigger, etc.) |
|
||||||
|
|
||||||
# Lua Store Prefab # {#lua_store_prefab} |
|
||||||
|
|
||||||
This prefab contains a @ref lua_store "Lua Store" component which you can use to persist Lua variables between scene loads. |
|
@ -1,23 +0,0 @@ |
|||||||
# LuaEnvironment # {#lua_environment} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The LuaEnvironment component manages all the variables, functions, executing code, etc. for a single Lua context, and provides handy functions for loading and running Lua scripts. In order to run Lua code there must be at least one LuaEnvironment component present in the scene. |
|
||||||
|
|
||||||
You can create one via (Tools > %Fungus > Create > LuaEnvironment). You usually don't need to explicitly create a LuaEnvironment though because FungusLua will create one automatically when there isn't one in the scene at startup. |
|
||||||
|
|
||||||
![LuaEnvironment](fungus_lua/lua_environment.png) |
|
||||||
|
|
||||||
# Multiple Environments # {#multiple_environments} |
|
||||||
|
|
||||||
You can use multiple LuaEnvironments in your scene to ’sandbox’ the variables, functions and executing code of independent sets of Lua scripts. If you do this, make sure to specify the appropriate LuaEnvironment when using LuaScript components, ExecuteLua commands, etc. or else they'll just use the first one they find in the scene. |
|
||||||
|
|
||||||
# VS Code Debugger # {#remote_debugger} |
|
||||||
|
|
||||||
VS Code is a free open source IDE from Microsoft which you can use to write code for Unity projects. FungusLua automatically starts a VS Code debug server when in playmode in the Unity Editor. See the [MoonSharp documentation](http://www.moonsharp.org/debugger.html) for how to configure VS Code to debug Lua scripts. Note that the game has to be running in the Unity Editor before you can connect the VS Code debugger to it. |
|
||||||
|
|
||||||
The 'Remote Debugger' option activates the built-in MoonSharp remote debugger tool. The application will halt execution on the first executed line of Lua code and open a MoonSharp debugger window in your browser. See the [MoonSharp documentation](http://www.moonsharp.org/debugger.html) for more information on using this debugger. |
|
||||||
|
|
||||||
# LuaUtils # {#lua_environment_lua_utils} |
|
||||||
|
|
||||||
When you create a LuaEnvironment object via (Tools > %Fungus > Create > LuaEnvironment), the created gameobject has another component called LuaUtils which adds many useful features to the basic LuaEnvironment setup. See the @ref lua_utils "Lua Utils" section for more info. |
|
||||||
|
|
@ -1,39 +0,0 @@ |
|||||||
# ExecuteLua Command # {#lua_execute_lua} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
This command allows you to embed a Lua script to be executed as part of a command sequence in a Block. The Lua script to be executed can be specified in the inspector or in a text file, in the same way as the @ref lua_script component. |
|
||||||
|
|
||||||
You can provide an optional LuaEnvironment to use for the execution. If none is provided then a LuaEnvironment will be selected / created automatically. If a LuaEnvironment has been set on the parent Flowchart then that environment will be used by default. |
|
||||||
|
|
||||||
The parent Flowchart will be bound to a global Lua variable prior to executing the Lua script. By default the binding name is 'flowchart', but you can change it to anything you want via the Lua Binding Name property of the parent Flowchart. |
|
||||||
|
|
||||||
You can also store the return value from the Lua script in a Flowchart variable. |
|
||||||
|
|
||||||
# Evaluating expressions # {#evaluating} |
|
||||||
|
|
||||||
The %Fungus If command can only compare 2 variables at a time. For more complex expressions involving multiple variables or [math functions], you can use Lua to evaluate the expression and store the result in a Flowchart variable. |
|
||||||
|
|
||||||
1. Add a Flowchart object (Tools > %Fungus > Create > Flowchart). Add some variables to the Flowchart. |
|
||||||
2. Add a LuaBindings object (Tools > %Fungus > Create > LuaBindings) |
|
||||||
3. Add a binding to the Flowchart gameobject, and select the Flowchart component. |
|
||||||
4. In the Flowchart, add an ExecuteLua command in a block to evaluate the complex expression. Store the return value in a Boolean Flowchart variable. |
|
||||||
5. Add an If command which checks the value of the Boolean variable. |
|
||||||
|
|
||||||
In the Execute Lua command, you can use the getvar() function to get any Flowchart variables to be used in the expression. |
|
||||||
Note: getvar() returns a reference to the %Fungus variable object. To access the value of this variable use the .value property. |
|
||||||
|
|
||||||
# Example code # {#example_code} |
|
||||||
|
|
||||||
Here's an example Lua script which evaluates a complex expression involving 3 integer variables defined on a bound Flowchart. |
|
||||||
|
|
||||||
```lua |
|
||||||
local v1 = getvar(flowchart, "Var1") |
|
||||||
local v2 = getvar(flowchart, "Var2") |
|
||||||
local v3 = getvar(flowchart, "Var3") |
|
||||||
|
|
||||||
return (v1.value == v2.value or v3.value == 5) |
|
||||||
``` |
|
||||||
|
|
||||||
Don't forget to use .value to access the value stored in the variable object, rather than the variable object itself! |
|
||||||
|
|
||||||
[math functions]: http://lua-users.org/wiki/MathLibraryTutorial |
|
@ -1,63 +0,0 @@ |
|||||||
# %Fungus Lua Module # {#lua_fungus_module} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The %Fungus Lua module provides handy functions for working with Lua, Unity and %Fungus. It is located in FungusLua/Resources/Lua/Fungus.txt and is loaded automatically when you use the Lua Script component. |
|
||||||
|
|
||||||
In this page we cover some of the more generic functionality in the module, other major features are described elsewhere in the documentation. |
|
||||||
|
|
||||||
# Inspecting Lua objects # {#inspecting_lua_objects} |
|
||||||
|
|
||||||
You can use Lua's built in print() function to get a basic description of any object printed to the console. When you want to get a more detailed description of an object, use inspect(). |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Prints a short description of object v |
|
||||||
print(v) |
|
||||||
|
|
||||||
-- Prints a summary of object v in a human readable format. |
|
||||||
inspect(v) |
|
||||||
``` |
|
||||||
|
|
||||||
# Running Unity coroutines # {#run_unity_coroutines} |
|
||||||
|
|
||||||
When you bind to a C# component using Lua Bindings, you can access any public method in the class. If a method returns IEnumerator then that method can be executed as a [Unity coroutine], which is a powerful way to run asynchronous code. |
|
||||||
|
|
||||||
The runwait() function allows you to call a C# coroutine method from Lua which may take multiple frames to finish its work, and then carry on with the rest of the Lua code once that C# method has finished executing. This is how the say() function works for example. |
|
||||||
|
|
||||||
This is the list of available functions for waiting and working with coroutines. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Waits for a number of seconds, then continue execution of Lua script |
|
||||||
wait(duration) |
|
||||||
|
|
||||||
-- Waits until the Lua function provided returns true, or the timeout expires. |
|
||||||
-- Returns true if the function succeeded, or false if the timeout expired |
|
||||||
waitfor(fn, timeoutduration) |
|
||||||
|
|
||||||
-- Run a C# coroutine and continue execution of Lua script |
|
||||||
run(co) |
|
||||||
|
|
||||||
-- Run a C# coroutine, wait until it completes, then continue execution of Lua script |
|
||||||
runwait(co) |
|
||||||
``` |
|
||||||
|
|
||||||
# Globals vs Table mode # {#globals_vs_tables} |
|
||||||
|
|
||||||
The %Fungus module can be used in three modes, controlled by the %Fungus Module option in the LuaUtils component. |
|
||||||
|
|
||||||
1. Use Global Variables: all module functions are mapped to global functions. This allows for convenient access, but it runs the risk that you might accidentally declare a variable with the same name as a %Fungus module function. |
|
||||||
2. Use %Fungus Variable: all module functions are accessed through a global table called 'fungus'. This gives a degree of namespace safety at the cost of more typing. |
|
||||||
3. No %Fungus Module: the %Fungus module will not be registered. Used if you don't want to use the %Fungus module. |
|
||||||
|
|
||||||
Options 1 and 2 are functionaly equivalent, it's just a matter of personal preference which you want to use. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- sub is a function in the %Fungus module, mapped to a global variable |
|
||||||
|
|
||||||
-- Use Global Variables |
|
||||||
sub('a string') |
|
||||||
|
|
||||||
-- Use Fungus Variable |
|
||||||
fungus.sub('a string') |
|
||||||
``` |
|
||||||
|
|
||||||
[Unity coroutine]: http://docs.unity3d.com/Manual/Coroutines.html |
|
@ -1,61 +0,0 @@ |
|||||||
# PlayerPrefs # {#lua_preferences} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The [Unity PlayerPrefs] system stores and accesses player preferences between game sessions. |
|
||||||
|
|
||||||
# PlayerPrefs example # {#playerprefs_example} |
|
||||||
|
|
||||||
Here's an example of using PlayerPrefs from Lua. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Saving a value to preferences |
|
||||||
playerprefs.SetInt("SaveName", 1) |
|
||||||
playerprefs.Save() |
|
||||||
|
|
||||||
-- Using a value from preferences |
|
||||||
local v = playerprefs.GetInt("SaveName") |
|
||||||
print(v) -- Will print out 1 |
|
||||||
``` |
|
||||||
|
|
||||||
# FungusPrefs |
|
||||||
|
|
||||||
The FungusPrefs class is a wrapper around PlayerPrefs that adds support for save slots. |
|
||||||
|
|
||||||
Basically, if you want to store simple values use PlayerPrefs. If you want to store values using multiple player profiles, you should use FungusPrefs. The slot variable is an integer [0..] and key is a string. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Deletes all saved values for all slots. |
|
||||||
prefs.DeleteAll() |
|
||||||
|
|
||||||
-- Removes key and its value from this save slot. |
|
||||||
prefs.DeleteKey(slot, key) |
|
||||||
|
|
||||||
-- Returns the float value associated with this key in this save slot, it it exists. |
|
||||||
prefs.GetFloat(slot, key, defaultValue) |
|
||||||
|
|
||||||
-- Returns the int value associated with this key in this save slot, it it exists. |
|
||||||
prefs.GetInt(slot, key, defaultValue) |
|
||||||
|
|
||||||
-- Returns the string value associated with this key in this save slot, it it exists. |
|
||||||
prefs.GetString(slot, key, defaultValue) |
|
||||||
|
|
||||||
-- Returns true if the key exists in this save slot. |
|
||||||
prefs.HasKey(slot, key) |
|
||||||
|
|
||||||
-- Writes all modified prefences to disk. |
|
||||||
prefs.Save() |
|
||||||
|
|
||||||
-- Sets the value of the preference identified by key for this save slot. |
|
||||||
prefs.SetFloat(slot, key, value) |
|
||||||
|
|
||||||
-- Sets the value of the preference identified by key for this save slot. |
|
||||||
prefs.SetInt(slot, key, value) |
|
||||||
|
|
||||||
-- Sets the value of the preference identified by key for this save slot. |
|
||||||
prefs.SetString(slot, key, value) |
|
||||||
|
|
||||||
-- Returns the combined key used to identify a key within a save slot. |
|
||||||
prefs.GetSlotKey(slot, key) |
|
||||||
``` |
|
||||||
|
|
||||||
[Unity PlayerPrefs]: http://docs.unity3d.com/ScriptReference/PlayerPrefs.html |
|
@ -1,83 +0,0 @@ |
|||||||
# LuaScript # {#lua_script} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
The LuaScript component provides an easy way to run Lua scripts in your scene. You can create a LuaScript object via (Tools > %Fungus > Create > LuaScript). |
|
||||||
|
|
||||||
![LuaScript](fungus_lua/lua_script.png) |
|
||||||
|
|
||||||
# ExecuteHandler component # {#execute_handler} |
|
||||||
|
|
||||||
When you create a LuaScript object, you'll see that it contains a component called 'ExecuteHandler'. This component allows you to specify options for when the Lua script should execute. By default it executes the Lua script when the scene starts, but you can change this to execute after a delay, on every update, on trigger events, etc. |
|
||||||
|
|
||||||
If you want to execute a LuaScript from a custom C# script, set On Event to 'Nothing' and instead call the LuaScript.OnExecute() method directly. You can also call the OnExecute() method from a UI event, e.g. a UI Button 'On Click' event. |
|
||||||
|
|
||||||
# Lua script and files # {#lua_script_files} |
|
||||||
|
|
||||||
You can enter the Lua code you wish to execute directly into the 'Lua Script' text box. You can also put Lua code into a text file in your project and use the Lua File property to execute it. |
|
||||||
|
|
||||||
You can also use both options at the same time. In this case, the Lua File contents are loaded first and the Lua Script text is appended to that. This is a handy feature for code reuse and configuration, e.g. create a Lua text file with Lua functions to control your game, and then call those functions from the Lua Script text box. |
|
||||||
|
|
||||||
# Lua modules and require() # {#lua_require} |
|
||||||
|
|
||||||
The Lua module system allows you to create reusable packages of Lua code and include these in your Lua scripts. [This tutorial] explains how to write Lua modules. Module files in FungusLua need to be put into a special folder structure so that the Lua require() function is able to locate them. |
|
||||||
|
|
||||||
To use a Lua module: |
|
||||||
|
|
||||||
1. Create a Resources/Lua folder in your project. The capitalization here is important. The folder can be created inside an existing folder in your project. |
|
||||||
2. Create a mymodule.txt file inside the Resources/Lua folder and add your Lua script to it. (Rename mymodule.txt to whatever you want). |
|
||||||
3. You can now use the Lua require function to load the module for use in any Lua script, for example |
|
||||||
|
|
||||||
```lua |
|
||||||
local mymodule = require("mymodule") |
|
||||||
|
|
||||||
-- Call a function in the module |
|
||||||
mymodule.myfunction() |
|
||||||
``` |
|
||||||
|
|
||||||
# Error messages # {#error_messages} |
|
||||||
|
|
||||||
When a script contains errors there are a few techniques you can use to track down the source. |
|
||||||
|
|
||||||
FungusLua compiles Lua code at scene startup so that it can be quickly executed when needed later on. This means you will usually see Lua syntax error messages in the console at startup (during compilation), and runtime errors when the script executes later on. |
|
||||||
|
|
||||||
All Lua script errors generate an error message in the Unity log, displayed in red. |
|
||||||
|
|
||||||
For example, if you try to run this invalid code in a LuaScript object: |
|
||||||
```lua |
|
||||||
not valid lua |
|
||||||
``` |
|
||||||
|
|
||||||
It will generate an error message in the log like this |
|
||||||
```lua |
|
||||||
LuaScript.LuaScript:(1,0-3): unexpected symbol near 'not' |
|
||||||
1: not valid lua |
|
||||||
``` |
|
||||||
|
|
||||||
- The first 'LuaScript.LuaScript' part gives you information about where the Lua script is running from. |
|
||||||
- The next part in brackets '(1,0-3)' tells you the line number and character range where the error is located. |
|
||||||
- The last part gives you a description of the type of error. |
|
||||||
- The next line on gives a listing of the Lua source code. Use the linenumber info above to locate the line causing the problem. |
|
||||||
|
|
||||||
One of the most common errors is attempting to access a variable that doesn't exist. In this example error message, we've tried to access the field 'name' on a variable v that hasn't been defined yet. |
|
||||||
|
|
||||||
```lua |
|
||||||
LuaScript.LuaScript:(1,7-9): attempt to index a nil value |
|
||||||
1: print(v.name) |
|
||||||
``` |
|
||||||
|
|
||||||
To resolve this type of error, carefully check that the variable you want to access has been defined, is spelled correctly and is what you think it is. You can use the print() and inspect() functions to display information about the object in the console. For instance, you may have added a binding to a gameobject, but forgot to select the correct component in the binding. |
|
||||||
|
|
||||||
For runtime errors, a useful technique is to add print() calls in your code just before where the error occurs, and run it again. This way you can print out information to the console to help track down the cause of the error. |
|
||||||
|
|
||||||
MoonSharp includes a remote debugger tool which you can use to step through Lua code and inspect variables. See the @ref lua_environment for more information. |
|
||||||
|
|
||||||
# Setting the LuaEnvironment # {#setting_lua_environment} |
|
||||||
|
|
||||||
By default the LuaScript component will use the first LuaEnvironment it finds in the scene to execute, or create one if none exists. If you want to use a specific LuaEnvironment, set it in the Lua Environment property. This is a good way to keep unrelated sets of Lua scripts sandboxed from each other. |
|
||||||
|
|
||||||
# RunAsCoroutine option # {#runascoroutine_option} |
|
||||||
|
|
||||||
This option will run the Lua script as a Lua coroutine which is useful for writing asynchronous code via the coroutine.yield() function in Lua. If you don't need to execute your Lua script asynchronously, deselecting this option will avoid the overhead of running as a coroutine. Recommended for advanced users only! |
|
||||||
|
|
||||||
[This tutorial]: http://www.tutorialspoint.com/lua/lua_modules.htm |
|
||||||
|
|
@ -1,24 +0,0 @@ |
|||||||
# LuaStore {#lua_store} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
A common issue when working with multiple scenes in Unity is how to persist variable values from one scene to the next. By default, all scene objects and their properties are destroyed when you load another scene. |
|
||||||
|
|
||||||
# The Lua Store component # {#lua_store_component} |
|
||||||
|
|
||||||
The Lua Store component provides an easy way around this when using Lua scripting. A shared global table called ‘store’ is bound in every Lua Environment when the scene starts. This global table persists between scene loads, which means you can set a store variable in one scene, load another scene, then access the same store variable and it will still retain the value you set earlier. |
|
||||||
|
|
||||||
# Example # {#lua_store_example} |
|
||||||
|
|
||||||
- Add a LuaStore to the first scene in your game (Tools >%Fungus > Create > LuaStore). |
|
||||||
- Set variables in the store in Lua, e.g. |
|
||||||
|
|
||||||
```lua |
|
||||||
store.name = "John" |
|
||||||
``` |
|
||||||
|
|
||||||
- Load another scene, e.g. using the Load Scene command in Fungus |
|
||||||
- Get the same variable from the store, e.g. |
|
||||||
|
|
||||||
```lua |
|
||||||
print(store.name) -- prints "John" |
|
||||||
``` |
|
@ -1,66 +0,0 @@ |
|||||||
# String Table # {#lua_string_table} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
# Text localisation # {#lua_text_localisation} |
|
||||||
|
|
||||||
The LuaUtils component provides support for simple text localisation. |
|
||||||
|
|
||||||
1. Define your language strings in a JSON file and save it in the project assets folder. |
|
||||||
2. Add a LuaEnvironment component to your scene - e.g. Tools > %Fungus > Create > LuaEnvironment |
|
||||||
3. In the LuaUtils component, set the String Table property to reference your JSON file asset. |
|
||||||
4. Use the {$VarName} syntax to subsitute a localised string anywhere that string substitution is supported. e.g. in a Lua script: |
|
||||||
|
|
||||||
```lua |
|
||||||
say("{$hello_world}") |
|
||||||
``` |
|
||||||
|
|
||||||
You can use the {$VarName} syntax anywhere that variable subsitution is supported. This includes: |
|
||||||
|
|
||||||
- Say command |
|
||||||
- Menu command |
|
||||||
- Set Text command |
|
||||||
- Write command |
|
||||||
- Conversation command |
|
||||||
- Character object - character name |
|
||||||
- Debug Log command |
|
||||||
- Load Variable command - save key |
|
||||||
- Save Variable command - save key |
|
||||||
- Delete Save Key command |
|
||||||
|
|
||||||
You can also extend the %Fungus string substitution system with your own components. Implement the StringSubstituter.ISubstitutionHandler interface in a Monobehavior subclass and then return the modified string from SubstituteStrings(). |
|
||||||
|
|
||||||
# JSON Format # {#json_format} |
|
||||||
|
|
||||||
This is an example of the JSON format for the string table. To use this localised string, you would use the {$hello_world} tag. |
|
||||||
|
|
||||||
```json |
|
||||||
{ |
|
||||||
"hello_world" : { |
|
||||||
"en" : "Hello world!", |
|
||||||
"fr" : "Bonjour le monde!", |
|
||||||
"de" : "Hallo Welt!" |
|
||||||
}, |
|
||||||
"goodbye_world" : { |
|
||||||
"en" : "Goodbye world!", |
|
||||||
"fr" : "Au revoir monde!", |
|
||||||
"de" : "Auf Wiedersehen Welt!" |
|
||||||
} |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
# Lua Functions # {#stringtable_lua_functions} |
|
||||||
|
|
||||||
These Lua functions are available for working with the string table. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Set active language for string table |
|
||||||
setlanguage(languagecode) |
|
||||||
|
|
||||||
-- Get a named string from the string table |
|
||||||
getstring(key) |
|
||||||
|
|
||||||
-- Substitutes variables and localisation strings into a piece of text |
|
||||||
-- e.g. v = 10, "Subbed value is [$v]" => "Subbed value is 10" |
|
||||||
sub(text) |
|
||||||
``` |
|
||||||
|
|
@ -1,41 +0,0 @@ |
|||||||
# Unity Test Tools # {#lua_unity_test_tools} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
If you are using the [Unity Test Tools], FungusLua is a powerful and fast way to create integration tests using Lua scripting. |
|
||||||
|
|
||||||
# Example # {#utt_example} |
|
||||||
|
|
||||||
1. Create a new test in the scene. |
|
||||||
2. Add a Lua object (Tools > %Fungus > Create > Lua) as a child of the test object. |
|
||||||
4. In the LuaScript component, use the check() function to assert whatever conditions you need for the test. At the end, call pass(). |
|
||||||
|
|
||||||
Example test script: |
|
||||||
```lua |
|
||||||
-- Check a condition, and output a reason if it fails |
|
||||||
check( myvar < 40, "My var is too big") |
|
||||||
|
|
||||||
-- Just check a condition |
|
||||||
check( myvar > 20 ) |
|
||||||
|
|
||||||
-- Test will exit successfully |
|
||||||
pass() |
|
||||||
``` |
|
||||||
|
|
||||||
If any of the checks fail, then the test fails immediately. |
|
||||||
|
|
||||||
# Lua Functions # {#utt_lua_functions} |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Checks if a condition is true |
|
||||||
-- Lua has a built in assert function, so we called this check to avoid conflicting. |
|
||||||
check(c, reason) |
|
||||||
|
|
||||||
-- Pass an integration test |
|
||||||
pass() |
|
||||||
|
|
||||||
-- Fail an integration test |
|
||||||
-- reason: Optional string explaining why the test failed. |
|
||||||
fail(reason) |
|
||||||
``` |
|
||||||
|
|
||||||
[Unity Test Tools]: http://u3d.as/65h |
|
@ -1,111 +0,0 @@ |
|||||||
# LuaUtils # {#lua_utils} |
|
||||||
[TOC] |
|
||||||
|
|
||||||
LuaUtils is a component that extends the Lua environment with some commonly used functionality. |
|
||||||
|
|
||||||
It can be accessed from Lua scripts via the 'luautils' global variable. This component mostly does a lot of setup work in the background, but it also provides some handy functions for instantiating, finding and destroying gameobjects in the scene. |
|
||||||
|
|
||||||
# Example # {#lua_utils_example} |
|
||||||
|
|
||||||
Here's an example of the kind of thing you can do: |
|
||||||
|
|
||||||
```lua |
|
||||||
local go = luautils.Find("MyObject") -- Find a game object by name |
|
||||||
luautils.Destroy(go) -- Destroy it |
|
||||||
``` |
|
||||||
|
|
||||||
# GameObject Functions # {#gameobject_functions} |
|
||||||
|
|
||||||
This is the list of GameObject functions provided in luautils. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Find a game object by name and returns it. |
|
||||||
GameObject Find(string name) |
|
||||||
|
|
||||||
-- Returns one active GameObject tagged tag. Returns null if no GameObject was found. |
|
||||||
GameObject FindWithTag(string tag) |
|
||||||
|
|
||||||
-- Returns a list of active GameObjects tagged tag. Returns empty array if no GameObject was found. |
|
||||||
GameObject[] FindGameObjectsWithTag(string tag) |
|
||||||
|
|
||||||
-- Create a copy of a GameObject. |
|
||||||
-- Can be used to instantiate prefabs. |
|
||||||
GameObject Instantiate(GameObject go) |
|
||||||
|
|
||||||
-- Destroys an instance of a GameObject. |
|
||||||
Destroy(GameObject go) |
|
||||||
|
|
||||||
-- Spawns an instance of a named prefab resource. |
|
||||||
-- The prefab must exist in a Resources folder in the project. |
|
||||||
GameObject Spawn(string resourceName) |
|
||||||
``` |
|
||||||
|
|
||||||
# Registering C# Types # {#registering_types} |
|
||||||
|
|
||||||
The most important function of the LuaUtils component is registering C# types so that instances of those types can be accessed from Lua scripts. |
|
||||||
|
|
||||||
In order to access the members of a C# type from Lua, the type first has to be registered with MoonSharp. Note that for objects added using the LuaBindings component, the relevant types are registered automatically. |
|
||||||
|
|
||||||
In some cases however, you will need to register a type explicitly. The easiest way to do this is by adding the type's name to the FungusTypes.txt or UnityTypes.txt JSON files referenced by the LuaUtils component. You can also create your own JSON files to register additional types. Note that types that are not contained in the main application DLL will need to use the [namespace qualified type name] in the JSON file. |
|
||||||
|
|
||||||
# Example JSON Type File # {#example_json_file} |
|
||||||
|
|
||||||
Example of a types JSON file: |
|
||||||
```json |
|
||||||
{ |
|
||||||
"registerTypes" : [ |
|
||||||
"Fungus.Block" |
|
||||||
], |
|
||||||
"extensionTypes" : [ |
|
||||||
"Fungus.LuaExtensions" |
|
||||||
] |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
# Registering Types Directly # {#register_types_directly} |
|
||||||
|
|
||||||
If you need to register types directly from C#, or do a more complex type of registration, you can use the MoonSharp UserData class to do this. See the MoonSharp documentation for a list of supported registration methods. A good place to register C# types is in the Awake method of a custom component. |
|
||||||
|
|
||||||
# Other Utilities # {#lua_utils_other} |
|
||||||
|
|
||||||
LuaUtils creates bindings for several useful C# classes and components so that you can access them from Lua script. |
|
||||||
|
|
||||||
| Binding name | Description | |
|
||||||
| ----------------- | ----------- | |
|
||||||
| time | The [Unity Time class]. e.g. 'time.deltaTime' returns the delta time for this frame | |
|
||||||
| playerprefs | The @ref lua_preferences "Lua Preferences" class. Used for saving data to disk. | |
|
||||||
| prefs | The @ref lua_preferences "Fungus Prefs" class, our own wrapper around PlayerPrefs that adds a slots systems. | |
|
||||||
| factory | The @ref lua_utils "PODTypeFactory" class for creating common plain-old-data types | |
|
||||||
| luaenvironment | The LuaEnvironment component used to execute Lua scripts | |
|
||||||
| luautils | A reference to the LuaUtils component itself | |
|
||||||
| test | Support for @ref lua_unity_test_tools (if installed) | |
|
||||||
| stringtable | The FungusLua localisation @ref lua_string_table | |
|
||||||
|
|
||||||
# PODFactory # {#pod_factory} |
|
||||||
|
|
||||||
Due to limitations in C# / Mono, MoonSharp has limited support for working with Plain-Old-Data (struct) types like [Vector3](http://docs.unity3d.com/ScriptReference/Vector3.html), [Color](http://docs.unity3d.com/ScriptReference/Color.html), etc. |
|
||||||
|
|
||||||
The best approach here is to treat POD properties as immutable objects, and never try to modify a POD variable that has been acquired from a C# object. Instead, you should construct a new POD object, populate it with the required values and then pass that object in calls to C# code. The LuaUtils PODFactory class helps do this for common Unity types. |
|
||||||
|
|
||||||
```lua |
|
||||||
-- Returns a new Color object |
|
||||||
local c = factory.color(1,1,1,1) |
|
||||||
|
|
||||||
-- Returns a new Vector2 object |
|
||||||
local v2 = factory.vector2(1, 2) |
|
||||||
|
|
||||||
-- Returns a new Vector3 object |
|
||||||
local v3 = factory.vector3(1, 2, 3) |
|
||||||
|
|
||||||
-- Returns a new Vector4 object |
|
||||||
local v4 = factory.vector4(1, 2, 3, 4) |
|
||||||
|
|
||||||
-- Returns a new Quaternion object |
|
||||||
local q = factory.quaternion(float x, float y, float z) -- Rotation in euler angles |
|
||||||
|
|
||||||
-- Returns a new Rect object |
|
||||||
local r = factory.rect(float x, float y, float width, float height) |
|
||||||
``` |
|
||||||
|
|
||||||
[namespace qualified type name]: https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx |
|
||||||
[Unity Time class]: http://docs.unity3d.com/ScriptReference/Time.html |
|
@ -1,5 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
rm -rf ../Build/Docs |
|
||||||
cp ../Assets/Fungus/Docs/CHANGELOG.txt fungus_docs/change_log.md |
|
||||||
/Applications/Doxygen.app/Contents/Resources/doxygen ./Doxyfile |
|
||||||
cp -R ../Build/Docs/* ../../snozbot.github.io |
|
@ -1,22 +0,0 @@ |
|||||||
Building the Fungus documentation |
|
||||||
================================= |
|
||||||
|
|
||||||
1. Download and install Doxygen from http://www.doxygen.org |
|
||||||
2. Run Doxygen and open the file called 'Doxyfile' |
|
||||||
3. Click the Run tab and click the Run Doxygen button. |
|
||||||
|
|
||||||
Doxygen will process all source code and markdown files and place the HTML documentation in Build/Docs. |
|
||||||
|
|
||||||
Contributing |
|
||||||
============ |
|
||||||
|
|
||||||
To add or change something in the documentation please submit a pull request via github. |
|
||||||
|
|
||||||
License |
|
||||||
======= |
|
||||||
|
|
||||||
The Fungus documentation is licensed under the Creative Commons Attribution-NonCommercial License. |
|
||||||
https://creativecommons.org/licenses/by-nc/3.0/ |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,65 +0,0 @@ |
|||||||
<!-- HTML header for doxygen 1.8.11--> |
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
||||||
<head> |
|
||||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/> |
|
||||||
<meta name="generator" content="Doxygen $doxygenversion"/> |
|
||||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME--> |
|
||||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME--> |
|
||||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/> |
|
||||||
<script type="text/javascript" src="$relpath^jquery.js"></script> |
|
||||||
<script type="text/javascript" src="$relpath^dynsections.js"></script> |
|
||||||
|
|
||||||
<script> |
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
|
||||||
ga('create', 'UA-59839218-1', 'auto'); |
|
||||||
ga('send', 'pageview'); |
|
||||||
</script> |
|
||||||
|
|
||||||
$treeview |
|
||||||
$search |
|
||||||
$mathjax |
|
||||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" /> |
|
||||||
$extrastylesheet |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
|
||||||
|
|
||||||
<!--BEGIN TITLEAREA--> |
|
||||||
<div id="titlearea" style="background-color: #B7CEEC;"> |
|
||||||
<table cellspacing="0" cellpadding="0"> |
|
||||||
<tbody> |
|
||||||
<tr style="height: 56px;"> |
|
||||||
<!--BEGIN PROJECT_LOGO--> |
|
||||||
<td id="projectlogo"><a href="https://fungusgames.com" target="_blank"><img alt="Logo" src="$relpath^$projectlogo"/></a></td> |
|
||||||
<!--END PROJECT_LOGO--> |
|
||||||
<!--BEGIN PROJECT_NAME--> |
|
||||||
<td id="projectalign" style="padding-left: 0.5em;"> |
|
||||||
<div id="projectname"><!--$projectname--> |
|
||||||
<!--BEGIN PROJECT_NUMBER--> <span id="projectnumber"><!--$projectnumber--></span><!--END PROJECT_NUMBER--> |
|
||||||
</div> |
|
||||||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectnumber $projectbrief</div><!--END PROJECT_BRIEF--> |
|
||||||
</td> |
|
||||||
<!--END PROJECT_NAME--> |
|
||||||
<!--BEGIN !PROJECT_NAME--> |
|
||||||
<!--BEGIN PROJECT_BRIEF--> |
|
||||||
<td style="padding-left: 0.5em;"> |
|
||||||
<div id="projectbrief">$projectbrief</div> |
|
||||||
</td> |
|
||||||
<!--END PROJECT_BRIEF--> |
|
||||||
<!--END !PROJECT_NAME--> |
|
||||||
<!--BEGIN DISABLE_INDEX--> |
|
||||||
<!--BEGIN SEARCHENGINE--> |
|
||||||
<td>$searchbox</td> |
|
||||||
<!--END SEARCHENGINE--> |
|
||||||
<!--END DISABLE_INDEX--> |
|
||||||
</tr> |
|
||||||
</tbody> |
|
||||||
</table> |
|
||||||
</div> |
|
||||||
<!--END TITLEAREA--> |
|
||||||
<!-- end header part --> |
|
@ -1,24 +0,0 @@ |
|||||||
# Command Reference {#command_reference} |
|
||||||
|
|
||||||
This is the reference documentation for all %Fungus commands. |
|
||||||
|
|
||||||
* @subpage animation_commands |
|
||||||
* @subpage audio_commands |
|
||||||
* @subpage camera_commands |
|
||||||
* @subpage flow_commands |
|
||||||
* @subpage itween_commands |
|
||||||
* @subpage input_commands |
|
||||||
* @subpage leanTween_commands |
|
||||||
* @subpage math_commands |
|
||||||
* @subpage narrative_commands |
|
||||||
* @subpage rigidbody2d_commands |
|
||||||
* @subpage scene_commands |
|
||||||
* @subpage scripting_commands |
|
||||||
* @subpage sprite_commands |
|
||||||
* @subpage transform_commands |
|
||||||
* @subpage variable_commands |
|
||||||
* @subpage vector3_commands |
|
||||||
* @subpage ui_commands |
|
||||||
* @subpage tests_commands |
|
||||||
|
|
||||||
See @ref eventhandler_reference for the event handlers that cause blocks to execute. |
|
@ -1,12 +0,0 @@ |
|||||||
# Event Handler Reference {#eventhandler_reference} |
|
||||||
|
|
||||||
This is the reference documentation for all %Fungus event handlers. |
|
||||||
|
|
||||||
* @subpage core_events |
|
||||||
* @subpage input_events |
|
||||||
* @subpage monobeh_events |
|
||||||
* @subpage sprite_events |
|
||||||
* @subpage scene_events |
|
||||||
* @subpage ui_events |
|
||||||
|
|
||||||
See @ref command_reference for the commands that can be run within the blocks executed by these events. |
|
@ -1,17 +0,0 @@ |
|||||||
# Fungus Lua {#fungus_lua} |
|
||||||
|
|
||||||
FungusLua is a simple way to embed Lua scripting into your Unity project. Lua is an easy to learn scripting language so it's a great way to empower artists, writers and designers to use more of the power of Unity. |
|
||||||
|
|
||||||
* @subpage lua_about_funguslua |
|
||||||
* @subpage lua_create_menu |
|
||||||
* @subpage lua_environment |
|
||||||
* @subpage lua_bindings |
|
||||||
* @subpage lua_script |
|
||||||
* @subpage lua_utils |
|
||||||
* @subpage lua_fungus_module |
|
||||||
* @subpage lua_controlling_fungus |
|
||||||
* @subpage lua_execute_lua |
|
||||||
* @subpage lua_preferences |
|
||||||
* @subpage lua_store |
|
||||||
* @subpage lua_string_table |
|
||||||
* @subpage lua_unity_test_tools |
|
@ -1,31 +0,0 @@ |
|||||||
# %Fungus Documentation # |
|
||||||
|
|
||||||
Welcome to the documentation website for %Fungus, the open source visual storytelling tool for [Unity]. The main website for %Fungus and our [community forum] are available at [FungusGames.com]. |
|
||||||
|
|
||||||
There's a wide range of training material available here, suitable for both beginner and experienced game developers. |
|
||||||
|
|
||||||
* @subpage about_fungus |
|
||||||
* @subpage training_course |
|
||||||
* @subpage tutorial_videos |
|
||||||
* @subpage installation |
|
||||||
* @subpage getting_started |
|
||||||
* @subpage flowcharts |
|
||||||
* @subpage blocks |
|
||||||
* @subpage variables |
|
||||||
* @subpage telling_a_story |
|
||||||
* @subpage playing_audio |
|
||||||
* @subpage conversation_system |
|
||||||
* @subpage community_tutorials |
|
||||||
* @subpage narrative_text_tags |
|
||||||
* @subpage text_variation_system |
|
||||||
* @subpage save_system |
|
||||||
* @subpage coding_tips |
|
||||||
* @subpage coding_standard |
|
||||||
* @subpage glossary |
|
||||||
* @subpage faq |
|
||||||
* @subpage changelog |
|
||||||
* @subpage code_of_conduct |
|
||||||
|
|
||||||
[Unity]: http://unity3d.com |
|
||||||
[community forum]: http://fungusgames.com/forum |
|
||||||
[FungusGames.com]: http://fungusgames.com |
|
Loading…
Reference in new issue