diff --git a/Assets/Fungus/Docs.meta b/Assets/Example.meta similarity index 63% rename from Assets/Fungus/Docs.meta rename to Assets/Example.meta index ee98a9ec..3471bbae 100644 --- a/Assets/Fungus/Docs.meta +++ b/Assets/Example.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b2a1842979c244113ac31b4b37744a1d +guid: 4b09c77dc01c54b5084100479119d16d folderAsset: yes DefaultImporter: userData: diff --git a/Assets/FungusExample/Audio.meta b/Assets/Example/Audio.meta similarity index 63% rename from Assets/FungusExample/Audio.meta rename to Assets/Example/Audio.meta index d758f616..0579b725 100644 --- a/Assets/FungusExample/Audio.meta +++ b/Assets/Example/Audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 23916e2f1deff4e31a36b6e75aed0906 +guid: 6ec2f7eb17e1141eea07422a76e852c4 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Example/Audio/UpATree.ogg b/Assets/Example/Audio/UpATree.ogg new file mode 100755 index 00000000..db4dd0dc Binary files /dev/null and b/Assets/Example/Audio/UpATree.ogg differ diff --git a/Assets/FungusExample/Audio/effect.wav.meta b/Assets/Example/Audio/UpATree.ogg.meta similarity index 80% rename from Assets/FungusExample/Audio/effect.wav.meta rename to Assets/Example/Audio/UpATree.ogg.meta index 62258e79..477a7f8b 100644 --- a/Assets/FungusExample/Audio/effect.wav.meta +++ b/Assets/Example/Audio/UpATree.ogg.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5446370c736a84b6d9d6a9bb6f4d4521 +guid: ae3aa0e9b0f0248a59548b5d9e77a6c1 AudioImporter: serializedVersion: 4 format: 0 diff --git a/Assets/FungusExample/Scenes.meta b/Assets/Example/Scenes.meta similarity index 63% rename from Assets/FungusExample/Scenes.meta rename to Assets/Example/Scenes.meta index 0a120a12..43ff9204 100644 --- a/Assets/FungusExample/Scenes.meta +++ b/Assets/Example/Scenes.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 695c2b87de46948719d8d25616c55ad0 +guid: 01aa5d8be39a64aefa40bbe2bb40a9d1 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Example/Scenes/Example.unity b/Assets/Example/Scenes/Example.unity new file mode 100644 index 00000000..3d33729d Binary files /dev/null and b/Assets/Example/Scenes/Example.unity differ diff --git a/Assets/FungusExample/Scenes/Example.unity.meta b/Assets/Example/Scenes/Example.unity.meta similarity index 56% rename from Assets/FungusExample/Scenes/Example.unity.meta rename to Assets/Example/Scenes/Example.unity.meta index a293dfc5..7cb03292 100644 --- a/Assets/FungusExample/Scenes/Example.unity.meta +++ b/Assets/Example/Scenes/Example.unity.meta @@ -1,4 +1,4 @@ fileFormatVersion: 2 -guid: 5a6b6f6f9c1684498b25f6f41ef56995 +guid: 7456307ca6764419c87a92bb5351630d DefaultImporter: userData: diff --git a/Assets/Fungus/Sprites.meta b/Assets/Example/Sprites.meta similarity index 63% rename from Assets/Fungus/Sprites.meta rename to Assets/Example/Sprites.meta index 6614a1fa..2798b55e 100644 --- a/Assets/Fungus/Sprites.meta +++ b/Assets/Example/Sprites.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 46997c16617ca413c9b5d94fd22aeb52 +guid: aed10a27008a24d06bc8c4f3eb9c2074 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Example/Sprites/Attribution.txt b/Assets/Example/Sprites/Attribution.txt new file mode 100644 index 00000000..91d7f796 --- /dev/null +++ b/Assets/Example/Sprites/Attribution.txt @@ -0,0 +1,8 @@ +Creative Commons / Public Domain artwork used with permission. +Mnay thanks to the authors for sharing! + +http://denmanrooke.com/creativecommons/ +http://syntetyc.deviantart.com/art/Waterfall-forest-214723814 +http://syntetyc.deviantart.com/art/Green-Forest-206321928 +http://syntetyc.deviantart.com/art/Sanctuary-Forest-207795795 +http://syntetyc.deviantart.com/art/Deep-Forest-204641620 diff --git a/Assets/FungusExample/Sprites/GreenCons/MouseRunnerDotComGraphicsLicense.txt.meta b/Assets/Example/Sprites/Attribution.txt.meta similarity index 58% rename from Assets/FungusExample/Sprites/GreenCons/MouseRunnerDotComGraphicsLicense.txt.meta rename to Assets/Example/Sprites/Attribution.txt.meta index 296ed698..d11461e5 100644 --- a/Assets/FungusExample/Sprites/GreenCons/MouseRunnerDotComGraphicsLicense.txt.meta +++ b/Assets/Example/Sprites/Attribution.txt.meta @@ -1,4 +1,4 @@ fileFormatVersion: 2 -guid: b2e1b498f5c584f32af544c563ec0a47 +guid: f35e49c61f66a4ac3a13a2f6e1424132 TextScriptImporter: userData: diff --git a/Assets/Example/Sprites/Bear.png b/Assets/Example/Sprites/Bear.png new file mode 100644 index 00000000..f0ff81bb Binary files /dev/null and b/Assets/Example/Sprites/Bear.png differ diff --git a/Assets/Example/Sprites/Bear.png.meta b/Assets/Example/Sprites/Bear.png.meta new file mode 100644 index 00000000..83a78222 --- /dev/null +++ b/Assets/Example/Sprites/Bear.png.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: 1844620fa148d4dc89443ca7b33205e1 +TextureImporter: + fileIDToRecycleName: + 21300000: Bear + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/BearHead.png b/Assets/Example/Sprites/BearHead.png new file mode 100644 index 00000000..3fe17a02 Binary files /dev/null and b/Assets/Example/Sprites/BearHead.png differ diff --git a/Assets/FungusExample/Sprites/MushroomLand/bg_desert.png.meta b/Assets/Example/Sprites/BearHead.png.meta similarity index 87% rename from Assets/FungusExample/Sprites/MushroomLand/bg_desert.png.meta rename to Assets/Example/Sprites/BearHead.png.meta index b8c364b5..04d84531 100644 --- a/Assets/FungusExample/Sprites/MushroomLand/bg_desert.png.meta +++ b/Assets/Example/Sprites/BearHead.png.meta @@ -1,6 +1,8 @@ fileFormatVersion: 2 -guid: 553ed7a6833df4e73add201fa05442d9 +guid: 62955e2782fd34c5ca3e78712625ae50 TextureImporter: + fileIDToRecycleName: + 21300000: BearHead serializedVersion: 2 mipmaps: mipMapMode: 0 @@ -35,6 +37,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} spritePixelsToUnits: 100 alphaIsTransparency: 1 textureType: 8 diff --git a/Assets/Example/Sprites/Ciara.psd b/Assets/Example/Sprites/Ciara.psd new file mode 100644 index 00000000..03b89439 Binary files /dev/null and b/Assets/Example/Sprites/Ciara.psd differ diff --git a/Assets/Example/Sprites/Ciara.psd.meta b/Assets/Example/Sprites/Ciara.psd.meta new file mode 100644 index 00000000..5baab4ac --- /dev/null +++ b/Assets/Example/Sprites/Ciara.psd.meta @@ -0,0 +1,49 @@ +fileFormatVersion: 2 +guid: c784f0adc2ce544be915fc26a2b4b510 +TextureImporter: + fileIDToRecycleName: + 21300000: UrchinGirl + 21300002: Ciara + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/CiaraHead.psd b/Assets/Example/Sprites/CiaraHead.psd new file mode 100644 index 00000000..1e3d739c Binary files /dev/null and b/Assets/Example/Sprites/CiaraHead.psd differ diff --git a/Assets/Example/Sprites/CiaraHead.psd.meta b/Assets/Example/Sprites/CiaraHead.psd.meta new file mode 100644 index 00000000..aa00404c --- /dev/null +++ b/Assets/Example/Sprites/CiaraHead.psd.meta @@ -0,0 +1,49 @@ +fileFormatVersion: 2 +guid: 05ccd53483a554ca9b31f685fa76154a +TextureImporter: + fileIDToRecycleName: + 21300000: UrchinGirlProfile + 21300002: CiaraHead + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/DeepForest.jpg b/Assets/Example/Sprites/DeepForest.jpg new file mode 100644 index 00000000..6b27e45d Binary files /dev/null and b/Assets/Example/Sprites/DeepForest.jpg differ diff --git a/Assets/Example/Sprites/DeepForest.jpg.meta b/Assets/Example/Sprites/DeepForest.jpg.meta new file mode 100644 index 00000000..169d2771 --- /dev/null +++ b/Assets/Example/Sprites/DeepForest.jpg.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: d3b6d7e5887554602baab879da8171d7 +TextureImporter: + fileIDToRecycleName: + 21300000: DeepForest + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/SanctuaryForest.jpg b/Assets/Example/Sprites/SanctuaryForest.jpg new file mode 100644 index 00000000..0f0ab3ed Binary files /dev/null and b/Assets/Example/Sprites/SanctuaryForest.jpg differ diff --git a/Assets/Example/Sprites/SanctuaryForest.jpg.meta b/Assets/Example/Sprites/SanctuaryForest.jpg.meta new file mode 100644 index 00000000..1daea5a5 --- /dev/null +++ b/Assets/Example/Sprites/SanctuaryForest.jpg.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: 2230440f02def4c728f10bdb641df3a7 +TextureImporter: + fileIDToRecycleName: + 21300000: SanctuaryForest + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/Shay.psd b/Assets/Example/Sprites/Shay.psd new file mode 100644 index 00000000..8d2dda61 Binary files /dev/null and b/Assets/Example/Sprites/Shay.psd differ diff --git a/Assets/Example/Sprites/Shay.psd.meta b/Assets/Example/Sprites/Shay.psd.meta new file mode 100644 index 00000000..b347a236 --- /dev/null +++ b/Assets/Example/Sprites/Shay.psd.meta @@ -0,0 +1,49 @@ +fileFormatVersion: 2 +guid: 6b100daff28d04f69a49015f83966425 +TextureImporter: + fileIDToRecycleName: + 21300000: Roamer + 21300002: Shay + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/ShayHead.psd b/Assets/Example/Sprites/ShayHead.psd new file mode 100644 index 00000000..9c81a145 Binary files /dev/null and b/Assets/Example/Sprites/ShayHead.psd differ diff --git a/Assets/Example/Sprites/ShayHead.psd.meta b/Assets/Example/Sprites/ShayHead.psd.meta new file mode 100644 index 00000000..f3c499ad --- /dev/null +++ b/Assets/Example/Sprites/ShayHead.psd.meta @@ -0,0 +1,49 @@ +fileFormatVersion: 2 +guid: f7484a661774243b193bebc6e3ae5120 +TextureImporter: + fileIDToRecycleName: + 21300000: RoamerProfile + 21300002: ShayHead + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/Skipper.psd b/Assets/Example/Sprites/Skipper.psd new file mode 100644 index 00000000..6d691fc4 Binary files /dev/null and b/Assets/Example/Sprites/Skipper.psd differ diff --git a/Assets/FungusExample/Sprites/MushroomLand/bg_castle.png.meta b/Assets/Example/Sprites/Skipper.psd.meta similarity index 87% rename from Assets/FungusExample/Sprites/MushroomLand/bg_castle.png.meta rename to Assets/Example/Sprites/Skipper.psd.meta index 81d34126..72604934 100644 --- a/Assets/FungusExample/Sprites/MushroomLand/bg_castle.png.meta +++ b/Assets/Example/Sprites/Skipper.psd.meta @@ -1,6 +1,8 @@ fileFormatVersion: 2 -guid: 59930f9d710bb4959aad3b151c20cc82 +guid: ed14cc18e1e37449eb670f2613314102 TextureImporter: + fileIDToRecycleName: + 21300000: Skipper serializedVersion: 2 mipmaps: mipMapMode: 0 @@ -35,6 +37,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} spritePixelsToUnits: 100 alphaIsTransparency: 1 textureType: 8 diff --git a/Assets/Example/Sprites/SkipperHead.psd b/Assets/Example/Sprites/SkipperHead.psd new file mode 100644 index 00000000..c46dd2b1 Binary files /dev/null and b/Assets/Example/Sprites/SkipperHead.psd differ diff --git a/Assets/Example/Sprites/SkipperHead.psd.meta b/Assets/Example/Sprites/SkipperHead.psd.meta new file mode 100644 index 00000000..19c676d7 --- /dev/null +++ b/Assets/Example/Sprites/SkipperHead.psd.meta @@ -0,0 +1,49 @@ +fileFormatVersion: 2 +guid: 3c64e30cbefbe4e768ef68d85c85061e +TextureImporter: + fileIDToRecycleName: + 21300000: SkipperProfile + 21300002: SkipperHead + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/Waterfall.jpg b/Assets/Example/Sprites/Waterfall.jpg new file mode 100644 index 00000000..c23fdbd1 Binary files /dev/null and b/Assets/Example/Sprites/Waterfall.jpg differ diff --git a/Assets/Example/Sprites/Waterfall.jpg.meta b/Assets/Example/Sprites/Waterfall.jpg.meta new file mode 100644 index 00000000..be500215 --- /dev/null +++ b/Assets/Example/Sprites/Waterfall.jpg.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: e54c2166ac91140689c6f04097cab20e +TextureImporter: + fileIDToRecycleName: + 21300000: Waterfall + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Example/Sprites/WaterfallForest.jpg b/Assets/Example/Sprites/WaterfallForest.jpg new file mode 100644 index 00000000..1b096e88 Binary files /dev/null and b/Assets/Example/Sprites/WaterfallForest.jpg differ diff --git a/Assets/Example/Sprites/WaterfallForest.jpg.meta b/Assets/Example/Sprites/WaterfallForest.jpg.meta new file mode 100644 index 00000000..d815b193 --- /dev/null +++ b/Assets/Example/Sprites/WaterfallForest.jpg.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: abf7ee5b818ac485980005a2e5066fb0 +TextureImporter: + fileIDToRecycleName: + 21300000: WaterfallForest + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Fungus.meta b/Assets/Fungus.meta index b8729a60..163520c3 100644 --- a/Assets/Fungus.meta +++ b/Assets/Fungus.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 72452d0189a95436fb93c2ec54d83801 +guid: 120b23b5240c94aee960b7434706811c folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Fonts/source-sans-pro.meta b/Assets/Fungus/Animation.meta similarity index 63% rename from Assets/Fungus/Fonts/source-sans-pro.meta rename to Assets/Fungus/Animation.meta index a4f99dd6..6a585646 100644 --- a/Assets/Fungus/Fonts/source-sans-pro.meta +++ b/Assets/Fungus/Animation.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4dae98786fda548fba135bed70721da9 +guid: 623a31d1ed64f48c18a2941fb2e6bb4b folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Scripts/Commands.meta b/Assets/Fungus/Animation/Commands.meta similarity index 63% rename from Assets/Fungus/Scripts/Commands.meta rename to Assets/Fungus/Animation/Commands.meta index e1cc88b9..17b1b807 100644 --- a/Assets/Fungus/Scripts/Commands.meta +++ b/Assets/Fungus/Animation/Commands.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ed31c7843a16b49bb918643ab98b7f67 +guid: 3e8003ca74cfb4a99983b0084a826c72 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Animation/Commands/SetAnimBool.cs b/Assets/Fungus/Animation/Commands/SetAnimBool.cs new file mode 100644 index 00000000..00f5dc54 --- /dev/null +++ b/Assets/Fungus/Animation/Commands/SetAnimBool.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Animation", + "Set Anim Bool", + "Sets a boolean parameter on an animator to control an animation")] + public class SetAnimBool : Command + { + public Animator animator; + public string parameterName; + public BooleanData value; + + public override void OnEnter() + { + if (animator != null) + { + animator.SetBool(parameterName, value.Value); + } + + Continue(); + } + + public override string GetSummary() + { + if (animator == null) + { + return "Error: No animator selected"; + } + + return animator.name + " (" + parameterName + ")"; + } + + public override Color GetButtonColor() + { + return new Color32(170, 204, 169, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Editor/PageEditor.cs.meta b/Assets/Fungus/Animation/Commands/SetAnimBool.cs.meta similarity index 78% rename from Assets/Fungus/Editor/PageEditor.cs.meta rename to Assets/Fungus/Animation/Commands/SetAnimBool.cs.meta index 49d26ab2..550898d1 100644 --- a/Assets/Fungus/Editor/PageEditor.cs.meta +++ b/Assets/Fungus/Animation/Commands/SetAnimBool.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: dce33924cf6804b2c94d17784a6037d1 +guid: ee63e642958494f1ebed8116ae4b1103 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/Assets/Fungus/Animation/Commands/SetAnimFloat.cs b/Assets/Fungus/Animation/Commands/SetAnimFloat.cs new file mode 100644 index 00000000..289728fe --- /dev/null +++ b/Assets/Fungus/Animation/Commands/SetAnimFloat.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Animation", + "Set Anim Float", + "Sets a float parameter on an animator to control an animation")] + public class SetAnimFloat : Command + { + public Animator animator; + public string parameterName; + public FloatData value; + + public override void OnEnter() + { + if (animator != null) + { + animator.SetFloat(parameterName, value.Value); + } + + Continue(); + } + + public override string GetSummary() + { + if (animator == null) + { + return "Error: No animator selected"; + } + + return animator.name + " (" + parameterName + ")"; + } + + public override Color GetButtonColor() + { + return new Color32(170, 204, 169, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Editor/RoomEditor.cs.meta b/Assets/Fungus/Animation/Commands/SetAnimFloat.cs.meta similarity index 78% rename from Assets/Fungus/Editor/RoomEditor.cs.meta rename to Assets/Fungus/Animation/Commands/SetAnimFloat.cs.meta index c343ab3b..b3105f53 100644 --- a/Assets/Fungus/Editor/RoomEditor.cs.meta +++ b/Assets/Fungus/Animation/Commands/SetAnimFloat.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0314fe408508a4b25afa76f65378a427 +guid: fb1f6a369ef8c40bda77241018ab6bd6 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/Assets/Fungus/Animation/Commands/SetAnimInteger.cs b/Assets/Fungus/Animation/Commands/SetAnimInteger.cs new file mode 100644 index 00000000..ec82adf8 --- /dev/null +++ b/Assets/Fungus/Animation/Commands/SetAnimInteger.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Animation", + "Set Anim Integer", + "Sets an integer parameter on an animator to control an animation")] + public class SetAnimInteger : Command + { + public Animator animator; + public string parameterName; + public IntegerData value; + + public override void OnEnter() + { + if (animator != null) + { + animator.SetInteger(parameterName, value.Value); + } + + Continue(); + } + + public override string GetSummary() + { + if (animator == null) + { + return "Error: No animator selected"; + } + + return animator.name + " (" + parameterName + ")"; + } + + public override Color GetButtonColor() + { + return new Color32(170, 204, 169, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Legacy/Page.cs.meta b/Assets/Fungus/Animation/Commands/SetAnimInteger.cs.meta similarity index 78% rename from Assets/Fungus/Legacy/Page.cs.meta rename to Assets/Fungus/Animation/Commands/SetAnimInteger.cs.meta index 6df14949..8da48a92 100644 --- a/Assets/Fungus/Legacy/Page.cs.meta +++ b/Assets/Fungus/Animation/Commands/SetAnimInteger.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 627f97c837bdf479aa14a90d8ea3a736 +guid: 76641c2c16481448eb6c0c1184fcdebe MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs b/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs new file mode 100644 index 00000000..58c724ab --- /dev/null +++ b/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs @@ -0,0 +1,41 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Animation", + "Set Anim Trigger", + "Sets a trigger parameter on an animator to control an animation")] + public class SetAnimTrigger : Command + { + public Animator animator; + public string parameterName; + + public override void OnEnter() + { + if (animator != null) + { + animator.SetTrigger(parameterName); + } + + Continue(); + } + + public override string GetSummary() + { + if (animator == null) + { + return "Error: No animator selected"; + } + + return animator.name + " (" + parameterName + ")"; + } + + public override Color GetButtonColor() + { + return new Color32(170, 204, 169, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Editor/GameEditor.cs.meta b/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs.meta similarity index 78% rename from Assets/Fungus/Editor/GameEditor.cs.meta rename to Assets/Fungus/Animation/Commands/SetAnimTrigger.cs.meta index 7267527f..ed91e648 100644 --- a/Assets/Fungus/Editor/GameEditor.cs.meta +++ b/Assets/Fungus/Animation/Commands/SetAnimTrigger.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5464e5745a4da462795a6f6f5b112962 +guid: 0729d4f369e6a4241a6e7e3b8b9c1933 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/Assets/Fungus/Audio.meta b/Assets/Fungus/Audio.meta index e8e429c6..ebac8dcd 100644 --- a/Assets/Fungus/Audio.meta +++ b/Assets/Fungus/Audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d9780867e1f2c456a9bd67af4ed5e2e4 +guid: 50aeb1f91c7cf484e85d48c7370e926f folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Audio/Audio.meta b/Assets/Fungus/Audio/Audio.meta new file mode 100644 index 00000000..891fd621 --- /dev/null +++ b/Assets/Fungus/Audio/Audio.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0c0251f25261847649112eb90bdc787c +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Audio/Click.wav b/Assets/Fungus/Audio/Audio/Click.wav similarity index 100% rename from Assets/Fungus/Audio/Click.wav rename to Assets/Fungus/Audio/Audio/Click.wav diff --git a/Assets/Fungus/Audio/Click.wav.meta b/Assets/Fungus/Audio/Audio/Click.wav.meta similarity index 100% rename from Assets/Fungus/Audio/Click.wav.meta rename to Assets/Fungus/Audio/Audio/Click.wav.meta diff --git a/Assets/Fungus/Audio/Commands.meta b/Assets/Fungus/Audio/Commands.meta new file mode 100644 index 00000000..74aea98a --- /dev/null +++ b/Assets/Fungus/Audio/Commands.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d4ee6befb080e414984229c6b24358ae +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Audio/Commands/PlayMusic.cs b/Assets/Fungus/Audio/Commands/PlayMusic.cs new file mode 100644 index 00000000..e8e6be14 --- /dev/null +++ b/Assets/Fungus/Audio/Commands/PlayMusic.cs @@ -0,0 +1,40 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Audio", + "Play Music", + "Plays game music. If any game music is already playing, it is stopped. Music continues playing across scene loads.")] + public class PlayMusic : Command + { + public AudioClip musicClip; + + public override void OnEnter() + { + MusicController musicController = MusicController.GetInstance(); + if (musicController != null) + { + musicController.PlayMusic(musicClip); + } + + Continue(); + } + + public override string GetSummary() + { + if (musicClip == null) + { + return "Error: No music clip selected"; + } + + return musicClip.name; + } + + public override Color GetButtonColor() + { + return new Color32(242, 209, 176, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Audio/Commands/PlayMusic.cs.meta b/Assets/Fungus/Audio/Commands/PlayMusic.cs.meta new file mode 100644 index 00000000..d8381fe7 --- /dev/null +++ b/Assets/Fungus/Audio/Commands/PlayMusic.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1902400ccc99b45d69ad01cb86b57d0f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Audio/Commands/PlaySound.cs b/Assets/Fungus/Audio/Commands/PlaySound.cs new file mode 100644 index 00000000..45eb5fe1 --- /dev/null +++ b/Assets/Fungus/Audio/Commands/PlaySound.cs @@ -0,0 +1,43 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Audio", + "Play Sound", + "Plays a sound effect. Multiple sound effects can play at the same time.")] + public class PlaySound : Command + { + public AudioClip soundClip; + + [Range(0,1)] + public float volume = 1; + + public override void OnEnter() + { + MusicController musicController = MusicController.GetInstance(); + if (musicController != null) + { + musicController.PlaySound(soundClip, volume); + } + + Continue(); + } + + public override string GetSummary() + { + if (soundClip == null) + { + return "Error: No music clip selected"; + } + + return soundClip.name; + } + + public override Color GetButtonColor() + { + return new Color32(242, 209, 176, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Audio/Commands/PlaySound.cs.meta b/Assets/Fungus/Audio/Commands/PlaySound.cs.meta new file mode 100644 index 00000000..7070dcd7 --- /dev/null +++ b/Assets/Fungus/Audio/Commands/PlaySound.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bd2f6be51b3d7490ba5633ee095d0391 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Audio/Commands/SetMusicVolume.cs b/Assets/Fungus/Audio/Commands/SetMusicVolume.cs new file mode 100644 index 00000000..a5abf57f --- /dev/null +++ b/Assets/Fungus/Audio/Commands/SetMusicVolume.cs @@ -0,0 +1,39 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Audio", + "Set Music Volume", + "Sets the game music volume level.")] + public class SetMusicVolume : Command + { + [Range(0,1)] + public float volume = 1; + + [Range(0,30)] + public float fadeDuration; + + public override void OnEnter() + { + MusicController musicController = MusicController.GetInstance(); + if (musicController != null) + { + musicController.SetMusicVolume(volume, fadeDuration); + } + + Continue(); + } + + public override string GetSummary() + { + return "Set to " + volume + " over " + fadeDuration + " seconds."; + } + + public override Color GetButtonColor() + { + return new Color32(242, 209, 176, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Audio/Commands/SetMusicVolume.cs.meta b/Assets/Fungus/Audio/Commands/SetMusicVolume.cs.meta new file mode 100644 index 00000000..6b742183 --- /dev/null +++ b/Assets/Fungus/Audio/Commands/SetMusicVolume.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e5f62b7b5779c46aba13ef24141b2729 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Audio/Commands/StopMusic.cs b/Assets/Fungus/Audio/Commands/StopMusic.cs new file mode 100644 index 00000000..2029d256 --- /dev/null +++ b/Assets/Fungus/Audio/Commands/StopMusic.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Audio", + "Stop Music", + "Stops the currently playing game music.")] + public class StopMusic : Command + { + public override void OnEnter() + { + MusicController musicController = MusicController.GetInstance(); + if (musicController != null) + { + musicController.StopMusic(); + } + + Continue(); + } + + public override Color GetButtonColor() + { + return new Color32(242, 209, 176, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Audio/Commands/StopMusic.cs.meta b/Assets/Fungus/Audio/Commands/StopMusic.cs.meta new file mode 100644 index 00000000..93822f1a --- /dev/null +++ b/Assets/Fungus/Audio/Commands/StopMusic.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b359b09a7ba2e4af981f07c07f8af85a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Scripts.meta b/Assets/Fungus/Audio/Scripts.meta similarity index 63% rename from Assets/Fungus/Scripts.meta rename to Assets/Fungus/Audio/Scripts.meta index 6d227248..6faf3c67 100644 --- a/Assets/Fungus/Scripts.meta +++ b/Assets/Fungus/Audio/Scripts.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f9ded1304c85a430bbc6c65f025cf4dc +guid: 3dd9a7f66888345859cf2db40ceee354 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Scripts/MusicManager.cs b/Assets/Fungus/Audio/Scripts/MusicController.cs similarity index 80% rename from Assets/Fungus/Scripts/MusicManager.cs rename to Assets/Fungus/Audio/Scripts/MusicController.cs index d06e895a..c4122953 100644 --- a/Assets/Fungus/Scripts/MusicManager.cs +++ b/Assets/Fungus/Audio/Scripts/MusicController.cs @@ -9,21 +9,21 @@ namespace Fungus * Music playback persists across scene loads. */ [RequireComponent(typeof(AudioSource))] - public class MusicManager : MonoBehaviour + public class MusicController : MonoBehaviour { - static MusicManager instance; + static MusicController instance; /** - * Returns the MusicManager singleton instance. - * Will create a MusicManager game object if none currently exists. + * Returns the MusicController singleton instance. + * Will create a MusicController game object if none currently exists. */ - static public MusicManager GetInstance() + static public MusicController GetInstance() { if (instance == null) { - GameObject go = new GameObject("MusicManager"); + GameObject go = new GameObject("MusicController"); DontDestroyOnLoad(go); - instance = go.AddComponent(); + instance = go.AddComponent(); } return instance; diff --git a/Assets/Fungus/Scripts/MusicManager.cs.meta b/Assets/Fungus/Audio/Scripts/MusicController.cs.meta similarity index 100% rename from Assets/Fungus/Scripts/MusicManager.cs.meta rename to Assets/Fungus/Audio/Scripts/MusicController.cs.meta diff --git a/Assets/Fungus/Camera.meta b/Assets/Fungus/Camera.meta new file mode 100644 index 00000000..2e91ac93 --- /dev/null +++ b/Assets/Fungus/Camera.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6e9a956b0b8294e4f82ab030bb93a8e4 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Camera/Commands.meta b/Assets/Fungus/Camera/Commands.meta new file mode 100644 index 00000000..8c5117e8 --- /dev/null +++ b/Assets/Fungus/Camera/Commands.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 42741b4e7e5d44f8b8268e93d23ee33e +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Camera/Commands/FadeToView.cs b/Assets/Fungus/Camera/Commands/FadeToView.cs new file mode 100644 index 00000000..2db9d27e --- /dev/null +++ b/Assets/Fungus/Camera/Commands/FadeToView.cs @@ -0,0 +1,74 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Camera", + "Fade To View", + "Fades the camera out and in again at a location specified by a View object.")] + public class FadeToView : Command + { + public float duration = 1f; + public Fungus.View targetView; + public bool waitUntilFinished = true; + public Color fadeColor = Color.black; + public Texture2D fadeTexture; + + public override void OnEnter() + { + if (targetView == null) + { + Continue(); + return; + } + + CameraController cameraController = CameraController.GetInstance(); + + if (waitUntilFinished) + { + cameraController.waiting = true; + } + + if (fadeTexture) + { + cameraController.screenFadeTexture = fadeTexture; + } + else + { + cameraController.screenFadeTexture = CameraController.CreateColorTexture(fadeColor, 32, 32); + } + + cameraController.FadeToView(targetView, duration, delegate { + if (waitUntilFinished) + { + cameraController.waiting = false; + Continue(); + } + }); + + if (!waitUntilFinished) + { + Continue(); + } + } + + public override string GetSummary() + { + if (targetView == null) + { + return "Error: No view selected"; + } + else + { + return targetView.name; + } + } + + public override Color GetButtonColor() + { + return new Color32(216, 228, 170, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Camera/Commands/FadeToView.cs.meta b/Assets/Fungus/Camera/Commands/FadeToView.cs.meta new file mode 100644 index 00000000..c4c18446 --- /dev/null +++ b/Assets/Fungus/Camera/Commands/FadeToView.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 437f9a4e3dbc647f9bdce95308418bff +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Camera/Commands/MoveToView.cs b/Assets/Fungus/Camera/Commands/MoveToView.cs new file mode 100644 index 00000000..65e7dfd8 --- /dev/null +++ b/Assets/Fungus/Camera/Commands/MoveToView.cs @@ -0,0 +1,61 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Camera", + "Move To View", + "Moves the camera to a location specified by a View object.")] + public class MoveToView : Command + { + public float duration = 1; + public Fungus.View targetView; + public bool waitUntilFinished = true; + + public override void OnEnter() + { + CameraController cameraController = CameraController.GetInstance(); + + if (waitUntilFinished) + { + cameraController.waiting = true; + } + + Vector3 targetPosition = targetView.transform.position; + Quaternion targetRotation = targetView.transform.rotation; + float targetSize = targetView.viewSize; + + cameraController.PanToPosition(targetPosition, targetRotation, targetSize, duration, delegate { + if (waitUntilFinished) + { + cameraController.waiting = false; + Continue(); + } + }); + + if (!waitUntilFinished) + { + Continue(); + } + } + + public override string GetSummary() + { + if (targetView == null) + { + return "Error: No view selected"; + } + else + { + return targetView.name; + } + } + + public override Color GetButtonColor() + { + return new Color32(216, 228, 170, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Camera/Commands/MoveToView.cs.meta b/Assets/Fungus/Camera/Commands/MoveToView.cs.meta new file mode 100644 index 00000000..22315d01 --- /dev/null +++ b/Assets/Fungus/Camera/Commands/MoveToView.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 45c952ea1ad444e479b570fa242679c5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Camera/Commands/ShakeCamera.cs b/Assets/Fungus/Camera/Commands/ShakeCamera.cs new file mode 100644 index 00000000..c3a89feb --- /dev/null +++ b/Assets/Fungus/Camera/Commands/ShakeCamera.cs @@ -0,0 +1,46 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Camera", + "Shake Camera", + "Applies a camera shake effect to the main camera.")] + public class ShakeCamera : Command + { + public float duration = 0.5f; + public Vector2 amount = new Vector2(1, 1); + public bool waitUntilFinished; + + public override void OnEnter() + { + iTween.ShakePosition(Camera.main.gameObject, new Vector3(amount.x, amount.y, 0), duration); + + if (waitUntilFinished) + { + Invoke("OnWaitComplete", duration); + } + else + { + Continue(); + } + } + + void OnWaitComplete() + { + Continue(); + } + + public override string GetSummary() + { + return "For " + duration + " seconds."; + } + + public override Color GetButtonColor() + { + return new Color32(216, 228, 170, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Camera/Commands/ShakeCamera.cs.meta b/Assets/Fungus/Camera/Commands/ShakeCamera.cs.meta new file mode 100644 index 00000000..e6b9dfa5 --- /dev/null +++ b/Assets/Fungus/Camera/Commands/ShakeCamera.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 616cd37e21c7645c58a89edf5abee56f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Editor.meta b/Assets/Fungus/Camera/Editor.meta similarity index 63% rename from Assets/Fungus/Editor.meta rename to Assets/Fungus/Camera/Editor.meta index 324319b9..d57a3c7e 100644 --- a/Assets/Fungus/Editor.meta +++ b/Assets/Fungus/Camera/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b7cb2aa1c114f44b89b82bc527e85bab +guid: 3d2b8d81dbfb54c02a92a0966802a55a folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Camera/Editor/ViewEditor.cs b/Assets/Fungus/Camera/Editor/ViewEditor.cs new file mode 100644 index 00000000..49b7c15e --- /dev/null +++ b/Assets/Fungus/Camera/Editor/ViewEditor.cs @@ -0,0 +1,222 @@ +using UnityEditor; +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using Fungus; + +[CanEditMultipleObjects] +[CustomEditor (typeof(View))] +public class ViewEditor : Editor +{ + static Color viewColor = Color.yellow; + + SerializedProperty primaryAspectRatioProp; + SerializedProperty secondaryAspectRatioProp; + + // Draw Views when they're not selected + [DrawGizmo(GizmoType.NotSelected | GizmoType.SelectedOrChild)] + static void RenderCustomGizmo(Transform objectTransform, GizmoType gizmoType) + { + View view = objectTransform.gameObject.GetComponent(); + if (view != null) + { + DrawView(view); + } + } + + Vector2 LookupAspectRatio(int index) + { + switch (index) + { + default: + case 1: + return new Vector2(4, 3); + case 2: + return new Vector2(3, 2); + case 3: + return new Vector2(16, 10); + case 4: + return new Vector2(17, 10); + case 5: + return new Vector2(16, 9); + case 6: + return new Vector2(2, 1); + case 7: + return new Vector2(3, 4); + case 8: + return new Vector2(2, 3); + case 9: + return new Vector2(10, 16); + case 10: + return new Vector2(10, 17); + case 11: + return new Vector2(9, 16); + case 12: + return new Vector2(1, 2); + } + } + + void OnEnable() + { + primaryAspectRatioProp = serializedObject.FindProperty ("primaryAspectRatio"); + secondaryAspectRatioProp = serializedObject.FindProperty ("secondaryAspectRatio"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUI.BeginChangeCheck(); + + string[] ratios = { "", "Landscape / 4:3", "Landscape / 3:2", "Landscape / 16:10", "Landscape / 17:10", "Landscape / 16:9", "Landscape / 2:1", "Portrait / 3:4", "Portrait / 2:3", "Portrait / 10:16", "Portrait / 10:17", "Portrait / 9:16", "Portrait / 1:2" }; + + EditorGUILayout.PropertyField(primaryAspectRatioProp, new GUIContent("Primary Aspect Ratio", "Width and height values that define the primary aspect ratio (e.g. 4:3)")); + int primaryIndex = EditorGUILayout.Popup("Select Aspect Ratio", 0, ratios); + if (primaryIndex > 0) + { + primaryAspectRatioProp.vector2Value = LookupAspectRatio(primaryIndex); + } + EditorGUILayout.Separator(); + + EditorGUILayout.PropertyField(secondaryAspectRatioProp, new GUIContent("Secondary Aspect Ratio", "Width and height values that define the primary aspect ratio (e.g. 4:3)")); + int secondaryIndex = EditorGUILayout.Popup("Select Aspect Ratio", 0, ratios); + if (secondaryIndex > 0) + { + secondaryAspectRatioProp.vector2Value = LookupAspectRatio(secondaryIndex); + } + EditorGUILayout.Separator(); + + if (EditorGUI.EndChangeCheck()) + { + // Avoid divide by zero errors + if (primaryAspectRatioProp.vector2Value.y == 0) + { + primaryAspectRatioProp.vector2Value = new Vector2(primaryAspectRatioProp.vector2Value.x, 1f); + } + if (secondaryAspectRatioProp.vector2Value.y == 0) + { + secondaryAspectRatioProp.vector2Value = new Vector2(secondaryAspectRatioProp.vector2Value.x, 1f); + } + + SceneView.RepaintAll(); + } + + serializedObject.ApplyModifiedProperties(); + } + + void OnSceneGUI () + { + View t = target as View; + if (t.enabled) + { + EditViewBounds(); + } + + if (GUI.changed) + { + EditorUtility.SetDirty(target); + } + } + + void EditViewBounds() + { + View view = target as View; + + DrawView(view); + + Vector3 pos = view.transform.position; + + float viewSize = CalculateLocalViewSize(view); + + Vector3[] handles = new Vector3[2]; + handles[0] = view.transform.TransformPoint(new Vector3(0, -viewSize, 0)); + handles[1] = view.transform.TransformPoint(new Vector3(0, viewSize, 0)); + + Handles.color = Color.white; + + for (int i = 0; i < 2; ++i) + { + Vector3 newPos = Handles.FreeMoveHandle(handles[i], + Quaternion.identity, + HandleUtility.GetHandleSize(pos) * 0.1f, + Vector3.zero, + Handles.CubeCap); + if (newPos != handles[i]) + { + Undo.RecordObject(view, "Changed view size"); + view.viewSize = (newPos - pos).magnitude; + break; + } + } + } + + public static void DrawView(View view) + { + float height = CalculateLocalViewSize(view); + float widthA = height * (view.primaryAspectRatio.x / view.primaryAspectRatio.y); + float widthB = height * (view.secondaryAspectRatio.x / view.secondaryAspectRatio.y); + + Color transparent = new Color(1,1,1,0f); + Color fill = viewColor; + Color outline = viewColor; + + if (Selection.activeGameObject == view.gameObject) + { + fill = outline = Color.green; + } + + fill.a = 0.1f; + outline.a = 0.5f; + + // Draw left box + { + Vector3[] verts = new Vector3[4]; + verts[0] = view.transform.TransformPoint(new Vector3(-widthB, -height, 0)); + verts[1] = view.transform.TransformPoint(new Vector3(-widthB, height, 0)); + verts[2] = view.transform.TransformPoint(new Vector3(-widthA, height, 0)); + verts[3] = view.transform.TransformPoint(new Vector3(-widthA, -height, 0)); + + Handles.DrawSolidRectangleWithOutline(verts, fill, transparent); + } + + // Draw right box + { + Vector3[] verts = new Vector3[4]; + verts[0] = view.transform.TransformPoint(new Vector3(widthA, -height, 0)); + verts[1] = view.transform.TransformPoint(new Vector3(widthA, height, 0)); + verts[2] = view.transform.TransformPoint(new Vector3(widthB, height, 0)); + verts[3] = view.transform.TransformPoint(new Vector3(widthB, -height, 0)); + + Handles.DrawSolidRectangleWithOutline(verts, fill, transparent); + } + + // Draw inner box + { + Vector3[] verts = new Vector3[4]; + verts[0] = view.transform.TransformPoint(new Vector3(-widthA, -height, 0)); + verts[1] = view.transform.TransformPoint(new Vector3(-widthA, height, 0)); + verts[2] = view.transform.TransformPoint(new Vector3(widthA, height, 0)); + verts[3] = view.transform.TransformPoint(new Vector3(widthA, -height, 0)); + + Handles.DrawSolidRectangleWithOutline(verts, transparent, outline ); + } + + // Draw outer box + { + Vector3[] verts = new Vector3[4]; + verts[0] = view.transform.TransformPoint(new Vector3(-widthB, -height, 0)); + verts[1] = view.transform.TransformPoint(new Vector3(-widthB, height, 0)); + verts[2] = view.transform.TransformPoint(new Vector3(widthB, height, 0)); + verts[3] = view.transform.TransformPoint(new Vector3(widthB, -height, 0)); + + Handles.DrawSolidRectangleWithOutline(verts, transparent, outline ); + } + } + + // Calculate view size in local coordinates + // Kinda expensive, but accurate and only called in editor. + static float CalculateLocalViewSize(View view) + { + return view.transform.InverseTransformPoint(view.transform.position + new Vector3(0, view.viewSize, 0)).magnitude; + } +} diff --git a/Assets/Fungus/Editor/ViewEditor.cs.meta b/Assets/Fungus/Camera/Editor/ViewEditor.cs.meta similarity index 100% rename from Assets/Fungus/Editor/ViewEditor.cs.meta rename to Assets/Fungus/Camera/Editor/ViewEditor.cs.meta diff --git a/Assets/Fungus/Prefabs.meta b/Assets/Fungus/Camera/Prefabs.meta similarity index 63% rename from Assets/Fungus/Prefabs.meta rename to Assets/Fungus/Camera/Prefabs.meta index 051de10a..603b1f70 100644 --- a/Assets/Fungus/Prefabs.meta +++ b/Assets/Fungus/Camera/Prefabs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: dd60c6b3baeb0475db2ac8ac965401c4 +guid: 10dcdae42763d4e44af47c20af580910 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Prefabs/View.prefab b/Assets/Fungus/Camera/Prefabs/View.prefab similarity index 77% rename from Assets/Fungus/Prefabs/View.prefab rename to Assets/Fungus/Camera/Prefabs/View.prefab index 86d5bff2..34e88893 100644 Binary files a/Assets/Fungus/Prefabs/View.prefab and b/Assets/Fungus/Camera/Prefabs/View.prefab differ diff --git a/Assets/Fungus/Prefabs/View.prefab.meta b/Assets/Fungus/Camera/Prefabs/View.prefab.meta similarity index 100% rename from Assets/Fungus/Prefabs/View.prefab.meta rename to Assets/Fungus/Camera/Prefabs/View.prefab.meta diff --git a/Assets/FungusExample/Scripts.meta b/Assets/Fungus/Camera/Scripts.meta similarity index 63% rename from Assets/FungusExample/Scripts.meta rename to Assets/Fungus/Camera/Scripts.meta index 79acb382..737e540f 100644 --- a/Assets/FungusExample/Scripts.meta +++ b/Assets/Fungus/Camera/Scripts.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 48785157e076a44009fad585c2ab2735 +guid: e3391e010f66a4399adbe2bd0de43a83 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Scripts/CameraController.cs b/Assets/Fungus/Camera/Scripts/CameraController.cs similarity index 91% rename from Assets/Fungus/Scripts/CameraController.cs rename to Assets/Fungus/Camera/Scripts/CameraController.cs index 287909b0..b870305b 100644 --- a/Assets/Fungus/Scripts/CameraController.cs +++ b/Assets/Fungus/Camera/Scripts/CameraController.cs @@ -36,6 +36,9 @@ namespace Fungus [HideInInspector] public bool swipePanActive; + [HideInInspector] + public bool waiting; + float fadeAlpha = 0f; // Swipe panning control @@ -52,6 +55,37 @@ namespace Fungus Dictionary storedViews = new Dictionary(); + static CameraController instance; + + /** + * Returns the CameraController singleton instance. + * Will create a CameraController game object if none currently exists. + */ + static public CameraController GetInstance() + { + if (instance == null) + { + GameObject go = new GameObject("CameraController"); + instance = go.AddComponent(); + } + + return instance; + } + + public static Texture2D CreateColorTexture(Color color, int width, int height) + { + Color[] pixels = new Color[width * height]; + for (int i = 0; i < pixels.Length; i++) + { + pixels[i] = color; + } + Texture2D texture = new Texture2D(width, height, TextureFormat.ARGB32, false); + texture.SetPixels(pixels); + texture.Apply(); + + return texture; + } + void OnGUI() { if (swipePanActive) @@ -75,7 +109,8 @@ namespace Fungus } // Draw full screen fade texture - if (fadeAlpha < 1f) + if (fadeAlpha < 1f && + screenFadeTexture != null) { // 1 = scene fully visible // 0 = scene fully obscured @@ -99,6 +134,7 @@ namespace Fungus public void FadeToView(View view, float fadeDuration, Action fadeAction) { swipePanActive = false; + fadeAlpha = 1f; // Fade out Fade(0f, fadeDuration / 2f, delegate { @@ -166,6 +202,11 @@ namespace Fungus SetCameraZ(); } + public void PanToView(View view, float duration, Action arriveAction) + { + PanToPosition(view.transform.position, view.transform.rotation, view.viewSize, duration, arriveAction); + } + /** * Moves camera from current position to a target position over a period of time. */ @@ -267,7 +308,7 @@ namespace Fungus Camera.main.transform.position = Vector3.Lerp(startPos, endPos, Mathf.SmoothStep(0f, 1f, t)); Camera.main.transform.rotation = Quaternion.Lerp(startRot, endRot, Mathf.SmoothStep(0f, 1f, t)); SetCameraZ(); - + if (arrived && arriveAction != null) { diff --git a/Assets/Fungus/Scripts/CameraController.cs.meta b/Assets/Fungus/Camera/Scripts/CameraController.cs.meta similarity index 50% rename from Assets/Fungus/Scripts/CameraController.cs.meta rename to Assets/Fungus/Camera/Scripts/CameraController.cs.meta index 319781b7..9c68508f 100644 --- a/Assets/Fungus/Scripts/CameraController.cs.meta +++ b/Assets/Fungus/Camera/Scripts/CameraController.cs.meta @@ -3,7 +3,8 @@ guid: efb7bb24722d4469bbd789bd2e01db19 MonoImporter: serializedVersion: 2 defaultReferences: - - fadeTexture: {fileID: 2800000, guid: f6c7b1f3a78a24703b70c746d8b9c768, type: 3} + - screenFadeTexture: {fileID: 2800000, guid: f6c7b1f3a78a24703b70c746d8b9c768, type: 3} + - swipePanIcon: {fileID: 2800000, guid: 41bc737f4dc1b40db872aca00bcd7d4b, type: 3} executionOrder: 0 icon: {instanceID: 0} userData: diff --git a/Assets/Fungus/Scripts/View.cs b/Assets/Fungus/Camera/Scripts/View.cs similarity index 71% rename from Assets/Fungus/Scripts/View.cs rename to Assets/Fungus/Camera/Scripts/View.cs index 35fed94f..cfebce1e 100644 --- a/Assets/Fungus/Scripts/View.cs +++ b/Assets/Fungus/Camera/Scripts/View.cs @@ -22,26 +22,14 @@ namespace Fungus * e.g. a 4:3 aspect ratio = 1.333 */ [Tooltip("Aspect ratio of the primary view rectangle. (e.g. 4:3 aspect ratio = 1.333)")] - public float primaryAspectRatio = (4f / 3f); - - /** - * Color of the primary view rectangle. - */ - [Tooltip("Color of the primary view rectangle.")] - public Color primaryColor = Color.green; + public Vector2 primaryAspectRatio = new Vector2(4, 3); /** * Aspect ratio of the secondary view rectangle. * e.g. a 2:1 aspect ratio = 2/1 = 2.0 */ [Tooltip("Aspect ratio of the secondary view rectangle. (e.g. 2:1 aspect ratio = 2.0)")] - public float secondaryAspectRatio = (2f / 1f); - - /** - * Color of the secondary view rectangle. - */ - [Tooltip("Color of the secondary view rectangle.")] - public Color secondaryColor = Color.grey; + public Vector2 secondaryAspectRatio = new Vector2(2, 1); void Update() { diff --git a/Assets/Fungus/Scripts/View.cs.meta b/Assets/Fungus/Camera/Scripts/View.cs.meta similarity index 100% rename from Assets/Fungus/Scripts/View.cs.meta rename to Assets/Fungus/Camera/Scripts/View.cs.meta diff --git a/Assets/FungusExample/Sprites.meta b/Assets/Fungus/Camera/Sprites.meta similarity index 63% rename from Assets/FungusExample/Sprites.meta rename to Assets/Fungus/Camera/Sprites.meta index a5b58ff6..61d895b7 100644 --- a/Assets/FungusExample/Sprites.meta +++ b/Assets/Fungus/Camera/Sprites.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b0748817ba5034a03bb11cf6052fd465 +guid: 8dea678f784954ce3b1e6b1845374ef0 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Textures/ScreenFade.png b/Assets/Fungus/Camera/Sprites/ScreenFade.png similarity index 100% rename from Assets/Fungus/Textures/ScreenFade.png rename to Assets/Fungus/Camera/Sprites/ScreenFade.png diff --git a/Assets/Fungus/Textures/ScreenFade.png.meta b/Assets/Fungus/Camera/Sprites/ScreenFade.png.meta similarity index 91% rename from Assets/Fungus/Textures/ScreenFade.png.meta rename to Assets/Fungus/Camera/Sprites/ScreenFade.png.meta index d9920191..6284b274 100644 --- a/Assets/Fungus/Textures/ScreenFade.png.meta +++ b/Assets/Fungus/Camera/Sprites/ScreenFade.png.meta @@ -1,6 +1,7 @@ fileFormatVersion: 2 guid: f6c7b1f3a78a24703b70c746d8b9c768 TextureImporter: + fileIDToRecycleName: {} serializedVersion: 2 mipmaps: mipMapMode: 0 @@ -20,7 +21,7 @@ TextureImporter: grayScaleToAlpha: 0 generateCubemap: 0 seamlessCubemap: 0 - textureFormat: -1 + textureFormat: -3 maxTextureSize: 1024 textureSettings: filterMode: -1 @@ -35,6 +36,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} spritePixelsToUnits: 100 alphaIsTransparency: 0 textureType: -1 diff --git a/Assets/Fungus/Textures/SwipePanIcon.png b/Assets/Fungus/Camera/Sprites/SwipePanIcon.png similarity index 100% rename from Assets/Fungus/Textures/SwipePanIcon.png rename to Assets/Fungus/Camera/Sprites/SwipePanIcon.png diff --git a/Assets/Fungus/Textures/SwipePanIcon.png.meta b/Assets/Fungus/Camera/Sprites/SwipePanIcon.png.meta similarity index 100% rename from Assets/Fungus/Textures/SwipePanIcon.png.meta rename to Assets/Fungus/Camera/Sprites/SwipePanIcon.png.meta diff --git a/Assets/Fungus/Dialog.meta b/Assets/Fungus/Dialog.meta new file mode 100644 index 00000000..f43ca986 --- /dev/null +++ b/Assets/Fungus/Dialog.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 382433a04f0cc44d1b777c359b0242a3 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Dialog/Commands.meta b/Assets/Fungus/Dialog/Commands.meta new file mode 100644 index 00000000..9e87cc9a --- /dev/null +++ b/Assets/Fungus/Dialog/Commands.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0bb03bbaacb014e7399075a2d6ecad3f +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Dialog/Commands/AddOption.cs b/Assets/Fungus/Dialog/Commands/AddOption.cs new file mode 100644 index 00000000..306f5c88 --- /dev/null +++ b/Assets/Fungus/Dialog/Commands/AddOption.cs @@ -0,0 +1,65 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Fungus +{ + [CommandInfo("Dialog", + "Add Option", + "Adds an option for the player to select, displayed by the next Say command.")] + public class AddOption : Command + { + public string optionText; + public Sequence targetSequence; + + public bool hideOnSelected; + + public override void OnEnter() + { + if (hideOnSelected && + targetSequence.GetExecutionCount() > 0) + { + Continue(); + return; + } + + Choose.Option option = new Choose.Option(); + option.optionText = optionText; + option.targetSequence = targetSequence; + Choose.options.Add(option); + + Continue(); + } + + public override string GetSummary() + { + string summaryText = optionText; + + if (targetSequence == null) + { + summaryText += " ( )"; + } + else + { + summaryText += " (" + targetSequence.name + ")"; + } + + return summaryText; + } + + public override void GetConnectedSequences(ref List connectedSequences) + { + if (targetSequence != null) + { + connectedSequences.Add(targetSequence); + } + } + + public override Color GetButtonColor() + { + return new Color32(184, 210, 235, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Dialog/Commands/AddOption.cs.meta b/Assets/Fungus/Dialog/Commands/AddOption.cs.meta new file mode 100644 index 00000000..73080a03 --- /dev/null +++ b/Assets/Fungus/Dialog/Commands/AddOption.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a61ea20fbb744ca2a363c33ad65cd89 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Dialog/Commands/Choose.cs b/Assets/Fungus/Dialog/Commands/Choose.cs new file mode 100644 index 00000000..16723fef --- /dev/null +++ b/Assets/Fungus/Dialog/Commands/Choose.cs @@ -0,0 +1,154 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Fungus +{ + [CommandInfo("Dialog", + "Choose", + "Presents a list of options for the player to choose from, with an optional timeout. Add options using preceding AddOption commands.")] + public class Choose : Command + { + public class Option + { + public string optionText; + public Sequence targetSequence; + } + + static public List