Browse Source

Updated Narrative examples to use the choose() function instead of menu()

master
Christopher 9 years ago
parent
commit
a7befc408a
  1. 74
      Assets/FungusExamples/FungusLua/Narrative/NarrativeExample.unity
  2. 19
      Assets/FungusExamples/FungusLua/Narrative/Resources/Lua/junglestory.txt

74
Assets/FungusExamples/FungusLua/Narrative/NarrativeExample.unity

@ -13,7 +13,7 @@ SceneSettings:
--- !u!104 &2 --- !u!104 &2
RenderSettings: RenderSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 6 serializedVersion: 7
m_Fog: 0 m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3 m_FogMode: 3
@ -37,12 +37,12 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 6 serializedVersion: 7
m_GIWorkflowMode: 1 m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings: m_GISettings:
serializedVersion: 2 serializedVersion: 2
m_BounceScale: 1 m_BounceScale: 1
@ -53,17 +53,22 @@ LightmapSettings:
m_EnableBakedLightmaps: 0 m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0 m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings: m_LightmapEditorSettings:
serializedVersion: 3 serializedVersion: 4
m_Resolution: 2 m_Resolution: 2
m_BakeResolution: 40 m_BakeResolution: 40
m_TextureWidth: 1024 m_TextureWidth: 1024
m_TextureHeight: 1024 m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1 m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0 m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1 m_TextureCompression: 1
m_DirectLightInLightProbes: 1
m_FinalGather: 0 m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024 m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2 m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0} m_LightingDataAsset: {fileID: 0}
@ -122,6 +127,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 4 m_RootOrder: 4
@ -152,6 +158,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 369768318} m_Father: {fileID: 369768318}
m_RootOrder: 0 m_RootOrder: 0
@ -228,6 +235,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 1914784318} m_Father: {fileID: 1914784318}
m_RootOrder: 0 m_RootOrder: 0
@ -300,6 +308,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 269274606} - {fileID: 269274606}
m_Father: {fileID: 1262340433} m_Father: {fileID: 1262340433}
@ -383,7 +392,7 @@ MonoBehaviour:
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -433,6 +442,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 1225017618} m_Father: {fileID: 1225017618}
m_RootOrder: 0 m_RootOrder: 0
@ -511,6 +521,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 2008403089} - {fileID: 2008403089}
m_Father: {fileID: 1262340433} m_Father: {fileID: 1262340433}
@ -594,7 +605,7 @@ MonoBehaviour:
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -645,6 +656,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1245855837} - {fileID: 1245855837}
- {fileID: 903888915} - {fileID: 903888915}
@ -742,6 +754,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 886771752} m_Father: {fileID: 886771752}
m_RootOrder: 0 m_RootOrder: 0
@ -818,6 +831,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 903888915} m_Father: {fileID: 903888915}
m_RootOrder: 0 m_RootOrder: 0
@ -896,6 +910,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 663108171} - {fileID: 663108171}
m_Father: {fileID: 1262340433} m_Father: {fileID: 1262340433}
@ -979,7 +994,7 @@ MonoBehaviour:
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -1030,6 +1045,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 879686982} - {fileID: 879686982}
m_Father: {fileID: 614649409} m_Father: {fileID: 614649409}
@ -1154,6 +1170,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 1594811189} m_Father: {fileID: 1594811189}
m_RootOrder: 0 m_RootOrder: 0
@ -1255,6 +1272,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 6
@ -1287,6 +1305,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 391726715} - {fileID: 391726715}
m_Father: {fileID: 1262340433} m_Father: {fileID: 1262340433}
@ -1370,7 +1389,7 @@ MonoBehaviour:
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -1420,6 +1439,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 1635249823} m_Father: {fileID: 1635249823}
m_RootOrder: 0 m_RootOrder: 0
@ -1552,6 +1572,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10} m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
@ -1582,6 +1603,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 614649409} m_Father: {fileID: 614649409}
m_RootOrder: 0 m_RootOrder: 0
@ -1658,6 +1680,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 369768318} - {fileID: 369768318}
- {fileID: 1225017618} - {fileID: 1225017618}
@ -1809,6 +1832,7 @@ MonoBehaviour:
- key: menudialog - key: menudialog
obj: {fileID: 1851713324} obj: {fileID: 1851713324}
component: {fileID: 1851713325} component: {fileID: 1851713325}
showInherited: 0
--- !u!114 &1308476107 --- !u!114 &1308476107
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1823,12 +1847,12 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
luaEnvironment: {fileID: 1308476105} luaEnvironment: {fileID: 1308476105}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: "-- Lua functions are the equivalent of Blocks \n-- in a Fungus flowchart.\n\nsetsaydialog(saydialog)\nsetmenudialog(menudialog)\n\nfunction luaScript: "setsaydialog(saydialog)\nsetmenudialog(menudialog)\n\nsay \"Welcome!\"\n\nsayoptions.waitforinput
start()\n say \"Welcome!\"\n\n sayoptions.waitforinput = false\n sayoptions.fadewhendone = false\nsayoptions.fadewhendone = false\n\nsay \"Select an option\"\n\nsayoptions.waitforinput
= false\n\n say \"Select an option\"\n\n sayoptions.waitforinput = true\n = true\nsayoptions.fadewhendone = true\n\n-- choose() takes a single table parameter
\ sayoptions.fadewhendone = true\n\n menu(\"Option A\", optiona)\n menu(\"Option (note the curly brackets!)\n\nlocal choice = choose{ \"Option A\", \"Option B\"
B\", optionb)\nend\n\nfunction optiona()\n say(\"You chose option a\")\nend\n\nfunction }\n\nif choice == 1 then\n say \"You chose option a\"\nelseif choice == 2 then\n
optionb()\n say(\"You chose option b\")\nend\n\nstart()" \ say \"You chose option b\"\nend\n"
runAsCoroutine: 1 runAsCoroutine: 1
--- !u!114 &1308476108 --- !u!114 &1308476108
MonoBehaviour: MonoBehaviour:
@ -1860,6 +1884,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 3 m_RootOrder: 3
@ -1975,10 +2000,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
clickMode: 1 clickMode: 1
keyPressMode: 2
shiftKeyEnabled: 1
nextClickDelay: 0 nextClickDelay: 0
keyList: 0900000020000000 cancelEnabled: 1
ignoreMenuClicks: 1 ignoreMenuClicks: 1
--- !u!114 &1531220780 --- !u!114 &1531220780
MonoBehaviour: MonoBehaviour:
@ -2122,6 +2145,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1728665701} - {fileID: 1728665701}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -2160,6 +2184,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9, y: 1, z: 1} m_LocalScale: {x: 0.9, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1914784318} - {fileID: 1914784318}
m_Father: {fileID: 1262340433} m_Father: {fileID: 1262340433}
@ -2301,6 +2326,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1115157304} - {fileID: 1115157304}
m_Father: {fileID: 1262340433} m_Father: {fileID: 1262340433}
@ -2384,7 +2410,7 @@ MonoBehaviour:
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -2436,6 +2462,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1229497281} - {fileID: 1229497281}
m_Father: {fileID: 1262340433} m_Father: {fileID: 1262340433}
@ -2519,7 +2546,7 @@ MonoBehaviour:
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -2649,6 +2676,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1738922797} - {fileID: 1738922797}
- {fileID: 614649409} - {fileID: 614649409}
@ -2687,6 +2715,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 1728665701} m_Father: {fileID: 1728665701}
m_RootOrder: 0 m_RootOrder: 0
@ -2807,6 +2836,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 5 m_RootOrder: 5
@ -2842,6 +2872,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ee8371d2b2fe14a9ca0a9465140027de, type: 3} m_Script: {fileID: 11500000, guid: ee8371d2b2fe14a9ca0a9465140027de, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
autoSelectFirstButton: 0
--- !u!114 &1851713326 --- !u!114 &1851713326
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2923,6 +2954,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1262340433} - {fileID: 1262340433}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -2957,6 +2989,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 314696866} - {fileID: 314696866}
m_Father: {fileID: 1535711470} m_Father: {fileID: 1535711470}
@ -2993,6 +3026,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 461615210} m_Father: {fileID: 461615210}
m_RootOrder: 0 m_RootOrder: 0

19
Assets/FungusExamples/FungusLua/Narrative/Resources/Lua/junglestory.txt

@ -25,26 +25,19 @@ function M.start()
say "While we're here, I suggest we fill our canteens from this waterfall." say "While we're here, I suggest we fill our canteens from this waterfall."
menu("Agreed", M.canteenyes) -- Show menu option, call M.canteenyes() if selected -- Show multiple options to the player
menu("No, we don't have time", M.canteenno) -- Note the last option is disabled but not selectable because of the ~ character.
end local choice = choose { "Agreed", "No, we don't have time", "~Not interested" }
function M.canteenyes() if choice == 1 then
runblock(flowchart, "PlayPourSound") runblock(flowchart, "PlayPourSound")
setcharacter(sherlockcharacter, "annoyed") setcharacter(sherlockcharacter, "annoyed")
say "There, that's better" say "There, that's better"
elseif choice == 2 then
M.moveon() -- Call another function in the module
end
function M.canteenno()
setcharacter(sherlockcharacter, "annoyed") setcharacter(sherlockcharacter, "annoyed")
say "Let's get moving" say "Let's get moving"
end
M.moveon()
end
function M.moveon()
setcharacter(sherlockcharacter, "annoyed") setcharacter(sherlockcharacter, "annoyed")
say("There must be some way out of this cursed place.") say("There must be some way out of this cursed place.")
end end

Loading…
Cancel
Save