Browse Source

Merge branch 'snozbot/master'

master
Zach Vinless 9 years ago
parent
commit
eefe7e76b4
  1. 9
      Assets/Fungus/EditorResources.meta
  2. 0
      Assets/Fungus/EditorResources/Icons.meta
  3. 9
      Assets/Fungus/EditorResources/Icons/Pro.meta
  4. BIN
      Assets/Fungus/EditorResources/Icons/Pro/add.png
  5. 16
      Assets/Fungus/EditorResources/Icons/Pro/add.png.meta
  6. BIN
      Assets/Fungus/EditorResources/Icons/Pro/add_small.png
  7. 16
      Assets/Fungus/EditorResources/Icons/Pro/add_small.png.meta
  8. BIN
      Assets/Fungus/EditorResources/Icons/Pro/delete.png
  9. 16
      Assets/Fungus/EditorResources/Icons/Pro/delete.png.meta
  10. BIN
      Assets/Fungus/EditorResources/Icons/Pro/down.png
  11. 59
      Assets/Fungus/EditorResources/Icons/Pro/down.png.meta
  12. BIN
      Assets/Fungus/EditorResources/Icons/Pro/duplicate.png
  13. 59
      Assets/Fungus/EditorResources/Icons/Pro/duplicate.png.meta
  14. BIN
      Assets/Fungus/EditorResources/Icons/Pro/up.png
  15. 59
      Assets/Fungus/EditorResources/Icons/Pro/up.png.meta
  16. 0
      Assets/Fungus/EditorResources/Icons/add.png
  17. 0
      Assets/Fungus/EditorResources/Icons/add.png.meta
  18. 0
      Assets/Fungus/EditorResources/Icons/add_small.png
  19. 0
      Assets/Fungus/EditorResources/Icons/add_small.png.meta
  20. 0
      Assets/Fungus/EditorResources/Icons/delete.png
  21. 0
      Assets/Fungus/EditorResources/Icons/delete.png.meta
  22. 0
      Assets/Fungus/EditorResources/Icons/down.png
  23. 0
      Assets/Fungus/EditorResources/Icons/down.png.meta
  24. 0
      Assets/Fungus/EditorResources/Icons/duplicate.png
  25. 0
      Assets/Fungus/EditorResources/Icons/duplicate.png.meta
  26. 0
      Assets/Fungus/EditorResources/Icons/up.png
  27. 0
      Assets/Fungus/EditorResources/Icons/up.png.meta
  28. 0
      Assets/Fungus/EditorResources/Textures.meta
  29. 0
      Assets/Fungus/EditorResources/Textures/choice_node_off.png
  30. 0
      Assets/Fungus/EditorResources/Textures/choice_node_off.png.meta
  31. 0
      Assets/Fungus/EditorResources/Textures/choice_node_on.png
  32. 0
      Assets/Fungus/EditorResources/Textures/choice_node_on.png.meta
  33. 0
      Assets/Fungus/EditorResources/Textures/command_background.png
  34. 0
      Assets/Fungus/EditorResources/Textures/command_background.png.meta
  35. 0
      Assets/Fungus/EditorResources/Textures/event_node_off.png
  36. 0
      Assets/Fungus/EditorResources/Textures/event_node_off.png.meta
  37. 0
      Assets/Fungus/EditorResources/Textures/event_node_on.png
  38. 0
      Assets/Fungus/EditorResources/Textures/event_node_on.png.meta
  39. 0
      Assets/Fungus/EditorResources/Textures/play_big.png
  40. 0
      Assets/Fungus/EditorResources/Textures/play_big.png.meta
  41. 0
      Assets/Fungus/EditorResources/Textures/play_small.png
  42. 0
      Assets/Fungus/EditorResources/Textures/play_small.png.meta
  43. 0
      Assets/Fungus/EditorResources/Textures/process_node_off.png
  44. 0
      Assets/Fungus/EditorResources/Textures/process_node_off.png.meta
  45. 0
      Assets/Fungus/EditorResources/Textures/process_node_on.png
  46. 0
      Assets/Fungus/EditorResources/Textures/process_node_on.png.meta
  47. BIN
      Assets/Fungus/Resources/Icons/ResizeHandle.png
  48. BIN
      Assets/Fungus/Resources/Icons/left.png
  49. BIN
      Assets/Fungus/Resources/Icons/right.png
  50. 6
      Assets/Fungus/Scripts/Commands/End.cs
  51. 4
      Assets/Fungus/Scripts/Components/MusicManager.cs
  52. 10
      Assets/Fungus/Scripts/Editor/BlockEditor.cs
  53. 4
      Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs
  54. 7
      Assets/Fungus/Scripts/Editor/EditorZoomArea.cs
  55. 2
      Assets/Fungus/Scripts/Editor/FlowchartEditor.cs
  56. 290
      Assets/Fungus/Scripts/Editor/FlowchartWindow.cs
  57. 200
      Assets/Fungus/Scripts/Editor/FungusEditorResources.cs
  58. 44
      Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs
  59. 12
      Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs.meta
  60. 2
      Assets/Fungus/Scripts/VariableTypes/StringVariable.cs
  61. 29
      Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs
  62. 60
      Assets/FungusExamples/DragAndDrop/DragAndDrop(EventSystem).unity
  63. 60
      Assets/FungusExamples/DragAndDrop/DragAndDrop.unity
  64. 9
      Assets/FungusExamples/FungusLua/Narrative/StageAndPortraits.unity
  65. 572
      Assets/Tests/Scripting/Scripting.unity

9
Assets/Fungus/EditorResources.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5ff164265158945c18b7d438b570ba22
folderAsset: yes
timeCreated: 1478502248
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

0
Assets/Fungus/Resources/Icons.meta → Assets/Fungus/EditorResources/Icons.meta

9
Assets/Fungus/EditorResources/Icons/Pro.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5e5a1319ef7f546a7affe3baabd5fba6
folderAsset: yes
timeCreated: 1478502692
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/EditorResources/Icons/Pro/add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

16
Assets/Fungus/Resources/Icons/right.png.meta → Assets/Fungus/EditorResources/Icons/Pro/add.png.meta

@ -1,5 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b3dd8b25a62664f379cb3714060d4e33 guid: 4e43c476b4a7a49a08c37378fb01ce99
timeCreated: 1478502692
licenseType: Free
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
serializedVersion: 2 serializedVersion: 2
@ -15,17 +17,17 @@ TextureImporter:
bumpmap: bumpmap:
convertToNormalMap: 0 convertToNormalMap: 0
externalNormalMap: 0 externalNormalMap: 0
heightScale: .25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
isReadable: 0 isReadable: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 0 generateCubemap: 0
cubemapConvolution: 0 cubemapConvolution: 0
cubemapConvolutionSteps: 8 cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5 cubemapConvolutionExponent: 1.5
seamlessCubemap: 0 seamlessCubemap: 0
textureFormat: -3 textureFormat: -3
maxTextureSize: 1024 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: 1 aniso: 1
@ -35,18 +37,22 @@ TextureImporter:
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0 spriteMode: 0
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 1 alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2 textureType: 2
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
serializedVersion: 2
sprites: [] sprites: []
outline: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName:

BIN
Assets/Fungus/EditorResources/Icons/Pro/add_small.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

16
Assets/Fungus/Resources/Icons/ResizeHandle.png.meta → Assets/Fungus/EditorResources/Icons/Pro/add_small.png.meta

@ -1,5 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c8b63a574d777374a918f2900930e540 guid: 64534dfaa17844231a9a9dd2df89d0db
timeCreated: 1478502692
licenseType: Free
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
serializedVersion: 2 serializedVersion: 2
@ -15,17 +17,17 @@ TextureImporter:
bumpmap: bumpmap:
convertToNormalMap: 0 convertToNormalMap: 0
externalNormalMap: 0 externalNormalMap: 0
heightScale: .25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
isReadable: 0 isReadable: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 0 generateCubemap: 0
cubemapConvolution: 0 cubemapConvolution: 0
cubemapConvolutionSteps: 8 cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5 cubemapConvolutionExponent: 1.5
seamlessCubemap: 0 seamlessCubemap: 0
textureFormat: -3 textureFormat: -3
maxTextureSize: 1024 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: 1 aniso: 1
@ -35,18 +37,22 @@ TextureImporter:
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0 spriteMode: 0
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 1 alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2 textureType: 2
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
serializedVersion: 2
sprites: [] sprites: []
outline: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName:

BIN
Assets/Fungus/EditorResources/Icons/Pro/delete.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

16
Assets/Fungus/Resources/Icons/left.png.meta → Assets/Fungus/EditorResources/Icons/Pro/delete.png.meta

@ -1,5 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c0a7a4711d69249ab9dae1539a3247ee guid: 29c4d29b1678042a5b3516c732ccc507
timeCreated: 1478502692
licenseType: Free
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
serializedVersion: 2 serializedVersion: 2
@ -15,17 +17,17 @@ TextureImporter:
bumpmap: bumpmap:
convertToNormalMap: 0 convertToNormalMap: 0
externalNormalMap: 0 externalNormalMap: 0
heightScale: .25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
isReadable: 0 isReadable: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 0 generateCubemap: 0
cubemapConvolution: 0 cubemapConvolution: 0
cubemapConvolutionSteps: 8 cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5 cubemapConvolutionExponent: 1.5
seamlessCubemap: 0 seamlessCubemap: 0
textureFormat: -3 textureFormat: -3
maxTextureSize: 1024 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: 1 aniso: 1
@ -35,18 +37,22 @@ TextureImporter:
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0 spriteMode: 0
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 1 alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2 textureType: 2
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
serializedVersion: 2
sprites: [] sprites: []
outline: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName:

BIN
Assets/Fungus/EditorResources/Icons/Pro/down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

59
Assets/Fungus/EditorResources/Icons/Pro/down.png.meta

@ -0,0 +1,59 @@
fileFormatVersion: 2
guid: 5a87a7d3683164a238377d948572805f
timeCreated: 1478502692
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/EditorResources/Icons/Pro/duplicate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

59
Assets/Fungus/EditorResources/Icons/Pro/duplicate.png.meta

@ -0,0 +1,59 @@
fileFormatVersion: 2
guid: 2f17490d993c84bd7872ef6588ffba47
timeCreated: 1478502692
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/EditorResources/Icons/Pro/up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

59
Assets/Fungus/EditorResources/Icons/Pro/up.png.meta

@ -0,0 +1,59 @@
fileFormatVersion: 2
guid: 2a76a781db2994b33b83cd84b8835da7
timeCreated: 1478502692
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

0
Assets/Fungus/Resources/Icons/add.png → Assets/Fungus/EditorResources/Icons/add.png

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
Assets/Fungus/Resources/Icons/add.png.meta → Assets/Fungus/EditorResources/Icons/add.png.meta

0
Assets/Fungus/Resources/Icons/add_small.png → Assets/Fungus/EditorResources/Icons/add_small.png

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
Assets/Fungus/Resources/Icons/add_small.png.meta → Assets/Fungus/EditorResources/Icons/add_small.png.meta

0
Assets/Fungus/Resources/Icons/delete.png → Assets/Fungus/EditorResources/Icons/delete.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/delete.png.meta → Assets/Fungus/EditorResources/Icons/delete.png.meta

0
Assets/Fungus/Resources/Icons/down.png → Assets/Fungus/EditorResources/Icons/down.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/down.png.meta → Assets/Fungus/EditorResources/Icons/down.png.meta

0
Assets/Fungus/Resources/Icons/duplicate.png → Assets/Fungus/EditorResources/Icons/duplicate.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/duplicate.png.meta → Assets/Fungus/EditorResources/Icons/duplicate.png.meta

0
Assets/Fungus/Resources/Icons/up.png → Assets/Fungus/EditorResources/Icons/up.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/up.png.meta → Assets/Fungus/EditorResources/Icons/up.png.meta

0
Assets/Fungus/Resources/Textures.meta → Assets/Fungus/EditorResources/Textures.meta

0
Assets/Fungus/Resources/Textures/choice_node_off.png → Assets/Fungus/EditorResources/Textures/choice_node_off.png

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
Assets/Fungus/Resources/Textures/choice_node_off.png.meta → Assets/Fungus/EditorResources/Textures/choice_node_off.png.meta

0
Assets/Fungus/Resources/Textures/choice_node_on.png → Assets/Fungus/EditorResources/Textures/choice_node_on.png

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
Assets/Fungus/Resources/Textures/choice_node_on.png.meta → Assets/Fungus/EditorResources/Textures/choice_node_on.png.meta

0
Assets/Fungus/Resources/Textures/command_background.png → Assets/Fungus/EditorResources/Textures/command_background.png

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
Assets/Fungus/Resources/Textures/command_background.png.meta → Assets/Fungus/EditorResources/Textures/command_background.png.meta

0
Assets/Fungus/Resources/Textures/event_node_off.png → Assets/Fungus/EditorResources/Textures/event_node_off.png

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
Assets/Fungus/Resources/Textures/event_node_off.png.meta → Assets/Fungus/EditorResources/Textures/event_node_off.png.meta

0
Assets/Fungus/Resources/Textures/event_node_on.png → Assets/Fungus/EditorResources/Textures/event_node_on.png

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
Assets/Fungus/Resources/Textures/event_node_on.png.meta → Assets/Fungus/EditorResources/Textures/event_node_on.png.meta

0
Assets/Fungus/Resources/Textures/play_big.png → Assets/Fungus/EditorResources/Textures/play_big.png

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

0
Assets/Fungus/Resources/Textures/play_big.png.meta → Assets/Fungus/EditorResources/Textures/play_big.png.meta

0
Assets/Fungus/Resources/Textures/play_small.png → Assets/Fungus/EditorResources/Textures/play_small.png

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
Assets/Fungus/Resources/Textures/play_small.png.meta → Assets/Fungus/EditorResources/Textures/play_small.png.meta

0
Assets/Fungus/Resources/Textures/process_node_off.png → Assets/Fungus/EditorResources/Textures/process_node_off.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Textures/process_node_off.png.meta → Assets/Fungus/EditorResources/Textures/process_node_off.png.meta

0
Assets/Fungus/Resources/Textures/process_node_on.png → Assets/Fungus/EditorResources/Textures/process_node_on.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
Assets/Fungus/Resources/Textures/process_node_on.png.meta → Assets/Fungus/EditorResources/Textures/process_node_on.png.meta

BIN
Assets/Fungus/Resources/Icons/ResizeHandle.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
Assets/Fungus/Resources/Icons/left.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
Assets/Fungus/Resources/Icons/right.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

6
Assets/Fungus/Scripts/Commands/End.cs

@ -24,8 +24,10 @@ namespace Fungus
{ {
for (int i = CommandIndex - 1; i >= 0; --i) for (int i = CommandIndex - 1; i >= 0; --i)
{ {
System.Type commandType = ParentBlock.CommandList[i].GetType(); var command = ParentBlock.CommandList[i];
if (commandType == typeof(While))
if (command.IndentLevel == IndentLevel &&
command.GetType() == typeof(While))
{ {
Continue(i); Continue(i);
return; return;

4
Assets/Fungus/Scripts/Components/MusicManager.cs

@ -113,6 +113,10 @@ namespace Fungus
if (Mathf.Approximately(duration, 0f)) if (Mathf.Approximately(duration, 0f))
{ {
if (onComplete != null)
{
onComplete();
}
audio.volume = volume; audio.volume = volume;
return; return;
} }

10
Assets/Fungus/Scripts/Editor/BlockEditor.cs

@ -41,11 +41,11 @@ namespace Fungus.EditorUtils
protected virtual void OnEnable() protected virtual void OnEnable()
{ {
upIcon = Resources.Load("Icons/up") as Texture2D; upIcon = FungusEditorResources.Up;
downIcon = Resources.Load("Icons/down") as Texture2D; downIcon = FungusEditorResources.Down;
addIcon = Resources.Load("Icons/add") as Texture2D; addIcon = FungusEditorResources.Add;
duplicateIcon = Resources.Load("Icons/duplicate") as Texture2D; duplicateIcon = FungusEditorResources.Duplicate;
deleteIcon = Resources.Load("Icons/delete") as Texture2D; deleteIcon = FungusEditorResources.Delete;
} }
public virtual void DrawBlockName(Flowchart flowchart) public virtual void DrawBlockName(Flowchart flowchart)

4
Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs

@ -213,7 +213,7 @@ namespace Fungus.EditorUtils
string commandName = commandInfoAttr.CommandName; string commandName = commandInfoAttr.CommandName;
GUIStyle commandLabelStyle = new GUIStyle(GUI.skin.box); GUIStyle commandLabelStyle = new GUIStyle(GUI.skin.box);
commandLabelStyle.normal.background = FungusEditorResources.texCommandBackground; commandLabelStyle.normal.background = FungusEditorResources.CommandBackground;
int borderSize = 5; int borderSize = 5;
commandLabelStyle.border.top = borderSize; commandLabelStyle.border.top = borderSize;
commandLabelStyle.border.bottom = borderSize; commandLabelStyle.border.bottom = borderSize;
@ -420,7 +420,7 @@ namespace Fungus.EditorUtils
alpha = Mathf.Clamp01(alpha); alpha = Mathf.Clamp01(alpha);
GUI.color = new Color(1f, 1f, 1f, alpha); GUI.color = new Color(1f, 1f, 1f, alpha);
GUI.Label(iconRect, FungusEditorResources.texPlaySmall, new GUIStyle()); GUI.Label(iconRect, FungusEditorResources.PlaySmall, new GUIStyle());
GUI.color = storeColor; GUI.color = storeColor;
} }

7
Assets/Fungus/Scripts/Editor/EditorZoomArea.cs

@ -56,15 +56,16 @@ namespace Fungus.EditorUtils
public class EditorZoomArea public class EditorZoomArea
{ {
private const float kEditorWindowTabHeight = 21.0f;
private static Matrix4x4 _prevGuiMatrix; private static Matrix4x4 _prevGuiMatrix;
private static Vector2 offset = new Vector2(2.0f, 19.0f);
public static Vector2 Offset { get { return offset; } set { offset = value; } }
public static Rect Begin(float zoomScale, Rect screenCoordsArea) public static Rect Begin(float zoomScale, Rect screenCoordsArea)
{ {
GUI.EndGroup(); // End the group Unity begins automatically for an EditorWindow to clip out the window tab. This allows us to draw outside of the size of the EditorWindow. GUI.EndGroup(); // End the group Unity begins automatically for an EditorWindow to clip out the window tab. This allows us to draw outside of the size of the EditorWindow.
Rect clippedArea = screenCoordsArea.ScaleSizeBy(1.0f / zoomScale, screenCoordsArea.TopLeft()); Rect clippedArea = screenCoordsArea.ScaleSizeBy(1.0f / zoomScale, screenCoordsArea.TopLeft());
clippedArea.y += kEditorWindowTabHeight; clippedArea.position += offset;
GUI.BeginGroup(clippedArea); GUI.BeginGroup(clippedArea);
_prevGuiMatrix = GUI.matrix; _prevGuiMatrix = GUI.matrix;
@ -81,7 +82,7 @@ namespace Fungus.EditorUtils
{ {
GUI.matrix = _prevGuiMatrix; GUI.matrix = _prevGuiMatrix;
GUI.EndGroup(); GUI.EndGroup();
GUI.BeginGroup(new Rect(0.0f, kEditorWindowTabHeight, Screen.width, Screen.height)); GUI.BeginGroup(new Rect(offset.x, offset.y, Screen.width, Screen.height));
} }
} }
} }

2
Assets/Fungus/Scripts/Editor/FlowchartEditor.cs

@ -50,7 +50,7 @@ namespace Fungus.EditorUtils
luaEnvironmentProp = serializedObject.FindProperty("luaEnvironment"); luaEnvironmentProp = serializedObject.FindProperty("luaEnvironment");
luaBindingNameProp = serializedObject.FindProperty("luaBindingName"); luaBindingNameProp = serializedObject.FindProperty("luaBindingName");
addTexture = Resources.Load("Icons/add_small") as Texture2D; addTexture = FungusEditorResources.AddSmall;
} }
public override void OnInspectorGUI() public override void OnInspectorGUI()

290
Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

@ -7,6 +7,7 @@ using UnityEditorInternal;
using System; using System;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection;
namespace Fungus.EditorUtils namespace Fungus.EditorUtils
{ {
@ -35,9 +36,14 @@ namespace Fungus.EditorUtils
protected Texture2D addTexture; protected Texture2D addTexture;
protected Rect selectionBox; protected Rect selectionBox;
protected Vector2 startSelectionBoxPosition = new Vector2(-1.0f, -1.0f); protected Vector2 startSelectionBoxPosition = -Vector2.one;
protected List<Block> mouseDownSelectionState = new List<Block>(); protected List<Block> mouseDownSelectionState = new List<Block>();
// Context Click occurs on MouseDown which interferes with panning
// Track right click positions manually to show menus on MouseUp
protected Vector2 rightClickDown = -Vector2.one;
protected readonly float rightClickTolerance = 5f;
[MenuItem("Tools/Fungus/Flowchart Window")] [MenuItem("Tools/Fungus/Flowchart Window")]
static void Init() static void Init()
{ {
@ -59,7 +65,7 @@ namespace Fungus.EditorUtils
nodeStyle.alignment = TextAnchor.MiddleCenter; nodeStyle.alignment = TextAnchor.MiddleCenter;
nodeStyle.wordWrap = true; nodeStyle.wordWrap = true;
addTexture = Resources.Load("Icons/add_small") as Texture2D; addTexture = FungusEditorResources.AddSmall;
} }
protected virtual void OnInspectorUpdate() protected virtual void OnInspectorUpdate()
@ -88,6 +94,24 @@ namespace Fungus.EditorUtils
Repaint(); Repaint();
} }
protected virtual void OnBecameVisible()
{
// Ensure that toolbar looks correct in both docked and undocked windows
// The docked value doesn't always report correctly without the delayCall
EditorApplication.delayCall += () => {
var flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
var isDockedMethod = typeof(EditorWindow).GetProperty("docked", flags).GetGetMethod(true);
if ((bool) isDockedMethod.Invoke(this, null))
{
EditorZoomArea.Offset = new Vector2(2.0f, 19.0f);
}
else
{
EditorZoomArea.Offset = new Vector2(0.0f, 22.0f);
}
};
}
public static Flowchart GetFlowchart() public static Flowchart GetFlowchart()
{ {
// Using a temp hidden object to track the active Flowchart across // Using a temp hidden object to track the active Flowchart across
@ -137,6 +161,9 @@ namespace Fungus.EditorUtils
if (isSelected) if (isSelected)
{ {
// Deselect
flowchart.SelectedBlocks.Remove(deleteBlock);
// Revert to showing properties for the Flowchart // Revert to showing properties for the Flowchart
Selection.activeGameObject = flowchart.gameObject; Selection.activeGameObject = flowchart.gameObject;
} }
@ -149,6 +176,9 @@ namespace Fungus.EditorUtils
// Handle selection box events after block and overlay events // Handle selection box events after block and overlay events
HandleSelectionBox(flowchart); HandleSelectionBox(flowchart);
ValidateCommands(flowchart);
ExecuteCommands(flowchart);
if (forceRepaintCount > 0) if (forceRepaintCount > 0)
{ {
// Redraw on next frame to get crisp refresh rate // Redraw on next frame to get crisp refresh rate
@ -158,28 +188,49 @@ namespace Fungus.EditorUtils
protected virtual void DrawOverlay(Flowchart flowchart) protected virtual void DrawOverlay(Flowchart flowchart)
{ {
GUILayout.Space(8); GUILayout.BeginHorizontal(EditorStyles.toolbar);
GUILayout.BeginHorizontal();
GUILayout.Space(8); GUILayout.Space(2);
if (GUILayout.Button(new GUIContent(addTexture, "Add a new block"))) if (GUILayout.Button(new GUIContent(addTexture, "Add a new block"), EditorStyles.toolbarButton))
{ {
Vector2 newNodePosition = new Vector2(50 - flowchart.ScrollPos.x, Vector2 newNodePosition = new Vector2(50 / flowchart.Zoom - flowchart.ScrollPos.x,
50 - flowchart.ScrollPos.y); 50 / flowchart.Zoom - flowchart.ScrollPos.y);
CreateBlock(flowchart, newNodePosition); CreateBlock(flowchart, newNodePosition);
} }
// Separator
GUILayout.Label("", EditorStyles.toolbarButton, GUILayout.Width(8));
GUILayout.Space(8); GUILayout.Label("Scale", EditorStyles.miniLabel);
var newZoom = GUILayout.HorizontalSlider(
flowchart.Zoom, minZoomValue, maxZoomValue, GUILayout.MinWidth(40), GUILayout.MaxWidth(100)
);
GUILayout.Label(flowchart.Zoom.ToString("0.0#x"), EditorStyles.miniLabel, GUILayout.Width(30));
if (newZoom != flowchart.Zoom)
{
DoZoom(flowchart, newZoom - flowchart.Zoom, Vector2.one * 0.5f);
}
var newZoom = GUILayout.HorizontalSlider(flowchart.Zoom, minZoomValue, maxZoomValue, GUILayout.Width(100)); if (GUILayout.Button("Center", EditorStyles.toolbarButton))
DoZoom(flowchart, newZoom - flowchart.Zoom, Vector2.one * 0.5f); {
flowchart.ScrollPos = flowchart.CenterPosition;
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.FlexibleSpace(); GUILayout.FlexibleSpace();
GUILayout.BeginVertical(); GUILayout.BeginVertical();
GUILayout.Label(flowchart.name, EditorStyles.whiteBoldLabel); GUILayout.Label(flowchart.name, EditorStyles.whiteBoldLabel);
GUILayout.Space(2);
if (flowchart.Description.Length > 0) if (flowchart.Description.Length > 0)
{ {
GUILayout.Label(flowchart.Description, EditorStyles.helpBox); GUILayout.Label(flowchart.Description, EditorStyles.helpBox);
@ -188,14 +239,14 @@ namespace Fungus.EditorUtils
GUILayout.EndHorizontal(); GUILayout.EndHorizontal();
GUILayout.FlexibleSpace();
GUILayout.BeginHorizontal(); GUILayout.BeginHorizontal();
GUILayout.BeginVertical(GUILayout.Width(440)); GUILayout.BeginVertical(GUILayout.Width(440));
GUILayout.FlexibleSpace(); GUILayout.FlexibleSpace();
var rawMousePosition = Event.current.mousePosition; // mouse position outside of scrollview to test against toolbar rect
flowchart.VariablesScrollPos = GUILayout.BeginScrollView(flowchart.VariablesScrollPos, GUILayout.MaxHeight(position.height * 0.75f)); flowchart.VariablesScrollPos = GUILayout.BeginScrollView(flowchart.VariablesScrollPos, GUILayout.MaxHeight(position.height * 0.75f));
GUILayout.FlexibleSpace(); GUILayout.FlexibleSpace();
@ -215,7 +266,8 @@ namespace Fungus.EditorUtils
} }
if (Event.current.type == EventType.Repaint) if (Event.current.type == EventType.Repaint)
{ {
mouseOverVariables = variableWindowRect.Contains(Event.current.mousePosition); Rect toolbarRect = new Rect(0, 0, position.width, 18);
mouseOverVariables = variableWindowRect.Contains(Event.current.mousePosition) || toolbarRect.Contains(rawMousePosition);
} }
GUILayout.EndScrollView(); GUILayout.EndScrollView();
@ -250,6 +302,22 @@ namespace Fungus.EditorUtils
// Calc rect for script view // Calc rect for script view
Rect scriptViewRect = new Rect(0, 0, this.position.width / flowchart.Zoom, this.position.height / flowchart.Zoom); Rect scriptViewRect = new Rect(0, 0, this.position.width / flowchart.Zoom, this.position.height / flowchart.Zoom);
// Update right click start outside of EditorZoomArea
if (Event.current.button == 1)
{
if (Event.current.type == EventType.MouseDown)
{
rightClickDown = Event.current.mousePosition;
}
else if (Event.current.type == EventType.MouseDrag)
{
if (Vector2.Distance(rightClickDown, Event.current.mousePosition) > rightClickTolerance)
{
rightClickDown = -Vector2.one;
}
}
}
EditorZoomArea.Begin(flowchart.Zoom, scriptViewRect); EditorZoomArea.Begin(flowchart.Zoom, scriptViewRect);
DrawGrid(flowchart); DrawGrid(flowchart);
@ -258,7 +326,10 @@ namespace Fungus.EditorUtils
// The center of the Flowchart depends on the block positions and window dimensions, so we calculate it // The center of the Flowchart depends on the block positions and window dimensions, so we calculate it
// here in the FlowchartWindow class and store it on the Flowchart object for use later. // here in the FlowchartWindow class and store it on the Flowchart object for use later.
CalcFlowchartCenter(flowchart, blocks); if (flowchart != null && blocks.Length > 0)
{
CalcFlowchartCenter(flowchart, blocks);
}
// Draw connections // Draw connections
foreach (var block in blocks) foreach (var block in blocks)
@ -402,7 +473,7 @@ namespace Fungus.EditorUtils
GUI.color = new Color(1f, 1f, 1f, alpha); GUI.color = new Color(1f, 1f, 1f, alpha);
} }
if (GUI.Button(rect, FungusEditorResources.texPlayBig as Texture, new GUIStyle())) if (GUI.Button(rect, FungusEditorResources.PlayBig, new GUIStyle()))
{ {
SelectBlock(flowchart, b); SelectBlock(flowchart, b);
} }
@ -417,31 +488,66 @@ namespace Fungus.EditorUtils
GLDraw.EndGroup(); GLDraw.EndGroup();
EditorZoomArea.End(); EditorZoomArea.End();
// Handle right click up outside of EditorZoomArea to avoid strange offsets
if (Event.current.type == EventType.MouseUp && Event.current.button == 1 &&
rightClickDown != -Vector2.one && !mouseOverVariables)
{
var menu = new GenericMenu();
var mousePosition = rightClickDown;
Block hitBlock = null;
foreach (var block in blocks)
{
if (block._NodeRect.Contains(rightClickDown / flowchart.Zoom - flowchart.ScrollPos))
{
hitBlock = block;
break;
}
}
// Clicked on a block
if (hitBlock != null)
{
flowchart.AddSelectedBlock(hitBlock);
// Use a copy because flowchart.SelectedBlocks gets modified
var blockList = new List<Block>(flowchart.SelectedBlocks);
menu.AddItem(new GUIContent ("Duplicate"), false, DuplicateBlocks, blockList);
menu.AddItem(new GUIContent ("Delete"), false, DeleteBlocks, blockList);
}
// Clicked on empty space in grid
else
{
DeselectAll(flowchart);
menu.AddItem(new GUIContent("Add Block"), false, () => CreateBlock(flowchart, mousePosition / flowchart.Zoom - flowchart.ScrollPos));
}
var menuRect = new Rect();
menuRect.position = new Vector2(mousePosition.x, mousePosition.y - 12f);
menu.DropDown(menuRect);
Event.current.Use();
}
// If event has yet to be used and user isn't multiselecting or panning, clear selection // If event has yet to be used and user isn't multiselecting or panning, clear selection
bool validModifier = Event.current.alt || GetAppendModifierDown(); bool validModifier = Event.current.alt || GetAppendModifierDown();
if (Event.current.type == EventType.MouseDown && Event.current.button == 0 && !validModifier) if (Event.current.type == EventType.MouseDown && Event.current.button == 0 && !validModifier)
{ {
Undo.RecordObject(flowchart, "Deselect"); DeselectAll(flowchart);
flowchart.ClearSelectedCommands();
flowchart.ClearSelectedBlocks();
Selection.activeGameObject = flowchart.gameObject;
} }
// Draw selection box // Draw selection box
if (startSelectionBoxPosition.x >= 0 && startSelectionBoxPosition.y >= 0) if (startSelectionBoxPosition.x >= 0 && startSelectionBoxPosition.y >= 0)
{ {
GUI.Box(selectionBox, "", (GUIStyle) "SelectionRect"); GUI.Box(selectionBox, "", (GUIStyle) "SelectionRect");
forceRepaintCount = 6; forceRepaintCount = 6;
} }
} }
public virtual void CalcFlowchartCenter(Flowchart flowchart, Block[] blocks) public virtual Vector2 GetBlockCenter(Flowchart flowchart, Block[] blocks)
{ {
if (flowchart == null || if (blocks.Length == 0)
blocks.Count() == 0)
{ {
return; return Vector2.zero;
} }
Vector2 min = blocks[0]._NodeRect.min; Vector2 min = blocks[0]._NodeRect.min;
@ -455,10 +561,14 @@ namespace Fungus.EditorUtils
max.y = Mathf.Max(max.y, block._NodeRect.center.y); max.y = Mathf.Max(max.y, block._NodeRect.center.y);
} }
Vector2 center = (min + max) * -0.5f; return (min + max) * 0.5f;
}
center.x += position.width * 0.5f; public virtual void CalcFlowchartCenter(Flowchart flowchart, Block[] blocks)
center.y += position.height * 0.5f; {
var center = -GetBlockCenter(flowchart, blocks);
center.x += position.width * 0.5f / flowchart.Zoom;
center.y += position.height * 0.5f / flowchart.Zoom;
flowchart.CenterPosition = center; flowchart.CenterPosition = center;
} }
@ -471,16 +581,19 @@ namespace Fungus.EditorUtils
switch (Event.current.type) switch (Event.current.type)
{ {
case EventType.MouseDown: case EventType.MouseDown:
startSelectionBoxPosition = Event.current.mousePosition; if (!mouseOverVariables)
mouseDownSelectionState = new List<Block>(flowchart.SelectedBlocks); {
Event.current.Use(); startSelectionBoxPosition = Event.current.mousePosition;
mouseDownSelectionState = new List<Block>(flowchart.SelectedBlocks);
Event.current.Use();
}
break; break;
case EventType.MouseDrag: case EventType.MouseDrag:
if (startSelectionBoxPosition.x >= 0 && startSelectionBoxPosition.y >= 0) if (startSelectionBoxPosition.x >= 0 && startSelectionBoxPosition.y >= 0)
{ {
var topLeft = Vector2.Min(startSelectionBoxPosition, Event.current.mousePosition); var topLeft = Vector2.Min(startSelectionBoxPosition, Event.current.mousePosition);
var bottomRight = Vector2.Max(startSelectionBoxPosition, Event.current.mousePosition); var bottomRight = Vector2.Max(startSelectionBoxPosition, Event.current.mousePosition);
selectionBox = Rect.MinMaxRect(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y); selectionBox = Rect.MinMaxRect(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y);
Rect zoomSelectionBox = selectionBox; Rect zoomSelectionBox = selectionBox;
@ -518,7 +631,7 @@ namespace Fungus.EditorUtils
if (Event.current.rawType == EventType.MouseUp) if (Event.current.rawType == EventType.MouseUp)
{ {
selectionBox.size = Vector2.zero; selectionBox.size = Vector2.zero;
selectionBox.position = Vector2.one * -1; selectionBox.position = -Vector2.one;
startSelectionBoxPosition = selectionBox.position; startSelectionBoxPosition = selectionBox.position;
var tempList = new List<Block>(flowchart.SelectedBlocks); var tempList = new List<Block>(flowchart.SelectedBlocks);
@ -647,6 +760,14 @@ namespace Fungus.EditorUtils
flowchart.SelectedBlock = block; flowchart.SelectedBlock = block;
SetBlockForInspector(flowchart, block); SetBlockForInspector(flowchart, block);
} }
protected virtual void DeselectAll(Flowchart flowchart)
{
Undo.RecordObject(flowchart, "Deselect");
flowchart.ClearSelectedCommands();
flowchart.ClearSelectedBlocks();
Selection.activeGameObject = flowchart.gameObject;
}
public static Block CreateBlock(Flowchart flowchart, Vector2 position) public static Block CreateBlock(Flowchart flowchart, Vector2 position)
{ {
@ -660,18 +781,6 @@ namespace Fungus.EditorUtils
return newBlock; return newBlock;
} }
protected virtual void DeleteBlock(Flowchart flowchart, Block block)
{
var commandList = block.CommandList;
foreach (var command in commandList)
{
Undo.DestroyObjectImmediate(command);
}
Undo.DestroyObjectImmediate((Block)block);
flowchart.ClearSelectedCommands();
}
protected virtual void DrawWindow(int windowId) protected virtual void DrawWindow(int windowId)
{ {
var block = windowBlockMap[windowId]; var block = windowBlockMap[windowId];
@ -746,8 +855,8 @@ namespace Fungus.EditorUtils
if (block._EventHandler != null) if (block._EventHandler != null)
{ {
offTex = FungusEditorResources.texEventNodeOff; offTex = FungusEditorResources.EventNodeOff;
onTex = FungusEditorResources.texEventNodeOn; onTex = FungusEditorResources.EventNodeOn;
defaultColor = FungusConstants.DefaultEventBlockTint; defaultColor = FungusConstants.DefaultEventBlockTint;
} }
else else
@ -767,14 +876,14 @@ namespace Fungus.EditorUtils
if (uniqueList.Count > 1) if (uniqueList.Count > 1)
{ {
offTex = FungusEditorResources.texChoiceNodeOff; offTex = FungusEditorResources.ChoiceNodeOff;
onTex = FungusEditorResources.texChoiceNodeOn; onTex = FungusEditorResources.ChoiceNodeOn;
defaultColor = FungusConstants.DefaultChoiceBlockTint; defaultColor = FungusConstants.DefaultChoiceBlockTint;
} }
else else
{ {
offTex = FungusEditorResources.texProcessNodeOff; offTex = FungusEditorResources.ProcessNodeOff;
onTex = FungusEditorResources.texProcessNodeOn; onTex = FungusEditorResources.ProcessNodeOn;
defaultColor = FungusConstants.DefaultProcessBlockTint; defaultColor = FungusConstants.DefaultProcessBlockTint;
} }
} }
@ -813,20 +922,6 @@ namespace Fungus.EditorUtils
descriptionStyle.wordWrap = true; descriptionStyle.wordWrap = true;
GUILayout.Label(block.Description, descriptionStyle); GUILayout.Label(block.Description, descriptionStyle);
} }
if (Event.current.type == EventType.ContextClick)
{
flowchart.AddSelectedBlock(block);
GenericMenu menu = new GenericMenu ();
// Use a copy because flowchart.SelectedBlocks gets modified
var blockList = new List<Block>(flowchart.SelectedBlocks);
menu.AddItem(new GUIContent ("Duplicate"), false, DuplicateBlocks, blockList);
menu.AddItem(new GUIContent ("Delete"), false, DeleteBlocks, blockList);
menu.ShowAsContext();
}
} }
protected virtual void DrawConnections(Flowchart flowchart, Block block, bool highlightedOnly) protected virtual void DrawConnections(Flowchart flowchart, Block block, bool highlightedOnly)
@ -948,6 +1043,11 @@ namespace Fungus.EditorUtils
} }
protected static void DuplicateBlocks(object obj) protected static void DuplicateBlocks(object obj)
{
DuplicateBlocks(obj, new Vector2(20, 0));
}
protected static void DuplicateBlocks(object obj, Vector2 offset)
{ {
var flowchart = GetFlowchart(); var flowchart = GetFlowchart();
@ -958,9 +1058,7 @@ namespace Fungus.EditorUtils
foreach (var block in blocks) foreach (var block in blocks)
{ {
Vector2 newPosition = new Vector2(block._NodeRect.position.x + Vector2 newPosition = block._NodeRect.position + offset;
block._NodeRect.width + 20,
block._NodeRect.y);
Block oldBlock = block; Block oldBlock = block;
@ -1046,9 +1144,57 @@ namespace Fungus.EditorUtils
} }
} }
protected virtual bool GetAppendModifierDown() protected virtual bool GetAppendModifierDown()
{ {
return Event.current.shift || EditorGUI.actionKey; return Event.current.shift || EditorGUI.actionKey;
} }
protected virtual void ValidateCommands(Flowchart flowchart)
{
if (Event.current.type == EventType.ValidateCommand)
{
var c = Event.current.commandName;
if (c == "Delete" || c == "Duplicate")
{
if (flowchart.SelectedBlocks.Count > 0)
{
Event.current.Use();
}
}
else if (c == "SelectAll")
{
Event.current.Use();
}
}
}
protected virtual void ExecuteCommands(Flowchart flowchart)
{
if (Event.current.type == EventType.ExecuteCommand)
{
switch (Event.current.commandName)
{
case "Delete":
DeleteBlocks(flowchart.SelectedBlocks);
Event.current.Use();
break;
case "Duplicate":
DuplicateBlocks(new List<Block>(flowchart.SelectedBlocks));
Event.current.Use();
break;
case "SelectAll":
Undo.RecordObject(flowchart, "Selection");
flowchart.ClearSelectedBlocks();
foreach (var block in flowchart.GetComponents<Block>())
{
flowchart.AddSelectedBlock(block);
}
Event.current.Use();
break;
}
}
}
} }
} }

200
Assets/Fungus/Scripts/Editor/FungusEditorResources.cs

@ -1,149 +1,115 @@
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
using System; using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
namespace Fungus.EditorUtils namespace Fungus.EditorUtils
{ {
internal static class FungusEditorResources internal static partial class FungusEditorResources
{ {
private static Dictionary<string, Texture2D> textures = new Dictionary<string, Texture2D>();
static FungusEditorResources() { private static readonly string editorResourcesFolderName = "\"EditorResources\"";
GenerateSpecialTextures();
LoadResourceAssets();
}
private enum ResourceName
{
command_background = 0,
choice_node_off,
choice_node_on,
process_node_off,
process_node_on,
event_node_off,
event_node_on,
play_big,
play_small
}
private static string[] s_LightSkin = { static FungusEditorResources()
"command_background",
"choice_node_off",
"choice_node_on",
"process_node_off",
"process_node_on",
"event_node_off",
"event_node_on",
"play_big",
"play_small"
};
private static string[] s_DarkSkin = {
"command_background",
"choice_node_off",
"choice_node_on",
"process_node_off",
"process_node_on",
"event_node_off",
"event_node_on",
"play_big",
"play_small"
};
public static Texture2D texCommandBackground
{ {
get { return s_Cached[(int)ResourceName.command_background]; } LoadTexturesFromNames();
} }
public static Texture2D texEventNodeOn private static void LoadTexturesFromNames()
{ {
get { return s_Cached[(int)ResourceName.event_node_on]; } var baseDirectories = AssetDatabase.FindAssets(editorResourcesFolderName).Select(
} guid => AssetDatabase.GUIDToAssetPath(guid)
).ToArray();
public static Texture2D texEventNodeOff
{ foreach (var name in resourceNames)
get { return s_Cached[(int)ResourceName.event_node_off]; } {
LoadTexturesFromGUIDs(AssetDatabase.FindAssets(name + " t:Texture2D", baseDirectories));
}
} }
public static Texture2D texProcessNodeOn private static void LoadAllTexturesInFolder()
{
get { return s_Cached[(int)ResourceName.process_node_on]; }
}
public static Texture2D texProcessNodeOff
{ {
get { return s_Cached[(int)ResourceName.process_node_off]; } var rootGuid = AssetDatabase.FindAssets(editorResourcesFolderName)[0];
var root = AssetDatabase.GUIDToAssetPath(rootGuid);
LoadTexturesFromGUIDs(AssetDatabase.FindAssets("t:Texture2D", new [] { root }));
} }
public static Texture2D texChoiceNodeOn private static void LoadTexturesFromGUIDs(string[] guids)
{ {
get { return s_Cached[(int)ResourceName.choice_node_on]; } var paths = guids.Select(guid => AssetDatabase.GUIDToAssetPath(guid)).OrderBy(path => path.ToLower().Contains("/pro/"));
}
foreach (var path in paths)
public static Texture2D texChoiceNodeOff {
{ if (path.ToLower().Contains("/pro/") && !EditorGUIUtility.isProSkin)
get { return s_Cached[(int)ResourceName.choice_node_off]; } {
return;
}
var texture = AssetDatabase.LoadAssetAtPath(path, typeof(Texture2D)) as Texture2D;
textures[texture.name] = texture;
}
} }
public static Texture2D texPlayBig [MenuItem("Tools/Fungus/Utilities/Update Editor Resources Script")]
private static void GenerateResourcesScript()
{ {
get { return s_Cached[(int)ResourceName.play_big]; } textures.Clear();
} LoadAllTexturesInFolder();
public static Texture2D texPlaySmall var guid = AssetDatabase.FindAssets("FungusEditorResources t:MonoScript")[0];
{ var relativePath = AssetDatabase.GUIDToAssetPath(guid).Replace("FungusEditorResources.cs", "FungusEditorResourcesGenerated.cs");
get { return s_Cached[(int)ResourceName.play_small]; } var absolutePath = Application.dataPath + relativePath.Substring("Assets".Length);
}
using (var writer = new StreamWriter(absolutePath))
{
writer.WriteLine("// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).");
writer.WriteLine("// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)");
writer.WriteLine("");
writer.WriteLine("using UnityEngine;");
writer.WriteLine("");
writer.WriteLine("namespace Fungus.EditorUtils");
writer.WriteLine("{");
writer.WriteLine(" internal static partial class FungusEditorResources");
writer.WriteLine(" {");
writer.WriteLine(" private static readonly string[] resourceNames = new [] {");
foreach (var pair in textures)
{
writer.WriteLine(" \"" + pair.Key + "\",");
}
public static Texture2D texItemSplitter { get; private set; } writer.WriteLine(" };");
writer.WriteLine("");
private static void GenerateSpecialTextures()
{ foreach (var pair in textures)
var splitterColor = EditorGUIUtility.isProSkin {
? new Color(1f, 1f, 1f, 0.14f) var name = pair.Key;
: new Color(0.59f, 0.59f, 0.59f, 0.55f) var pascalCase = string.Join("", name.Split(new [] { '_' }, StringSplitOptions.RemoveEmptyEntries).Select(
; s => s.Substring(0, 1).ToUpper() + s.Substring(1)).ToArray()
texItemSplitter = CreatePixelTexture("(Generated) Item Splitter", splitterColor); );
} writer.WriteLine(" public static Texture2D " + pascalCase + " { get { return GetTexture(\"" + name + "\"); } }");
}
public static Texture2D CreatePixelTexture(string name, Color color)
{ writer.WriteLine(" }");
var tex = new Texture2D(1, 1, TextureFormat.ARGB32, false, true); writer.WriteLine("}");
tex.name = name; }
tex.hideFlags = HideFlags.HideAndDontSave;
tex.filterMode = FilterMode.Point; AssetDatabase.ImportAsset(relativePath);
tex.SetPixel(0, 0, color);
tex.Apply();
return tex;
} }
private static Texture2D[] s_Cached; private static Texture2D GetTexture(string name)
public static void LoadResourceAssets()
{ {
var skin = EditorGUIUtility.isProSkin ? s_DarkSkin : s_LightSkin; Texture2D texture;
s_Cached = new Texture2D[skin.Length]; if (!textures.TryGetValue(name, out texture))
for (int i = 0; i < s_Cached.Length; ++i)
{ {
s_Cached[i] = Resources.Load("Textures/" + skin[i]) as Texture2D; Debug.LogWarning("Texture \"" + name + "\" not found!");
} }
s_LightSkin = null; return texture;
s_DarkSkin = null;
}
private static void GetImageSize(byte[] imageData, out int width, out int height)
{
width = ReadInt(imageData, 3 + 15);
height = ReadInt(imageData, 3 + 15 + 2 + 2);
}
private static int ReadInt(byte[] imageData, int offset)
{
return (imageData[offset] << 8) | imageData[offset + 1];
} }
} }
} }

44
Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs

@ -0,0 +1,44 @@
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
namespace Fungus.EditorUtils
{
internal static partial class FungusEditorResources
{
private static readonly string[] resourceNames = new [] {
"add",
"add_small",
"delete",
"down",
"duplicate",
"up",
"choice_node_off",
"choice_node_on",
"command_background",
"event_node_off",
"event_node_on",
"play_big",
"play_small",
"process_node_off",
"process_node_on",
};
public static Texture2D Add { get { return GetTexture("add"); } }
public static Texture2D AddSmall { get { return GetTexture("add_small"); } }
public static Texture2D Delete { get { return GetTexture("delete"); } }
public static Texture2D Down { get { return GetTexture("down"); } }
public static Texture2D Duplicate { get { return GetTexture("duplicate"); } }
public static Texture2D Up { get { return GetTexture("up"); } }
public static Texture2D ChoiceNodeOff { get { return GetTexture("choice_node_off"); } }
public static Texture2D ChoiceNodeOn { get { return GetTexture("choice_node_on"); } }
public static Texture2D CommandBackground { get { return GetTexture("command_background"); } }
public static Texture2D EventNodeOff { get { return GetTexture("event_node_off"); } }
public static Texture2D EventNodeOn { get { return GetTexture("event_node_on"); } }
public static Texture2D PlayBig { get { return GetTexture("play_big"); } }
public static Texture2D PlaySmall { get { return GetTexture("play_small"); } }
public static Texture2D ProcessNodeOff { get { return GetTexture("process_node_off"); } }
public static Texture2D ProcessNodeOn { get { return GetTexture("process_node_on"); } }
}
}

12
Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f5119f9bdde234916bed657bdc751f76
timeCreated: 1478502142
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

2
Assets/Fungus/Scripts/VariableTypes/StringVariable.cs

@ -96,7 +96,7 @@ namespace Fungus
[VariableProperty("<Value>", typeof(StringVariable))] [VariableProperty("<Value>", typeof(StringVariable))]
public StringVariable stringRef; public StringVariable stringRef;
[TextArea(1,10)] [TextArea(1,15)]
[SerializeField] [SerializeField]
public string stringVal; public string stringVal;

29
Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs vendored

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
namespace Ideafixxxer.CsvParser namespace Ideafixxxer.CsvParser
{ {
@ -190,28 +191,36 @@ namespace Ideafixxxer.CsvParser
var context = new ParserContext(); var context = new ParserContext();
// Handle both Windows and Mac line endings // Handle both Windows and Mac line endings
string[] lines = csvData.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries); var lines = Regex.Split(csvData, "\n|\r\n");
ParserState currentState = ParserState.LineStartState; ParserState currentState = ParserState.LineStartState;
foreach (string next in lines) for (int i = 0; i < lines.Length; i++) {
{ var next = lines [i];
foreach (char ch in next)
// Skip empty entries
if (next.Length == 0)
{ {
switch (ch) continue;
{ }
for (int j = 0; j < next.Length; j++) {
var ch = next [j];
switch (ch) {
case CommaCharacter: case CommaCharacter:
currentState = currentState.Comma(context); currentState = currentState.Comma (context);
break; break;
case QuoteCharacter: case QuoteCharacter:
currentState = currentState.Quote(context); currentState = currentState.Quote (context);
break; break;
default: default:
currentState = currentState.AnyChar(ch, context); currentState = currentState.AnyChar (ch, context);
break; break;
} }
} }
currentState = currentState.EndOfLine(context); currentState = currentState.EndOfLine (context);
} }
List<string[]> allLines = context.GetAllLines(); List<string[]> allLines = context.GetAllLines();
return allLines.ToArray(); return allLines.ToArray();
} }

60
Assets/FungusExamples/DragAndDrop/DragAndDrop(EventSystem).unity

@ -627,47 +627,6 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 5800000, guid: 4442b79fcbcbb4aac97f42d6dc3d4e0b, m_PrefabParentObject: {fileID: 5800000, guid: 4442b79fcbcbb4aac97f42d6dc3d4e0b,
type: 2} type: 2}
m_PrefabInternal: {fileID: 442175927} m_PrefabInternal: {fileID: 442175927}
--- !u!1 &807929237
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 807929239}
- 114: {fileID: 807929238}
m_Layer: 0
m_Name: TestRunner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &807929238
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 807929237}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5c3afc1c624179749bcdecf7b0224902, type: 3}
m_Name:
m_EditorClassIdentifier:
currentTest: {fileID: 0}
--- !u!4 &807929239
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 807929237}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
--- !u!1 &1081858233 stripped --- !u!1 &1081858233 stripped
GameObject: GameObject:
m_PrefabParentObject: {fileID: 100000, guid: 4d55f86cf3b124c8fb1158da26ffa96d, type: 2} m_PrefabParentObject: {fileID: 100000, guid: 4d55f86cf3b124c8fb1158da26ffa96d, type: 2}
@ -997,7 +956,7 @@ MonoBehaviour:
y: -452 y: -452
width: 1887 width: 1887
height: 1080 height: 1080
selectedBlock: {fileID: 2019116698} selectedBlocks: []
selectedCommands: selectedCommands:
- {fileID: 2019116697} - {fileID: 2019116697}
variables: [] variables: []
@ -1030,6 +989,8 @@ MonoBehaviour:
y: 29 y: 29
width: 197 width: 197
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 17 itemId: 17
blockName: Drag Completed blockName: Drag Completed
description: description:
@ -1240,6 +1201,8 @@ MonoBehaviour:
y: 132 y: 132
width: 197 width: 197
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 16 itemId: 16
blockName: Drag Exited blockName: Drag Exited
description: description:
@ -1294,6 +1257,8 @@ MonoBehaviour:
y: 133 y: 133
width: 197 width: 197
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 15 itemId: 15
blockName: Drag Entered blockName: Drag Entered
description: description:
@ -1332,6 +1297,8 @@ MonoBehaviour:
y: 30 y: 30
width: 136 width: 136
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 14 itemId: 14
blockName: Drag Cancelled blockName: Drag Cancelled
description: description:
@ -1370,6 +1337,8 @@ MonoBehaviour:
y: 27 y: 27
width: 136 width: 136
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 13 itemId: 13
blockName: Drag Start blockName: Drag Start
description: description:
@ -1523,6 +1492,8 @@ MonoBehaviour:
y: 29 y: 29
width: 137 width: 137
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 18 itemId: 18
blockName: Object Clicked 1 blockName: Object Clicked 1
description: description:
@ -1546,6 +1517,8 @@ MonoBehaviour:
y: 31 y: 31
width: 137 width: 137
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 19 itemId: 19
blockName: Object Clicked 2 blockName: Object Clicked 2
description: description:
@ -1630,6 +1603,8 @@ MonoBehaviour:
y: -50 y: -50
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 20 itemId: 20
blockName: Start blockName: Start
description: description:
@ -1648,6 +1623,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 2019116698} parentBlock: {fileID: 2019116698}
waitForFrames: 1
--- !u!1 &2096462794 --- !u!1 &2096462794
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

60
Assets/FungusExamples/DragAndDrop/DragAndDrop.unity

@ -608,47 +608,6 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 5800000, guid: 4442b79fcbcbb4aac97f42d6dc3d4e0b, m_PrefabParentObject: {fileID: 5800000, guid: 4442b79fcbcbb4aac97f42d6dc3d4e0b,
type: 2} type: 2}
m_PrefabInternal: {fileID: 442175927} m_PrefabInternal: {fileID: 442175927}
--- !u!1 &807929237
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 807929239}
- 114: {fileID: 807929238}
m_Layer: 0
m_Name: TestRunner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &807929238
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 807929237}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5c3afc1c624179749bcdecf7b0224902, type: 3}
m_Name:
m_EditorClassIdentifier:
currentTest: {fileID: 0}
--- !u!4 &807929239
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 807929237}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
--- !u!1 &1081858233 stripped --- !u!1 &1081858233 stripped
GameObject: GameObject:
m_PrefabParentObject: {fileID: 100000, guid: 4d55f86cf3b124c8fb1158da26ffa96d, type: 2} m_PrefabParentObject: {fileID: 100000, guid: 4d55f86cf3b124c8fb1158da26ffa96d, type: 2}
@ -979,7 +938,7 @@ MonoBehaviour:
y: -452 y: -452
width: 1887 width: 1887
height: 1080 height: 1080
selectedBlock: {fileID: 2019116698} selectedBlocks: []
selectedCommands: [] selectedCommands: []
variables: [] variables: []
description: 'This scene shows how to set up a drag-and-drop description: 'This scene shows how to set up a drag-and-drop
@ -1011,6 +970,8 @@ MonoBehaviour:
y: 29 y: 29
width: 197 width: 197
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 17 itemId: 17
blockName: Drag Completed blockName: Drag Completed
description: description:
@ -1221,6 +1182,8 @@ MonoBehaviour:
y: 132 y: 132
width: 197 width: 197
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 16 itemId: 16
blockName: Drag Exited blockName: Drag Exited
description: description:
@ -1275,6 +1238,8 @@ MonoBehaviour:
y: 133 y: 133
width: 197 width: 197
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 15 itemId: 15
blockName: Drag Entered blockName: Drag Entered
description: description:
@ -1313,6 +1278,8 @@ MonoBehaviour:
y: 30 y: 30
width: 136 width: 136
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 14 itemId: 14
blockName: Drag Cancelled blockName: Drag Cancelled
description: description:
@ -1351,6 +1318,8 @@ MonoBehaviour:
y: 27 y: 27
width: 136 width: 136
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 13 itemId: 13
blockName: Drag Start blockName: Drag Start
description: description:
@ -1504,6 +1473,8 @@ MonoBehaviour:
y: 29 y: 29
width: 137 width: 137
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 18 itemId: 18
blockName: Object Clicked 1 blockName: Object Clicked 1
description: description:
@ -1527,6 +1498,8 @@ MonoBehaviour:
y: 31 y: 31
width: 137 width: 137
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 19 itemId: 19
blockName: Object Clicked 2 blockName: Object Clicked 2
description: description:
@ -1611,6 +1584,8 @@ MonoBehaviour:
y: -50 y: -50
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 20 itemId: 20
blockName: Start blockName: Start
description: description:
@ -1629,6 +1604,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 2019116698} parentBlock: {fileID: 2019116698}
waitForFrames: 1
--- !u!1 &2096462794 --- !u!1 &2096462794
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

9
Assets/FungusExamples/FungusLua/Narrative/StageAndPortraits.unity

@ -331,6 +331,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 574033268} parentBlock: {fileID: 574033268}
waitForFrames: 1
--- !u!114 &574033268 --- !u!114 &574033268
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -349,6 +350,8 @@ MonoBehaviour:
y: 68.96694 y: 68.96694
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -381,7 +384,7 @@ MonoBehaviour:
y: -340 y: -340
width: 1114 width: 1114
height: 859 height: 859
selectedBlock: {fileID: 574033268} selectedBlocks: []
selectedCommands: selectedCommands:
- {fileID: 574033272} - {fileID: 574033272}
variables: [] variables: []
@ -903,7 +906,7 @@ MonoBehaviour:
nameColor: {r: 1, g: 1, b: 1, a: 1} nameColor: {r: 1, g: 1, b: 1, a: 1}
soundEffect: {fileID: 0} soundEffect: {fileID: 0}
portraits: portraits:
- {fileID: 21300000, guid: a92b08a118b7d46f59dd091acb2e4102, type: 3} - {fileID: 21300000, guid: e8a9122c4dc10b14da3b625e1f2634c9, type: 3}
- {fileID: 21300000, guid: 03bc547cc0049594bae51f00903eedef, type: 3} - {fileID: 21300000, guid: 03bc547cc0049594bae51f00903eedef, type: 3}
portraitsFace: 0 portraitsFace: 0
setSayDialog: {fileID: 1231398849} setSayDialog: {fileID: 1231398849}
@ -954,7 +957,7 @@ MonoBehaviour:
soundEffect: {fileID: 0} soundEffect: {fileID: 0}
portraits: portraits:
- {fileID: 21300000, guid: 8f5b5b110e73a414eb229eeead86200f, type: 3} - {fileID: 21300000, guid: 8f5b5b110e73a414eb229eeead86200f, type: 3}
- {fileID: 21300000, guid: c779e34c6eb8e45da98c70cf2802a54c, type: 3} - {fileID: 21300000, guid: 84cdbfde1b7d4c24ab7071894480d5db, type: 3}
portraitsFace: 0 portraitsFace: 0
setSayDialog: {fileID: 1958712152} setSayDialog: {fileID: 1958712152}
description: description:

572
Assets/Tests/Scripting/Scripting.unity

@ -163,6 +163,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 115525222} parentBlock: {fileID: 115525222}
waitForFrames: 1
--- !u!114 &115525222 --- !u!114 &115525222
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -181,6 +182,8 @@ MonoBehaviour:
y: 70 y: 70
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -212,7 +215,7 @@ MonoBehaviour:
y: -340 y: -340
width: 1114 width: 1114
height: 859 height: 859
selectedBlock: {fileID: 115525222} selectedBlocks: []
selectedCommands: [] selectedCommands: []
variables: [] variables: []
description: description:
@ -301,6 +304,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 169310214} parentBlock: {fileID: 169310214}
waitForFrames: 1
--- !u!114 &169310214 --- !u!114 &169310214
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -319,6 +323,8 @@ MonoBehaviour:
y: 69 y: 69
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -350,7 +356,7 @@ MonoBehaviour:
y: -350 y: -350
width: 1126 width: 1126
height: 869 height: 869
selectedBlock: {fileID: 0} selectedBlocks: []
selectedCommands: [] selectedCommands: []
variables: [] variables: []
description: If none of the other Flowcharts have Failed then this one will succeed description: If none of the other Flowcharts have Failed then this one will succeed
@ -404,7 +410,7 @@ MonoBehaviour:
y: -340 y: -340
width: 1114 width: 1114
height: 859 height: 859
selectedBlock: {fileID: 0} selectedBlocks: []
selectedCommands: [] selectedCommands: []
variables: variables:
- {fileID: 178675537} - {fileID: 178675537}
@ -690,6 +696,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 265055379} parentBlock: {fileID: 265055379}
waitForFrames: 1
--- !u!114 &265055379 --- !u!114 &265055379
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -707,6 +714,8 @@ MonoBehaviour:
y: 70 y: 70
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 1 itemId: 1
blockName: BlockB blockName: BlockB
description: The block that does the stopping description: The block that does the stopping
@ -733,6 +742,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 265055381} parentBlock: {fileID: 265055381}
waitForFrames: 1
--- !u!114 &265055381 --- !u!114 &265055381
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -751,6 +761,8 @@ MonoBehaviour:
y: 70 y: 70
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: BlockA blockName: BlockA
description: The block to be stopped description: The block to be stopped
@ -782,7 +794,7 @@ MonoBehaviour:
y: -350 y: -350
width: 1121 width: 1121
height: 869 height: 869
selectedBlock: {fileID: 265055379} selectedBlocks: []
selectedCommands: [] selectedCommands: []
variables: variables:
- {fileID: 265055376} - {fileID: 265055376}
@ -890,7 +902,7 @@ MonoBehaviour:
y: -340 y: -340
width: 1114 width: 1114
height: 892 height: 892
selectedBlock: {fileID: 396492930} selectedBlocks: []
selectedCommands: selectedCommands:
- {fileID: 396492940} - {fileID: 396492940}
variables: variables:
@ -967,6 +979,8 @@ MonoBehaviour:
y: 111 y: 111
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -1035,6 +1049,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 396492930} parentBlock: {fileID: 396492930}
waitForFrames: 1
--- !u!114 &396492934 --- !u!114 &396492934
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1357,6 +1372,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 491823362} parentBlock: {fileID: 491823362}
waitForFrames: 1
--- !u!114 &491823362 --- !u!114 &491823362
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -1375,6 +1391,8 @@ MonoBehaviour:
y: 70 y: 70
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -1412,7 +1430,8 @@ MonoBehaviour:
y: -340 y: -340
width: 1114 width: 1114
height: 859 height: 859
selectedBlock: {fileID: 491823362} selectedBlocks:
- {fileID: 491823362}
selectedCommands: [] selectedCommands: []
variables: variables:
- {fileID: 491823359} - {fileID: 491823359}
@ -1523,6 +1542,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 575910004} parentBlock: {fileID: 575910004}
waitForFrames: 1
--- !u!114 &575910004 --- !u!114 &575910004
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -1540,6 +1560,8 @@ MonoBehaviour:
y: 75 y: 75
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 2 itemId: 2
blockName: New Block blockName: New Block
description: description:
@ -1585,6 +1607,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 575910007} parentBlock: {fileID: 575910007}
waitForFrames: 1
--- !u!114 &575910007 --- !u!114 &575910007
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -1603,6 +1626,8 @@ MonoBehaviour:
y: 69 y: 69
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -1634,7 +1659,7 @@ MonoBehaviour:
y: -350 y: -350
width: 1126 width: 1126
height: 869 height: 869
selectedBlock: {fileID: 575910007} selectedBlocks: []
selectedCommands: [] selectedCommands: []
variables: [] variables: []
description: Test if interupting a Say command works description: Test if interupting a Say command works
@ -1763,6 +1788,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 590474778} parentBlock: {fileID: 590474778}
waitForFrames: 1
--- !u!114 &590474778 --- !u!114 &590474778
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -1780,6 +1806,8 @@ MonoBehaviour:
y: 75 y: 75
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 2 itemId: 2
blockName: New Block blockName: New Block
description: description:
@ -1800,6 +1828,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 590474780} parentBlock: {fileID: 590474780}
waitForFrames: 1
--- !u!114 &590474780 --- !u!114 &590474780
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -1818,6 +1847,8 @@ MonoBehaviour:
y: 69 y: 69
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -1850,7 +1881,7 @@ MonoBehaviour:
y: -350 y: -350
width: 1126 width: 1126
height: 869 height: 869
selectedBlock: {fileID: 590474780} selectedBlocks: []
selectedCommands: selectedCommands:
- {fileID: 590474773} - {fileID: 590474773}
variables: [] variables: []
@ -1933,6 +1964,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 636123607} parentBlock: {fileID: 636123607}
waitForFrames: 1
--- !u!114 &636123607 --- !u!114 &636123607
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -1951,6 +1983,8 @@ MonoBehaviour:
y: 69 y: 69
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -1983,7 +2017,7 @@ MonoBehaviour:
y: -350 y: -350
width: 1126 width: 1126
height: 869 height: 869
selectedBlock: {fileID: 636123607} selectedBlocks: []
selectedCommands: selectedCommands:
- {fileID: 636123614} - {fileID: 636123614}
variables: [] variables: []
@ -2054,6 +2088,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 636123613} parentBlock: {fileID: 636123613}
waitForFrames: 1
--- !u!114 &636123613 --- !u!114 &636123613
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -2071,6 +2106,8 @@ MonoBehaviour:
y: 75 y: 75
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 2 itemId: 2
blockName: New Block blockName: New Block
description: description:
@ -2152,7 +2189,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
selectedFlowchart: {fileID: 178675536} selectedFlowchart: {fileID: 675090867}
--- !u!4 &646902075 --- !u!4 &646902075
Transform: Transform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -2166,6 +2203,455 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
--- !u!1 &675090853
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 675090854}
- 114: {fileID: 675090867}
- 114: {fileID: 675090866}
- 114: {fileID: 675090865}
- 114: {fileID: 675090864}
- 114: {fileID: 675090863}
- 114: {fileID: 675090862}
- 114: {fileID: 675090861}
- 114: {fileID: 675090860}
- 114: {fileID: 675090859}
- 114: {fileID: 675090858}
- 114: {fileID: 675090857}
- 114: {fileID: 675090856}
- 114: {fileID: 675090873}
- 114: {fileID: 675090872}
- 114: {fileID: 675090871}
- 114: {fileID: 675090870}
- 114: {fileID: 675090869}
- 114: {fileID: 675090868}
- 114: {fileID: 675090855}
m_Layer: 0
m_Name: Flowchart
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &675090854
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1220349165}
m_RootOrder: 0
--- !u!114 &675090855
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4920f47cde1a84b11ad07b7317568494, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 15
indentLevel: 0
--- !u!114 &675090856
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 7
indentLevel: 1
variable: {fileID: 675090859}
setOperator: 0
booleanData:
booleanRef: {fileID: 0}
booleanVal: 0
integerData:
integerRef: {fileID: 0}
integerVal: 0
floatData:
floatRef: {fileID: 0}
floatVal: 0
stringData:
stringRef: {fileID: 0}
stringVal:
--- !u!114 &675090857
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 6
indentLevel: 2
variable: {fileID: 675090859}
setOperator: 2
booleanData:
booleanRef: {fileID: 0}
booleanVal: 0
integerData:
integerRef: {fileID: 0}
integerVal: 1
floatData:
floatRef: {fileID: 0}
floatVal: 0
stringData:
stringRef: {fileID: 0}
stringVal:
--- !u!114 &675090858
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 5
indentLevel: 1
variable: {fileID: 675090860}
setOperator: 2
booleanData:
booleanRef: {fileID: 0}
booleanVal: 0
integerData:
integerRef: {fileID: 0}
integerVal: 1
floatData:
floatRef: {fileID: 0}
floatVal: 0
stringData:
stringRef: {fileID: 0}
stringVal:
--- !u!114 &675090859
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: afb91b566ceda411bad1e9d3c3243ecc, type: 3}
m_Name:
m_EditorClassIdentifier:
scope: 0
key: j
value: 0
--- !u!114 &675090860
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: afb91b566ceda411bad1e9d3c3243ecc, type: 3}
m_Name:
m_EditorClassIdentifier:
scope: 0
key: i
value: 0
--- !u!114 &675090861
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 4
indentLevel: 0
--- !u!114 &675090862
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 663c8a7831a104d16ad7078a4dc2bd10, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 3
indentLevel: 1
compareOperator: 2
variable: {fileID: 675090859}
booleanData:
booleanRef: {fileID: 0}
booleanVal: 0
integerData:
integerRef: {fileID: 0}
integerVal: 3
floatData:
floatRef: {fileID: 0}
floatVal: 0
stringData:
stringRef: {fileID: 0}
stringVal:
--- !u!114 &675090863
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 2
indentLevel: 1
--- !u!114 &675090864
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 663c8a7831a104d16ad7078a4dc2bd10, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 1
indentLevel: 0
compareOperator: 2
variable: {fileID: 675090860}
booleanData:
booleanRef: {fileID: 0}
booleanVal: 0
integerData:
integerRef: {fileID: 0}
integerVal: 3
floatData:
floatRef: {fileID: 0}
floatVal: 0
stringData:
stringRef: {fileID: 0}
stringVal:
--- !u!114 &675090865
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3}
m_Name:
m_EditorClassIdentifier:
parentBlock: {fileID: 675090866}
waitForFrames: 1
--- !u!114 &675090866
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3}
m_Name:
m_EditorClassIdentifier:
nodeRect:
serializedVersion: 2
x: 67
y: 70
width: 120
height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0
blockName: Start
description:
eventHandler: {fileID: 675090865}
commandList:
- {fileID: 675090864}
- {fileID: 675090856}
- {fileID: 675090858}
- {fileID: 675090862}
- {fileID: 675090857}
- {fileID: 675090863}
- {fileID: 675090861}
- {fileID: 675090873}
- {fileID: 675090871}
- {fileID: 675090872}
- {fileID: 675090870}
- {fileID: 675090869}
- {fileID: 675090868}
- {fileID: 675090855}
--- !u!114 &675090867
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
blockViewHeight: 400
zoom: 1
scrollViewRect:
serializedVersion: 2
x: -343
y: -340
width: 1114
height: 859
selectedBlocks: []
selectedCommands: []
variables:
- {fileID: 675090860}
- {fileID: 675090859}
description: Check if nested while loops work correctly
stepPause: 0
colorCommands: 1
hideComponents: 1
saveSelection: 1
localizationId:
showLineNumbers: 0
hideCommands: []
luaEnvironment: {fileID: 0}
luaBindingName: flowchart
--- !u!114 &675090868
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 14
indentLevel: 0
--- !u!114 &675090869
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2dcb71131f45b47fead560a97ef55f1c, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 13
indentLevel: 1
failMessage:
--- !u!114 &675090870
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 12
indentLevel: 0
compareOperator: 1
variable: {fileID: 675090859}
booleanData:
booleanRef: {fileID: 0}
booleanVal: 0
integerData:
integerRef: {fileID: 0}
integerVal: 3
floatData:
floatRef: {fileID: 0}
floatVal: 0
stringData:
stringRef: {fileID: 0}
stringVal:
--- !u!114 &675090871
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2dcb71131f45b47fead560a97ef55f1c, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 11
indentLevel: 1
failMessage:
--- !u!114 &675090872
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 10
indentLevel: 0
--- !u!114 &675090873
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 675090853}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 9
indentLevel: 0
compareOperator: 1
variable: {fileID: 675090860}
booleanData:
booleanRef: {fileID: 0}
booleanVal: 0
integerData:
integerRef: {fileID: 0}
integerVal: 3
floatData:
floatRef: {fileID: 0}
floatVal: 0
stringData:
stringRef: {fileID: 0}
stringVal:
--- !u!1 &676156674 --- !u!1 &676156674
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2613,6 +3099,57 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1141004796} m_GameObject: {fileID: 1141004796}
--- !u!1 &1220349163
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1220349165}
- 114: {fileID: 1220349164}
m_Layer: 0
m_Name: NestedWhileTest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1220349164
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1220349163}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3}
m_Name:
m_EditorClassIdentifier:
timeout: 5
ignored: 0
succeedAfterAllAssertionsAreExecuted: 0
expectException: 0
expectedExceptionList:
succeedWhenExceptionIsThrown: 0
includedPlatforms: -1
platformsToIgnore: []
dynamic: 0
dynamicTypeName:
--- !u!4 &1220349165
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1220349163}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 675090854}
m_Father: {fileID: 0}
m_RootOrder: 12
--- !u!1 &1314799789 --- !u!1 &1314799789
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2628,7 +3165,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!114 &1314799790 --- !u!114 &1314799790
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2892,7 +3429,7 @@ MonoBehaviour:
y: -351 y: -351
width: 1161 width: 1161
height: 873 height: 873
selectedBlock: {fileID: 1618689131} selectedBlocks: []
selectedCommands: selectedCommands:
- {fileID: 1618689150} - {fileID: 1618689150}
variables: variables:
@ -3022,6 +3559,8 @@ MonoBehaviour:
y: 69 y: 69
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Test Invoke blockName: Test Invoke
description: description:
@ -3050,6 +3589,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 1618689131} parentBlock: {fileID: 1618689131}
waitForFrames: 1
--- !u!4 &1618689133 --- !u!4 &1618689133
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3427,6 +3967,8 @@ MonoBehaviour:
y: 68 y: 68
width: 156 width: 156
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 11 itemId: 11
blockName: Test Delayed Invoke blockName: Test Delayed Invoke
description: This block gets executed by last command in Test Invoke description: This block gets executed by last command in Test Invoke
@ -3664,7 +4206,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3} m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
remoteDebugger: 0
--- !u!114 &1753646198 --- !u!114 &1753646198
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -4103,6 +4644,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
parentBlock: {fileID: 1982550313} parentBlock: {fileID: 1982550313}
waitForFrames: 1
--- !u!114 &1982550313 --- !u!114 &1982550313
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 2 m_ObjectHideFlags: 2
@ -4121,6 +4663,8 @@ MonoBehaviour:
y: 70 y: 70
width: 120 width: 120
height: 40 height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0 itemId: 0
blockName: Start blockName: Start
description: description:
@ -4156,7 +4700,7 @@ MonoBehaviour:
y: -340 y: -340
width: 1114 width: 1114
height: 859 height: 859
selectedBlock: {fileID: 1982550313} selectedBlocks: []
selectedCommands: [] selectedCommands: []
variables: variables:
- {fileID: 1982550310} - {fileID: 1982550310}

Loading…
Cancel
Save