Browse Source

Removed legacy assets. Rename Variables to GlobalVariables.

master
chrisgregan 11 years ago
parent
commit
e1cfd21c05
  1. 87
      Assets/Fungus/Editor/PageEditor.cs
  2. 8
      Assets/Fungus/Editor/PageEditor.cs.meta
  3. BIN
      Assets/Fungus/Legacy/ContinueIcon.png
  4. 45
      Assets/Fungus/Legacy/ContinueIcon.png.meta
  5. BIN
      Assets/Fungus/Legacy/OptionButton1.psd
  6. 45
      Assets/Fungus/Legacy/OptionButton1.psd.meta
  7. BIN
      Assets/Fungus/Legacy/OptionButton2.psd
  8. 45
      Assets/Fungus/Legacy/OptionButton2.psd.meta
  9. 45
      Assets/Fungus/Legacy/Page.cs
  10. BIN
      Assets/Fungus/Legacy/Page.prefab
  11. 4
      Assets/Fungus/Legacy/Page.prefab.meta
  12. 171
      Assets/Fungus/Legacy/PageCommands.cs
  13. 8
      Assets/Fungus/Legacy/PageCommands.cs.meta
  14. 695
      Assets/Fungus/Legacy/PageController.cs
  15. 8
      Assets/Fungus/Legacy/PageController.cs.meta
  16. 108
      Assets/Fungus/Legacy/PageStyle.cs
  17. 8
      Assets/Fungus/Legacy/PageStyle.cs.meta
  18. BIN
      Assets/Fungus/Legacy/PageStyle1.prefab
  19. 4
      Assets/Fungus/Legacy/PageStyle1.prefab.meta
  20. BIN
      Assets/Fungus/Legacy/PageStyle2.prefab
  21. 4
      Assets/Fungus/Legacy/PageStyle2.prefab.meta
  22. 3
      Assets/Fungus/Legacy/Readme.txt
  23. 4
      Assets/Fungus/Legacy/Readme.txt.meta
  24. BIN
      Assets/Fungus/Legacy/StoryBox1.psd
  25. 45
      Assets/Fungus/Legacy/StoryBox1.psd.meta
  26. BIN
      Assets/Fungus/Legacy/StoryBox2.psd
  27. 45
      Assets/Fungus/Legacy/StoryBox2.psd.meta
  28. 4
      Assets/Fungus/Scripts/Button.cs
  29. 7
      Assets/Fungus/Scripts/Commands/DialogCommands.cs
  30. 16
      Assets/Fungus/Scripts/Game.cs
  31. 317
      Assets/Fungus/Scripts/GameController.cs
  32. 9
      Assets/Fungus/Scripts/Room.cs
  33. 3
      Assets/Fungus/Scripts/StringsParser.cs
  34. 8
      Assets/Fungus/Scripts/Variables.cs.meta
  35. 6
      Assets/Fungus/VisualScripting/BooleanVariable.cs
  36. 6
      Assets/Fungus/VisualScripting/FloatVariable.cs
  37. 6
      Assets/Fungus/VisualScripting/IntegerVariable.cs
  38. 6
      Assets/Fungus/VisualScripting/StringVariable.cs
  39. 2
      Assets/Fungus2.meta
  40. 2
      Assets/Fungus2/Camera.meta
  41. 2
      Assets/Fungus2/FungusCommands.meta
  42. 2
      Assets/Fungus2/FungusScript.meta
  43. 4
      Assets/Fungus2/FungusScript/GlobalVariables.cs
  44. 2
      Assets/Fungus2/FungusScript/GlobalVariables.cs.meta
  45. 5
      Assets/Fungus2/Sprite.meta
  46. BIN
      Assets/FungusExample/Animations/BlueAlienAnim.controller
  47. 4
      Assets/FungusExample/Animations/BlueAlienAnim.controller.meta
  48. BIN
      Assets/FungusExample/Animations/BlueAlienWalk.anim
  49. 4
      Assets/FungusExample/Animations/BlueAlienWalk.anim.meta
  50. BIN
      Assets/FungusExample/Animations/GreenAlienWalk.anim
  51. 4
      Assets/FungusExample/Animations/GreenAlienWalk.anim.meta
  52. BIN
      Assets/FungusExample/Audio/effect.wav
  53. 12
      Assets/FungusExample/Audio/effect.wav.meta
  54. BIN
      Assets/FungusExample/Audio/music.mp3
  55. 12
      Assets/FungusExample/Audio/music.mp3.meta
  56. 5
      Assets/FungusExample/Scenes.meta
  57. BIN
      Assets/FungusExample/Scenes/Example.unity
  58. 4
      Assets/FungusExample/Scenes/Example.unity.meta
  59. 5
      Assets/FungusExample/Scripts.meta
  60. 67
      Assets/FungusExample/Scripts/AudioRoom.cs
  61. 8
      Assets/FungusExample/Scripts/AudioRoom.cs.meta
  62. 66
      Assets/FungusExample/Scripts/ButtonRoom.cs
  63. 8
      Assets/FungusExample/Scripts/ButtonRoom.cs.meta
  64. 76
      Assets/FungusExample/Scripts/DialogRoom.cs
  65. 8
      Assets/FungusExample/Scripts/DialogRoom.cs.meta
  66. 59
      Assets/FungusExample/Scripts/MenuRoom.cs
  67. 8
      Assets/FungusExample/Scripts/MenuRoom.cs.meta
  68. 40
      Assets/FungusExample/Scripts/ParallaxRoom.cs
  69. 8
      Assets/FungusExample/Scripts/ParallaxRoom.cs.meta
  70. 76
      Assets/FungusExample/Scripts/SpriteRoom.cs
  71. 8
      Assets/FungusExample/Scripts/SpriteRoom.cs.meta
  72. 47
      Assets/FungusExample/Scripts/ViewRoom.cs
  73. 8
      Assets/FungusExample/Scripts/ViewRoom.cs.meta
  74. 5
      Assets/FungusExample/Sprites.meta
  75. 5
      Assets/FungusExample/Sprites/GreenCons.meta
  76. 15
      Assets/FungusExample/Sprites/GreenCons/MouseRunnerDotComGraphicsLicense.txt
  77. 4
      Assets/FungusExample/Sprites/GreenCons/MouseRunnerDotComGraphicsLicense.txt.meta
  78. 5
      Assets/FungusExample/Sprites/GreenCons/PNGs.meta
  79. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/At.png
  80. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/At.png.meta
  81. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Blank.png
  82. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Blank.png.meta
  83. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Cancel.png
  84. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Cancel.png.meta
  85. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Cash.png
  86. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Cash.png.meta
  87. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Chat.png
  88. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Chat.png.meta
  89. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/CheckMark.png
  90. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/CheckMark.png.meta
  91. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Copy.png
  92. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Copy.png.meta
  93. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Cut.png
  94. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Cut.png.meta
  95. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Doc.png
  96. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Doc.png.meta
  97. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Down.png
  98. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Down.png.meta
  99. BIN
      Assets/FungusExample/Sprites/GreenCons/PNGs/Download.png
  100. 48
      Assets/FungusExample/Sprites/GreenCons/PNGs/Download.png.meta
  101. Some files were not shown because too many files have changed in this diff Show More

87
Assets/Fungus/Editor/PageEditor.cs

@ -1,87 +0,0 @@
using UnityEditor;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
[CanEditMultipleObjects]
[CustomEditor (typeof(Page))]
public class PageEditor : Editor
{
void OnSceneGUI ()
{
Page t = target as Page;
if (t.enabled)
{
EditPageBounds();
}
if (GUI.changed)
{
EditorUtility.SetDirty(target);
}
}
void EditPageBounds()
{
Page t = target as Page;
Vector3 pos = t.transform.position;
Vector3[] verts = new Vector3[4];
verts[0] = new Vector3(pos.x + t.pageBounds.min.x, pos.y + t.pageBounds.min.y, 0);
verts[1] = new Vector3(pos.x + t.pageBounds.min.x, pos.y + t.pageBounds.max.y, 0);
verts[2] = new Vector3(pos.x + t.pageBounds.max.x, pos.y + t.pageBounds.max.y, 0);
verts[3] = new Vector3(pos.x + t.pageBounds.max.x, pos.y + t.pageBounds.min.y, 0);
Handles.DrawSolidRectangleWithOutline(verts, new Color(1,1,1,0.2f), new Color(0,0,0,1));
for(int i = 0; i < 4; ++i)
{
Vector3 vert = verts[i];
Vector3 newPos = Handles.FreeMoveHandle(vert,
Quaternion.identity,
HandleUtility.GetHandleSize(pos) * 0.1f,
Vector3.zero,
Handles.CubeCap);
newPos.z = 0;
verts[i] = newPos;
if (vert != newPos)
{
switch(i)
{
case 0:
verts[1].x = newPos.x;
verts[3].y = newPos.y;
break;
case 1:
verts[0].x = newPos.x;
verts[2].y = newPos.y;
break;
case 2:
verts[3].x = newPos.x;
verts[1].y = newPos.y;
break;
case 3:
verts[2].x = newPos.x;
verts[0].y = newPos.y;
break;
}
break;
}
}
Bounds newBounds = new Bounds(verts[0], Vector3.zero);
newBounds.Encapsulate(verts[1]);
newBounds.Encapsulate(verts[2]);
newBounds.Encapsulate(verts[3]);
t.transform.position = newBounds.center;
newBounds.center = Vector3.zero;
t.pageBounds = newBounds;
}
}
}

8
Assets/Fungus/Editor/PageEditor.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: dce33924cf6804b2c94d17784a6037d1
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

BIN
Assets/Fungus/Legacy/ContinueIcon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

45
Assets/Fungus/Legacy/ContinueIcon.png.meta

@ -1,45 +0,0 @@
fileFormatVersion: 2
guid: dfdb2b7864e2d46418b308cd6c0261fc
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
Assets/Fungus/Legacy/OptionButton1.psd

Binary file not shown.

45
Assets/Fungus/Legacy/OptionButton1.psd.meta

@ -1,45 +0,0 @@
fileFormatVersion: 2
guid: 5a1a737f1dc4e49339d16a91a1805588
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
Assets/Fungus/Legacy/OptionButton2.psd

Binary file not shown.

45
Assets/Fungus/Legacy/OptionButton2.psd.meta

@ -1,45 +0,0 @@
fileFormatVersion: 2
guid: 97326ada6fc364221affae285d51995b
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

45
Assets/Fungus/Legacy/Page.cs

@ -1,45 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus
{
/**
* Defines a user editable screen aligned rect for setting Page bounds.
*/
public class Page : MonoBehaviour
{
/// Rectangular bounds used to display page text.
public Bounds pageBounds = new Bounds(Vector3.zero, new Vector3(0.25f, 0.25f, 0f));
/// Layout style to use for Page
public PageController.Layout layout = PageController.Layout.FullSize;
/**
* Modifies the PageController to use a rect defined by the bounds and the current camera transform
*/
public void UpdatePageRect()
{
// Y increases down the screen in GUI space, so top left is rect origin
Vector3 topLeft = transform.position + pageBounds.center;
topLeft.x -= pageBounds.extents.x;
topLeft.y += pageBounds.extents.y;
Vector3 bottomRight = transform.position + pageBounds.center;
bottomRight.x += pageBounds.extents.x;
bottomRight.y -= pageBounds.extents.y;
Vector2 tl = Camera.main.WorldToScreenPoint(topLeft);
Vector2 br = Camera.main.WorldToScreenPoint(bottomRight);
PageController.ScreenRect screenRect = new PageController.ScreenRect();
screenRect.x1 = (tl.x / Screen.width);
screenRect.y1 = 1f - (tl.y / Screen.height);
screenRect.x2 = (br.x / Screen.width);
screenRect.y2 = 1f - (br.y / Screen.height);
PageController page = Game.GetInstance().pageController;
page.pageRect = PageController.CalcPageRect(screenRect);
page.layout = layout;
}
}
}

BIN
Assets/Fungus/Legacy/Page.prefab

Binary file not shown.

4
Assets/Fungus/Legacy/Page.prefab.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: ec557b5a76ab94961964394b8511fc9b
NativeFormatImporter:
userData:

171
Assets/Fungus/Legacy/PageCommands.cs

@ -1,171 +0,0 @@
using UnityEngine;
using System;
using System.Collections;
namespace Fungus
{
/**
* Command classes have their own namespace to prevent them popping up in code completion.
*/
namespace Command
{
/**
* Sets the display rect for the PageController using a Page object.
*/
public class SetPage : CommandQueue.Command
{
Page page;
PageController.Layout pageLayout;
public SetPage(Page _page, PageController.Layout _pageLayout)
{
page = _page;
pageLayout = _pageLayout;
}
public override void Execute(CommandQueue commandQueue, Action onComplete)
{
if (page != null)
{
page.UpdatePageRect();
Game.GetInstance().pageController.layout = pageLayout;
}
if (onComplete != null)
{
onComplete();
}
}
}
/**
* Sets the screen rect for displaying story text using normalized screen space coords.
*/
public class SetPageRect : CommandQueue.Command
{
PageController.ScreenRect screenRect;
PageController.Layout layout;
public SetPageRect(PageController.ScreenRect _screenRect, PageController.Layout _layout)
{
screenRect = _screenRect;
layout = _layout;
}
public override void Execute(CommandQueue commandQueue, Action onComplete)
{
PageController page = Game.GetInstance().pageController;
page.pageRect = PageController.CalcPageRect(screenRect);
page.layout = layout;
if (onComplete != null)
{
onComplete();
}
}
}
/**
* Sets the active Page Style for rendering story text.
*/
public class SetPageStyle : CommandQueue.Command
{
PageStyle pageStyle;
public SetPageStyle(PageStyle _pageStyle)
{
pageStyle = _pageStyle;
}
public override void Execute(CommandQueue commandQueue, Action onComplete)
{
Game.GetInstance().pageController.activePageStyle = pageStyle;
if (onComplete != null)
{
onComplete();
}
}
}
/**
* Sets the header text displayed at the top of the page.
*/
public class SetHeader : CommandQueue.Command
{
string titleText;
public SetHeader(string _titleText)
{
titleText = _titleText;
}
public override void Execute(CommandQueue commandQueue, Action onComplete)
{
PageController page = Game.GetInstance().pageController;
page.SetHeader(titleText);
if (onComplete != null)
{
onComplete();
}
}
}
/**
* Sets the footer text displayed at the bottom of the page.
*/
public class SetFooter : CommandQueue.Command
{
string titleText;
public SetFooter(string _titleText)
{
titleText = _titleText;
}
public override void Execute(CommandQueue commandQueue, Action onComplete)
{
PageController page = Game.GetInstance().pageController;
page.SetFooter(titleText);
if (onComplete != null)
{
onComplete();
}
}
}
/**
* Displays all previously added options.
*/
public class Choose : CommandQueue.Command
{
string chooseText;
public Choose(string _chooseText)
{
chooseText = _chooseText;
}
public override void Execute(CommandQueue commandQueue, Action onComplete)
{
string subbedText = Variables.SubstituteStrings(chooseText);
IDialog dialog = Game.GetInstance().GetDialog();
PageController pageController = dialog as PageController;
if (pageController != null)
{
// Legacy support for old Pages system
pageController.Choose(subbedText);
}
else
{
// Support for modern IDialog interface
dialog.Say(subbedText, null);
}
// Choose always clears the commandQueue, so there's no need to call onComplete()
}
}
}
}

8
Assets/Fungus/Legacy/PageCommands.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ae90082ad9904474ebe8554e864a0539
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

695
Assets/Fungus/Legacy/PageController.cs

@ -1,695 +0,0 @@
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Fungus
{
/**
* Manages and draws a text box for rendering story text and multiple choice menus.
*/
[ExecuteInEditMode]
public class PageController : MonoBehaviour, IDialog
{
/// Options for default Page position on screen
public enum PagePosition
{
/// Page appears full-size and horizontally centered at top of screen.
Top,
/// Page appears centered in middle of screen, with height fitted to content.
Middle,
/// Page appears full-size and horizontally centered at bottom of screen.
Bottom
}
/**
* Defines a rect in normalized screen space coordinates.
* e.g. x1 = 0 means left of screen, x2 = 1 means right of screen.
*/
public class ScreenRect
{
public float x1;
public float y1;
public float x2;
public float y2;
}
/// Options for controlling page layout
public enum Layout
{
/// Use the full rect to display the page.
FullSize,
/// Resize to fit displayed text and snap to top of rect.
FitToTop,
/// Resize to fit displayed text and snap to middle of rect.
FitToMiddle,
/// Resize to fit displayed text and snap to bottom of rect.
FitToBottom
}
/// Controls layout of content within Page rect.
public Layout layout = Layout.FullSize;
/// Supported states for Page
public enum Mode
{
/// No content to be displayed.
Idle,
/// Show a single line of text and wait for player input.
Say,
/// Show a multiple choice menu and wait for player to select an option.
Choose
};
/**
* The style to apply when displaying Pages.
*/
public PageStyle activePageStyle;
/// Current Page story telling state
[HideInInspector]
public Mode mode = Mode.Idle;
/// Screen space rect for Page in pixels.
[HideInInspector]
public Rect pageRect;
/**
* Writing speed for page text.
*/
public int charactersPerSecond = 60;
/**
* Icon to display when waiting for player input to continue
*/
public Texture2D continueIcon;
/**
* Position of continue and swipe icons in normalized screen space coords.
* (0,0) = top left, (1,1) = bottom right
*/
public Vector2 iconPosition = new Vector2(1,1);
/**
* Default screen position for Page when player enters a Room.
*/
public PageController.PagePosition defaultPagePosition;
/**
* Default width and height of Page as a fraction of screen height [0..1]
*/
public Vector2 defaultPageScale = new Vector2(0.75f, 0.25f);
/**
* Automatically center the Page when player is choosing from multiple options.
*/
public bool centerChooseMenu = true;
/**
* Width of Page as a fraction of screen width [0..1] when automatically centering a Choose menu.
* This setting only has an effect when centerChooseMenu is enabled.
*/
public float chooseMenuWidth = 0.5f;
/**
* Sound effect to play when buttons are clicked.
*/
public AudioClip clickSound;
string headerText = "";
string footerText = "";
string displayedStoryText = "";
string originalStoryText = "";
Action deferredAction;
Action continueAction;
class Option
{
public string optionText;
public Action optionAction;
public Option(string _optionText, Action _optionAction)
{
optionText = _optionText;
optionAction = _optionAction;
}
}
List<Option> options = new List<Option>();
float quickContinueTimer;
/**
* Translates the PageController specific Mode to the more generic DialogMode.
*/
public DialogMode GetDialogMode()
{
switch(mode)
{
case Mode.Say:
case Mode.Choose:
if (FinishedWriting())
{
return DialogMode.Waiting;
}
else
{
return DialogMode.Writing;
}
case Mode.Idle:
default:
return DialogMode.Idle;
}
}
/**
* Calculate a screen space rectangle given normalized screen space coords.
* The resulting rect is clamped to always be on-screen.
*/
public static Rect CalcPageRect(ScreenRect screenRect)
{
Rect rect = new Rect();
rect.xMin = Screen.width * screenRect.x1;
rect.yMin = Screen.height * screenRect.y1;
rect.xMax = Screen.width * screenRect.x2;
rect.yMax = Screen.height * screenRect.y2;
// Clamp to be on-screen
rect.xMax = Mathf.Min(rect.xMax, Screen.width);
rect.xMin = Mathf.Max(rect.xMin, 0);
rect.yMax = Mathf.Min(rect.yMax, Screen.height);
rect.yMin = Mathf.Max(rect.yMin, 0);
return rect;
}
/**
* Calculates a screen rect in normalized screen space coordinates in one of the 'standard' Page positions (top, middle, bottom).
*/
public static ScreenRect CalcScreenRect(Vector2 pageScale, PagePosition pagePosition)
{
float width = Mathf.Clamp01(pageScale.x);
float height = Mathf.Clamp01(pageScale.y);
ScreenRect screenRect = new ScreenRect();
switch (pagePosition)
{
case PagePosition.Top:
screenRect.x1 = 0.5f - width * 0.5f;
screenRect.x2 = 0.5f + width * 0.5f;
screenRect.y1 = 0f;
screenRect.y2 = height;
break;
case PagePosition.Middle:
screenRect.x1 = 0.5f - width * 0.5f;
screenRect.x2 = 0.5f + width * 0.5f;
screenRect.y1 = 0.5f - height * 0.5f;
screenRect.y2 = 0.5f + height * 0.5f;
break;
case PagePosition.Bottom:
screenRect.x1 = 0.5f - width * 0.5f;
screenRect.x2 = 0.5f + width * 0.5f;
screenRect.y1 = 1f - Mathf.Clamp01(height);
screenRect.y2 = 1;
break;
}
return screenRect;
}
/**
* Reset to the default page layout based on properties in Game class.
*/
public void SetDefaultPageLayout()
{
ScreenRect screenRect = CalcScreenRect(defaultPageScale, defaultPagePosition);
pageRect = CalcPageRect(screenRect);
switch (defaultPagePosition)
{
case PageController.PagePosition.Top:
layout = PageController.Layout.FullSize;
break;
case PageController.PagePosition.Middle:
layout = PageController.Layout.FitToMiddle;
break;
case PageController.PagePosition.Bottom:
layout = PageController.Layout.FullSize;
break;
}
}
void Update()
{
if (quickContinueTimer > 0)
{
quickContinueTimer -= Time.deltaTime;
quickContinueTimer = Mathf.Max(quickContinueTimer, 0f);
}
}
public void SetHeader(string _headerText)
{
headerText = _headerText;
}
public void SetFooter(string _footerText)
{
footerText = _footerText;
}
public void Say(string sayText, Action sayAction = null)
{
// IDialog does not support the legacy Choose() command
// Instead, the assumption is that if you call Say() after some options have been added then show the choice menu.
if (options.Count > 0)
{
Choose(sayText);
return;
}
mode = Mode.Say;
continueAction = sayAction;
WriteStory(sayText);
}
public void ClearOptions()
{
options.Clear();
}
public void AddOption(string optionText, Action optionAction)
{
options.Add(new Option(optionText, optionAction));
}
public void Choose(string _chooseText)
{
mode = Mode.Choose;
WriteStory(_chooseText);
}
public void SetTimeout(float _timeoutDuration, Action _timeoutAction)
{
Debug.Log("SetTimeout() is not supported by PageController.");
}
void WriteStory(string storyText)
{
if (activePageStyle == null)
{
return;
}
// Disable quick continue for a short period to prevent accidental taps
quickContinueTimer = 0.8f;
originalStoryText = storyText;
// Hack to avoid displaying partial color tag text
if (storyText.Contains("<"))
{
displayedStoryText = storyText;
}
else
{
// Use a coroutine to write the story text out over time
StartCoroutine(WriteStoryInternal());
}
}
// Coroutine to write story text out over a period of time
IEnumerator WriteStoryInternal()
{
// Zero CPS means write instantly
if (charactersPerSecond == 0)
{
displayedStoryText = originalStoryText;
yield break;
}
displayedStoryText = "";
// Make one character visible at a time
float writeDelay = (1f / (float)charactersPerSecond);
float timeAccumulator = 0f;
int i = 0;
while (true)
{
timeAccumulator += Time.deltaTime;
while (timeAccumulator > writeDelay)
{
i++;
timeAccumulator -= writeDelay;
}
if (i >= originalStoryText.Length)
{
displayedStoryText = originalStoryText;
break;
}
else
{
string left = originalStoryText.Substring(0, i + 1);
string right = originalStoryText.Substring(i + 1);
displayedStoryText = left;
displayedStoryText += "<color=#FFFFFF00>";
displayedStoryText += right;
displayedStoryText += "</color>";
}
yield return null;
}
}
public bool FinishedWriting()
{
return (displayedStoryText.Length == originalStoryText.Length);
}
public virtual void OnGUI()
{
if (mode == Mode.Idle)
{
return;
}
if (activePageStyle == null)
{
return;
}
if (mode == PageController.Mode.Say &&
FinishedWriting())
{
// Draw the continue icon
if (continueIcon)
{
float x = Screen.width * iconPosition.x;
float y = Screen.height * iconPosition.y;
float width = continueIcon.width;
float height = continueIcon.height;
x = Mathf.Max(x, 0);
y = Mathf.Max(y, 0);
x = Mathf.Min(x, Screen.width - width);
y = Mathf.Min(y, Screen.height - height);
Rect rect = new Rect(x, y, width, height);
GUI.DrawTexture(rect, continueIcon);
}
}
GUIStyle boxStyle = activePageStyle.boxStyle;
GUIStyle headerStyle = activePageStyle.GetScaledHeaderStyle();
GUIStyle footerStyle = activePageStyle.GetScaledFooterStyle();
GUIStyle sayStyle = activePageStyle.GetScaledSayStyle();
GUIStyle optionStyle = activePageStyle.GetScaledOptionStyle();
GUIStyle optionAlternateStyle = activePageStyle.GetScaledOptionAlternateStyle();
Rect outerRect;
Layout tempLayout;
if (mode == Mode.Choose &&
centerChooseMenu)
{
// Position the Choose menu in middle of screen
// The width is controlled by game.chooseMenuWidth
// The height is automatically fitted to the text content
Vector2 pageScale = new Vector2(chooseMenuWidth, 0.5f);
PageController.ScreenRect screenRect = PageController.CalcScreenRect(pageScale, PageController.PagePosition.Middle);
outerRect = PageController.CalcPageRect(screenRect);
tempLayout = PageController.Layout.FitToMiddle;
}
else
{
outerRect = pageRect;
tempLayout = layout;
}
Rect originalRect = outerRect;
Rect innerRect = CalcInnerRect(outerRect);
// Calculate height of each section
float headerHeight = CalcHeaderHeight(innerRect.width);
float footerHeight = CalcFooterHeight(innerRect.width);
float storyHeight = CalcStoryHeight(innerRect.width);
float optionsHeight = CalcOptionsHeight(innerRect.width);
float contentHeight = headerHeight + footerHeight + storyHeight + optionsHeight;
// Adjust outer rect position based on alignment settings
switch (tempLayout)
{
case Layout.FullSize:
outerRect.height = Mathf.Max(outerRect.height, contentHeight + (boxStyle.padding.top + boxStyle.padding.bottom));
outerRect.y = Mathf.Min(outerRect.y, Screen.height - outerRect.height);
break;
case Layout.FitToTop:
outerRect.height = contentHeight + (boxStyle.padding.top + boxStyle.padding.bottom);
outerRect.y = originalRect.yMin;
break;
case Layout.FitToMiddle:
outerRect.height = contentHeight + (boxStyle.padding.top + boxStyle.padding.bottom);
outerRect.y = originalRect.center.y - outerRect.height / 2;
break;
case Layout.FitToBottom:
outerRect.height = contentHeight + (boxStyle.padding.top + boxStyle.padding.bottom);
outerRect.y = originalRect.yMax - outerRect.height;
break;
}
innerRect = CalcInnerRect(outerRect);
// Draw box
Rect boxRect = outerRect;
boxRect.height = contentHeight + (boxStyle.padding.top + boxStyle.padding.bottom);
if (tempLayout == Layout.FullSize)
{
boxRect.height = Mathf.Max(boxRect.height, originalRect.height);
}
GUI.Box(boxRect, "", boxStyle);
// Draw header label
Rect headerRect = innerRect;
headerRect.height = headerHeight;
if (headerHeight > 0)
{
GUI.Label(headerRect, headerText, headerStyle);
}
// Draw say label
Rect storyRect = innerRect;
storyRect.y += headerHeight;
storyRect.height = storyHeight;
GUI.Label(storyRect, displayedStoryText, sayStyle);
// Draw footer label
Rect footerRect = innerRect;
footerRect.y += storyHeight;
footerRect.height = footerHeight;
if (footerHeight > 0)
{
GUI.Label(footerRect, footerText, footerStyle);
}
if (!FinishedWriting())
{
return;
}
// Input handling
if (mode == Mode.Say)
{
// Player can continue by clicking anywhere
if (quickContinueTimer == 0 &&
(Input.GetMouseButtonUp(0) || Input.anyKeyDown) &&
continueAction != null)
{
deferredAction = continueAction;
}
}
else if (mode == Mode.Choose)
{
// Draw option buttons
Rect buttonRect = innerRect;
buttonRect.y += headerHeight + storyHeight;
bool alternateRow = false;
foreach (Option option in options)
{
GUIContent buttonContent = new GUIContent(option.optionText);
buttonRect.height = optionStyle.CalcHeight(buttonContent, innerRect.width);
// Select style for odd/even colored rows
GUIStyle style;
if (alternateRow)
{
style = optionAlternateStyle;
}
else
{
style = optionStyle;
}
alternateRow = !alternateRow;
if (GUI.Button(buttonRect, buttonContent, style))
{
if (option.optionAction != null)
{
// We can't execute the option action yet because OnGUI
// may be called multiple times during a frame, and it's
// not permitted to modify GUI elements within a frame.
// We defer executing the action until OnGUI has completed.
deferredAction = option.optionAction;
break;
}
}
buttonRect.y += buttonRect.height;
}
}
if (Event.current.type == EventType.Repaint)
{
if (deferredAction != null)
{
PlayButtonClick();
Action tempAction = deferredAction;
displayedStoryText = "";
originalStoryText = "";
deferredAction = null;
if (mode == Mode.Choose)
{
ClearOptions();
// Reset to idle, but calling action may set this again
mode = Mode.Idle;
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.CallCommandMethod(tempAction);
}
else if (mode == Mode.Say )
{
// Reset to idle, but calling action may set this again
mode = Mode.Idle;
// Execute next command
tempAction();
}
}
}
}
float CalcHeaderHeight(float boxWidth)
{
if (activePageStyle == null ||
mode == Mode.Idle ||
headerText.Length == 0)
{
return 0;
}
GUIStyle headerStyle = activePageStyle.GetScaledHeaderStyle();
GUIContent headerContent = new GUIContent(headerText);
return headerStyle.CalcHeight(headerContent, boxWidth);
}
float CalcFooterHeight(float boxWidth)
{
if (activePageStyle == null ||
mode == Mode.Idle ||
footerText.Length == 0)
{
return 0;
}
GUIStyle footerStyle = activePageStyle.GetScaledFooterStyle();
GUIContent headerContent = new GUIContent(headerText);
return footerStyle.CalcHeight(headerContent, boxWidth);
}
float CalcStoryHeight(float boxWidth)
{
GUIStyle sayStyle = activePageStyle.GetScaledSayStyle();
if (activePageStyle == null ||
mode == Mode.Idle ||
originalStoryText.Length == 0)
{
// Allow a space for story even if there's no text
return sayStyle.lineHeight;
}
GUIContent storyContent = new GUIContent(originalStoryText + "\n");
return sayStyle.CalcHeight(storyContent, boxWidth);
}
float CalcOptionsHeight(float boxWidth)
{
if (activePageStyle == null ||
mode == Mode.Idle ||
options.Count == 0)
{
return 0;
}
// This assumes that the alternate option style is the same height as the regular style
GUIStyle optionStyle = activePageStyle.GetScaledOptionStyle();
float totalHeight = 0;
foreach (Option option in options)
{
GUIContent optionContent = new GUIContent(option.optionText);
float optionHeight = optionStyle.CalcHeight(optionContent, boxWidth);
totalHeight += optionHeight;
}
// Add space at bottom
GUIStyle sayStyle = activePageStyle.GetScaledSayStyle();
totalHeight += sayStyle.lineHeight;
return totalHeight;
}
// Returns smaller internal box rect with padding style applied
Rect CalcInnerRect(Rect outerRect)
{
if (activePageStyle == null)
{
return new Rect();
}
GUIStyle boxStyle = activePageStyle.boxStyle;
Rect innerRect = new Rect(outerRect.x + boxStyle.padding.left,
outerRect.y + boxStyle.padding.top,
outerRect.width - (boxStyle.padding.left + boxStyle.padding.right),
outerRect.height - (boxStyle.padding.top + boxStyle.padding.bottom));
return innerRect;
}
/**
* Plays the button clicked sound effect
*/
public void PlayButtonClick()
{
if (clickSound != null)
{
audio.PlayOneShot(clickSound);
}
}
}
}

8
Assets/Fungus/Legacy/PageController.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2154cd49b43b3450fb92da231e24e065
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

108
Assets/Fungus/Legacy/PageStyle.cs

@ -1,108 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus
{
/**
* Defines visual appearance of a Page.
* The Game.activePageStyle property controls the visual appearance of the displayed Page
*/
public class PageStyle : MonoBehaviour
{
// The font size for title, say and option text is calculated by multiplying the screen height
// by the corresponding font scale. Text appears the same size across all device resolutions.
/// Header font size as a fraction of screen height.
public float headerFontScale = 1f / 20f;
/// Say font size as a fraction of screen height.
public float sayFontScale = 1f / 25f;
/// Header font size as a fraction of screen height.
public float footerFontScale = 1f / 20f;
/// Option font size as a fraction of screen height.
public float optionFontScale = 1f / 25f;
/// Style for header text
public GUIStyle headerStyle;
/// Style for header text
public GUIStyle footerStyle;
/// Style for say text
public GUIStyle sayStyle;
/// Style for option text
public GUIStyle optionStyle;
/// Style for option text (alternate rows)
public GUIStyle optionAlternateStyle;
/// Style for text box
public GUIStyle boxStyle;
/**
* Returns the style for Header text.
* Overrides the font size to compensate for varying device resolution.
* Font size is calculated as a fraction of the current screen height.
*/
public GUIStyle GetScaledHeaderStyle()
{
GUIStyle style = new GUIStyle(headerStyle);
style.fontSize = Mathf.RoundToInt((float)Screen.height * headerFontScale);
return style;
}
/**
* Returns the style for SetFooter text.
* Overrides the font size to compensate for varying device resolution.
* Font size is calculated as a fraction of the current screen height.
*/
public GUIStyle GetScaledFooterStyle()
{
GUIStyle style = new GUIStyle(footerStyle);
style.fontSize = Mathf.RoundToInt((float)Screen.height * footerFontScale);
return style;
}
/**
* Returns the style for Say text.
* Overrides the font size to compensate for varying device resolution.
* Font size is calculated as a fraction of the current screen height.
*/
public GUIStyle GetScaledSayStyle()
{
GUIStyle style = new GUIStyle(sayStyle);
style.fontSize = Mathf.RoundToInt((float)Screen.height * sayFontScale);
return style;
}
/**
* Returns the style for Option buttons.
* Overrides the font size to compensate for varying device resolution.
* Font size is calculated as a fraction of the current screen height.
*/
public GUIStyle GetScaledOptionStyle()
{
GUIStyle style;
style = new GUIStyle(optionStyle);
style.fontSize = Mathf.RoundToInt((float)Screen.height * optionFontScale);
return style;
}
/**
* Returns the alternate style for Option buttons.
* This can be used to create alternating color rows.
* Overrides the font size to compensate for varying device resolution.
* Font size is calculated as a fraction of the current screen height.
*/
public GUIStyle GetScaledOptionAlternateStyle()
{
GUIStyle style;
style = new GUIStyle(optionAlternateStyle);
style.fontSize = Mathf.RoundToInt((float)Screen.height * optionFontScale);
return style;
}
}
}

8
Assets/Fungus/Legacy/PageStyle.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 1f1a1fd7fb09d46438885139f2364a93
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

BIN
Assets/Fungus/Legacy/PageStyle1.prefab

Binary file not shown.

4
Assets/Fungus/Legacy/PageStyle1.prefab.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: cdd7a3dba1d864bb78106f6d917a70ae
NativeFormatImporter:
userData:

BIN
Assets/Fungus/Legacy/PageStyle2.prefab

Binary file not shown.

4
Assets/Fungus/Legacy/PageStyle2.prefab.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: de46053ad86174553ba5072033c12105
NativeFormatImporter:
userData:

3
Assets/Fungus/Legacy/Readme.txt

@ -1,3 +0,0 @@
These files are included to support backwards compatibility for games created with earlier versions of Fungus.
They will be deleted in a future release so don’t use them!

4
Assets/Fungus/Legacy/Readme.txt.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: afad86a262b5948f2982ede375a25b54
TextScriptImporter:
userData:

BIN
Assets/Fungus/Legacy/StoryBox1.psd

Binary file not shown.

45
Assets/Fungus/Legacy/StoryBox1.psd.meta

@ -1,45 +0,0 @@
fileFormatVersion: 2
guid: 867efd8ba9d5c4fbb8d6aee3ae44c730
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
Assets/Fungus/Legacy/StoryBox2.psd

Binary file not shown.

45
Assets/Fungus/Legacy/StoryBox2.psd.meta

@ -1,45 +0,0 @@
fileFormatVersion: 2
guid: 8dbe073900e674d7593dbc9a8b931eae
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

4
Assets/Fungus/Scripts/Button.cs

@ -1,7 +1,7 @@
using UnityEngine;
using System;
using System.Collections;
using Fungus;
using Fungus.Script;
namespace Fungus
{
@ -101,7 +101,7 @@ namespace Fungus
// Hide the button if the specified boolean variable is true
if (hideOnBoolean.Length > 0 &&
Variables.GetBoolean(hideOnBoolean))
GlobalVariables.GetBoolean(hideOnBoolean))
{
targetAlpha = 0f;
}

7
Assets/Fungus/Scripts/Commands/DialogCommands.cs

@ -1,6 +1,7 @@
using UnityEngine;
using UnityEngine;
using System;
using System.Collections;
using Fungus.Script;
namespace Fungus
{
@ -24,7 +25,7 @@ namespace Fungus
public override void Execute(CommandQueue commandQueue, Action onComplete)
{
string subbedText = Variables.SubstituteStrings(sayText);
string subbedText = GlobalVariables.SubstituteStrings(sayText);
IDialog sayDialog = Game.GetInstance().GetDialog();
sayDialog.Say(subbedText, onComplete);
@ -50,7 +51,7 @@ namespace Fungus
{
IDialog characterDialog = Game.GetInstance().GetDialog();
string subbedText = Variables.FormatLinkText(Variables.SubstituteStrings(optionText));
string subbedText = GlobalVariables.FormatLinkText(GlobalVariables.SubstituteStrings(optionText));
characterDialog.AddOption(subbedText, optionAction);
if (onComplete != null)

16
Assets/Fungus/Scripts/Game.cs

@ -5,6 +5,7 @@ using System.Linq;
using System;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using Fungus.Script;
/**
* @package Fungus An open source library for Unity 3D for creating graphic interactive fiction games.
@ -17,7 +18,6 @@ namespace Fungus
[RequireComponent(typeof(Dialog))]
[RequireComponent(typeof(CommandQueue))]
[RequireComponent(typeof(CameraController))]
[RequireComponent(typeof(PageController))]
public class Game : GameController
{
/**
@ -71,9 +71,6 @@ namespace Fungus
[HideInInspector]
public CameraController cameraController;
[HideInInspector]
public PageController pageController;
/**
* True when executing a Wait() or WaitForTap() command
*/
@ -107,7 +104,6 @@ namespace Fungus
commandQueue = gameObject.GetComponent<CommandQueue>();
cameraController = gameObject.GetComponent<CameraController>();
pageController = gameObject.GetComponent<PageController>();
// Auto-hide buttons should be visible at start of game
autoHideButtonTimer = autoHideButtonDuration;
@ -145,7 +141,7 @@ namespace Fungus
return dialog as IDialog;
}
return pageController as IDialog;
return null;
}
/**
@ -188,8 +184,8 @@ namespace Fungus
*/
public void SaveGame(string saveName = "_fungus")
{
Variables.SetString("_scene", Application.loadedLevelName);
Variables.Save(saveName);
GlobalVariables.SetString("_scene", Application.loadedLevelName);
GlobalVariables.Save(saveName);
}
/**
@ -200,8 +196,8 @@ namespace Fungus
*/
public void LoadGame(string saveName = "_fungus")
{
Variables.Load(saveName);
string sceneName = Variables.GetString("_scene");
GlobalVariables.Load(saveName);
string sceneName = GlobalVariables.GetString("_scene");
if (sceneName.Length > 0)
{
MoveToScene(sceneName);

317
Assets/Fungus/Scripts/GameController.cs

@ -1,6 +1,7 @@
using UnityEngine;
using System;
using System.Collections;
using Fungus.Script;
namespace Fungus
{
@ -324,7 +325,7 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
Variables.SetBoolean(key, value);
GlobalVariables.SetBoolean(key, value);
}));
}
@ -338,7 +339,7 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
Variables.SetInteger(key, value);
GlobalVariables.SetInteger(key, value);
}));
}
@ -352,7 +353,7 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
Variables.SetFloat(key, value);
GlobalVariables.SetFloat(key, value);
}));
}
@ -366,7 +367,7 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
Variables.SetString(key, value);
GlobalVariables.SetString(key, value);
}));
}
@ -379,8 +380,8 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
int value = Variables.GetInteger(key);
Variables.SetInteger(key, value + delta);
int value = GlobalVariables.GetInteger(key);
GlobalVariables.SetInteger(key, value + delta);
}));
}
@ -393,8 +394,8 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
int value = Variables.GetInteger(key);
Variables.SetInteger(key, value * multiplier);
int value = GlobalVariables.GetInteger(key);
GlobalVariables.SetInteger(key, value * multiplier);
}));
}
@ -407,8 +408,8 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
float value = Variables.GetFloat(key);
Variables.SetFloat(key, value + delta);
float value = GlobalVariables.GetFloat(key);
GlobalVariables.SetFloat(key, value + delta);
}));
}
@ -421,8 +422,8 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
float value = Variables.GetFloat(key);
Variables.SetFloat(key, value * multiplier);
float value = GlobalVariables.GetFloat(key);
GlobalVariables.SetFloat(key, value * multiplier);
}));
}
@ -434,8 +435,8 @@ namespace Fungus
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Call(delegate {
bool value = Variables.GetBoolean(key);
Variables.SetBoolean(key, !value);
bool value = GlobalVariables.GetBoolean(key);
GlobalVariables.SetBoolean(key, !value);
}));
}
@ -624,294 +625,6 @@ namespace Fungus
}));
}
#endregion
#region Obsolete Methods
/// @cond SHOW_OBSOLETE
// These methods are provided for backwards compatibility purposes and will be removed in a future release.
/**
* Sets the screen space rectangle used to display the story text using a Page object.
* Page objects can be edited visually in the Unity editor which is useful for accurate placement.
* The actual screen space rect used is based on both the Page bounds and the camera transform at the time the command is executed.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param page A Page object which defines the screen rect to use when rendering story text.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPage(Page page, PageController.Layout pageLayout = PageController.Layout.FullSize)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.SetPage(page, pageLayout));
}
/**
* Sets the screen space rectangle used to display the story text using a ScreenRect object.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param screenRect A ScreenRect object which defines a rect in normalized screen space coordinates.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageRect(PageController.ScreenRect screenRect, PageController.Layout pageLayout = PageController.Layout.FullSize)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.SetPageRect(screenRect, pageLayout));
}
/**
* Sets the screen space rectangle used to display the story text.
* The rectangle coordinates are in normalized screen space. e.g. x1 = 0 (left), y1 = 0 (top) x2 = 1 (right) y2 = 1 (bottom).
* The origin is at the top left of the screen.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param x1 Page rect left coordinate in normalized screen space coords [0..1]
* @param y1 Page rect top coordinate in normalized screen space coords [0..1
* @param x2 Page rect right coordinate in normalized screen space coords [0..1]
* @param y2 Page rect bottom coordinate in normalized screen space coords [0..1]
* @param pageLayout Layout mode for positioning page within the rect.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageRect(float x1, float y1, float x2, float y2, PageController.Layout pageLayout = PageController.Layout.FullSize)
{
PageController.ScreenRect screenRect = new PageController.ScreenRect();
screenRect.x1 = x1;
screenRect.y1 = y1;
screenRect.x2 = x2;
screenRect.y2 = y2;
SetPageRect(screenRect, pageLayout);
}
/**
* Display story page at the top of the screen.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param scaleX Scales the width of the Page [0..1]. 1 = full screen width.
* @param scaleY Scales the height of the Page [0..1]. 1 = full screen height.
* @param pageLayout Controls how the Page is positioned and sized based on the displayed content.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageTop(float scaleX, float scaleY, PageController.Layout pageLayout)
{
PageController.ScreenRect screenRect = PageController.CalcScreenRect(new Vector2(scaleX, scaleY), PageController.PagePosition.Top);
SetPageRect(screenRect, pageLayout);
}
/**
* Display story page at the top of the screen.
* This method returns immediately but it queues an asynchronous command for later execution.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageTop()
{
Vector2 pageScale = Game.GetInstance().pageController.defaultPageScale;
SetPageTop(pageScale.x, pageScale.y, PageController.Layout.FullSize);
}
/**
* Display story page at the middle of the screen.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param scaleX Scales the width of the Page [0..1]. 1 = full screen width.
* @param scaleY Scales the height of the Page [0..1]. 1 = full screen height.
* @param pageLayout Controls how the Page is positioned and sized based on the displayed content.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageMiddle(float scaleX, float scaleY, PageController.Layout pageLayout)
{
PageController.ScreenRect screenRect = PageController.CalcScreenRect(new Vector2(scaleX, scaleY), PageController.PagePosition.Middle);
SetPageRect(screenRect, pageLayout);
}
/**
* Display story page at the middle of the screen.
* This method returns immediately but it queues an asynchronous command for later execution.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageMiddle()
{
Vector2 pageScale = Game.GetInstance().pageController.defaultPageScale;
SetPageMiddle(pageScale.x, pageScale.y, PageController.Layout.FitToMiddle);
}
/**
* Display story page at the bottom of the screen.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param scaleX Scales the width of the Page [0..1]. 1 = full screen width.
* @param scaleY Scales the height of the Page [0..1]. 1 = full screen height.
* @param pageLayout Controls how the Page is positioned and sized based on the displayed content.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageBottom(float scaleX, float scaleY, PageController.Layout pageLayout)
{
PageController.ScreenRect screenRect = PageController.CalcScreenRect(new Vector2(scaleX, scaleY), PageController.PagePosition.Bottom);
SetPageRect(screenRect, pageLayout);
}
/**
* Display story page at the bottom of the screen.
* This method returns immediately but it queues an asynchronous command for later execution.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageBottom()
{
Vector2 pageScale = Game.GetInstance().pageController.defaultPageScale;
SetPageBottom(pageScale.x, pageScale.y, PageController.Layout.FullSize);
}
/**
* Sets the active style for displaying the Page.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param pageStyle The style object to make active
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetPageStyle(PageStyle pageStyle)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.SetPageStyle(pageStyle));
}
/**
* Obsolete: Use SetHeader() instead.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void Title(string titleText)
{
SetHeader(titleText);
}
/**
* Sets the header text displayed at the top of the page.
* The header text is only displayed when there is some story text or options to be shown.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param footerText The text to display as the header of the Page.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetHeader(string headerText)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.SetHeader(headerText));
}
/**
* Sets the footer text displayed at the top of the page.
* The footer text is only displayed when there is some story text or options to be shown.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param footerText The text to display as the footer of the Page.
*/
[Obsolete("Pages are obsolete. Please use the new Dialog system instead.")]
public static void SetFooter(string footerText)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.SetFooter(footerText));
}
/**
* Display all previously added options as buttons, with no text prompt.
* This method returns immediately but it queues an asynchronous command for later execution.
*/
[Obsolete("No longer required. Use Say() instead.")]
public static void Choose()
{
Choose("");
}
/**
* Displays a story text prompt, followed by all previously added options.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param chooseText The story text to be written above the list of options
*/
[Obsolete("No longer required. Use Say() instead.")]
public static void Choose(string chooseText)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.Choose(chooseText));
}
/**
* Pans the camera through a sequence of target Views over a period of time.
* Note: Does not support camera Rotation.
* The pan starts at the current camera position and performs a smooth pan through all Views in the list.
* Command execution blocks until the pan completes.
* If more control is required over the camera path then you should instead use an Animator component to precisely control the Camera path.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param duration The length of time in seconds needed to complete the pan.
* @param targetViews A parameter list of views to visit during the pan.
*/
[Obsolete("Use a Camera animation instead.")]
public static void PanToPath(float duration, params View[] targetViews)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new Command.PanToPath(targetViews, duration));
}
/**
* Sets a globally accessible integer value.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param key The name of the value to set
* @param value The value to set
*/
[Obsolete("Use SetInteger() instead.")]
public static void SetValue(string key, int value)
{
SetInteger(key, value);
}
/**
* Sets a globally accessible integer value to 1.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param key The name of the value to set
*/
[Obsolete("Use SetInteger() instead")]
public static void SetValue(string key)
{
SetInteger(key, 1);
}
/**
* Sets a globally accessible integer value to 0.
* This method returns immediately but it queues an asynchronous command for later execution.
* @param key The key of the value.
*/
[Obsolete("Use Variables.SetBoolean(key, false) instead")]
public static void ClearValue(string key)
{
Variables.SetInteger(key, 0);
Variables.SetFloat(key, 0);
Variables.SetBoolean(key, false);
}
/**
* Gets a globally accessible integer value.
* Returns zero if the value has not previously been set.
* @param key The name of the value
* @return The integer value for this key, or 0 if not previously set.
*/
[Obsolete("Use Variables.GetInteger() instead")]
public static int GetValue(string key)
{
return Variables.GetInteger(key);
}
/**
* Gets a globally accessible string value.
* @param key The name of the value
* @return The string value for this key, or the empty string if not previously set.
*/
[Obsolete("Use Variables.GetString() instead")]
public static string GetString(string key)
{
return Variables.GetString(key);
}
/**
* Checks if a value is non-zero.
* @param key The name of the value to check.
* @return Returns true if the value is not equal to zero.
*/
[Obsolete("Use Variables.GetInteger() or Variables.HasKey() instead")]
public static bool HasValue(string key)
{
return Variables.GetInteger(key) != 0;
}
/// @endcond
#endregion
}
}

9
Assets/Fungus/Scripts/Room.cs

@ -3,7 +3,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using Fungus;
using Fungus.Script;
namespace Fungus
{
@ -26,7 +26,7 @@ namespace Fungus
*/
public int GetVisitCount()
{
return Variables.GetInteger(GetVisitVariableKey());
return GlobalVariables.GetInteger(GetVisitVariableKey());
}
/**
@ -34,7 +34,7 @@ namespace Fungus
*/
void SetVisitCount(int count)
{
Variables.SetInteger(GetVisitVariableKey(), count);
GlobalVariables.SetInteger(GetVisitVariableKey(), count);
}
/**
@ -156,9 +156,6 @@ namespace Fungus
button.SetAlpha(0f);
}
// Reset Page layout to default setting specified in Game object
game.pageController.SetDefaultPageLayout();
// Rooms may have multiple child views and page.
// It is the responsibility of the client room script to set the desired active view & page in the OnEnter method.
game.commandQueue.CallCommandMethod(game.activeRoom.gameObject, "OnEnter");

3
Assets/Fungus/Scripts/StringsParser.cs

@ -2,6 +2,7 @@ using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Fungus.Script;
namespace Fungus
{
@ -88,7 +89,7 @@ namespace Fungus
// Trim off last newline
blockBuffer = blockBuffer.TrimEnd( '\r', '\n', ' ', '\t');
Variables.SetString(blockTag, blockBuffer);
GlobalVariables.SetString(blockTag, blockBuffer);
}
// Prepare to parse next block

8
Assets/Fungus/Scripts/Variables.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 6552eb7d3f623479097c813cc27dcf92
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

6
Assets/Fungus/VisualScripting/BooleanVariable.cs

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System;
using System.Collections;
@ -11,8 +11,8 @@ namespace Fungus.Script
public bool Value
{
get { return (scope == VariableScope.Local) ? booleanValue : Variables.GetBoolean(key); }
set { if (scope == VariableScope.Local) { booleanValue = value; } else { Variables.SetBoolean(key, value); } }
get { return (scope == VariableScope.Local) ? booleanValue : GlobalVariables.GetBoolean(key); }
set { if (scope == VariableScope.Local) { booleanValue = value; } else { GlobalVariables.SetBoolean(key, value); } }
}
}

6
Assets/Fungus/VisualScripting/FloatVariable.cs

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
namespace Fungus.Script
@ -10,8 +10,8 @@ namespace Fungus.Script
public float Value
{
get { return (scope == VariableScope.Local) ? floatValue : Variables.GetFloat(key); }
set { if (scope == VariableScope.Local) { floatValue = value; } else { Variables.SetFloat(key, value); } }
get { return (scope == VariableScope.Local) ? floatValue : GlobalVariables.GetFloat(key); }
set { if (scope == VariableScope.Local) { floatValue = value; } else { GlobalVariables.SetFloat(key, value); } }
}
}

6
Assets/Fungus/VisualScripting/IntegerVariable.cs

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
namespace Fungus.Script
@ -10,8 +10,8 @@ namespace Fungus.Script
public int Value
{
get { return (scope == VariableScope.Local) ? integerValue : Variables.GetInteger(key); }
set { if (scope == VariableScope.Local) { integerValue = value; } else { Variables.SetInteger(key, value); } }
get { return (scope == VariableScope.Local) ? integerValue : GlobalVariables.GetInteger(key); }
set { if (scope == VariableScope.Local) { integerValue = value; } else { GlobalVariables.SetInteger(key, value); } }
}
}

6
Assets/Fungus/VisualScripting/StringVariable.cs

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
namespace Fungus.Script
@ -10,8 +10,8 @@ namespace Fungus.Script
public string Value
{
get { return (scope == VariableScope.Local) ? stringValue : Variables.GetString(key); }
set { if (scope == VariableScope.Local) { stringValue = value; } else { Variables.SetString(key, value); } }
get { return (scope == VariableScope.Local) ? stringValue : GlobalVariables.GetString(key); }
set { if (scope == VariableScope.Local) { stringValue = value; } else { GlobalVariables.SetString(key, value); } }
}
}

2
Assets/FungusExample.meta → Assets/Fungus2.meta

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 19f5178ee50b34817a7cdafbda2ce166
guid: 120b23b5240c94aee960b7434706811c
folderAsset: yes
DefaultImporter:
userData:

2
Assets/FungusExample/Animations.meta → Assets/Fungus2/Camera.meta

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9df5429c56bc94f1990bfbddd361ebe3
guid: 6e9a956b0b8294e4f82ab030bb93a8e4
folderAsset: yes
DefaultImporter:
userData:

2
Assets/Fungus/Legacy.meta → Assets/Fungus2/FungusCommands.meta

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 91a179baad49c4be29b82e774d9a5bb6
guid: 0e8e8de5785db46fc89683d8b6d3ffec
folderAsset: yes
DefaultImporter:
userData:

2
Assets/FungusExample/Audio.meta → Assets/Fungus2/FungusScript.meta

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 23916e2f1deff4e31a36b6e75aed0906
guid: 57bf29b4215da4cf9b7c331fe6283c12
folderAsset: yes
DefaultImporter:
userData:

4
Assets/Fungus/Scripts/Variables.cs → Assets/Fungus2/FungusScript/GlobalVariables.cs

@ -6,13 +6,13 @@ using System.Text.RegularExpressions;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
namespace Fungus
namespace Fungus.Script
{
/**
* Static data storage class for managing global game variables.
* Provides save and load functionality for persistent storage between game sessions.
*/
public class Variables
public class GlobalVariables
{
static Dictionary<string, string> stringDict = new Dictionary<string, string>();
static Dictionary<string, int> intDict = new Dictionary<string, int>();

2
Assets/Fungus/Legacy/Page.cs.meta → Assets/Fungus2/FungusScript/GlobalVariables.cs.meta

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 627f97c837bdf479aa14a90d8ea3a736
guid: 718be5f6f7dc04ff48fa0232673c89c7
MonoImporter:
serializedVersion: 2
defaultReferences: []

5
Assets/Fungus2/Sprite.meta

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 11656a29c65f3446298fdf276df9f918
folderAsset: yes
DefaultImporter:
userData:

BIN
Assets/FungusExample/Animations/BlueAlienAnim.controller

Binary file not shown.

4
Assets/FungusExample/Animations/BlueAlienAnim.controller.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: d0bc59cbd3e6646048c9f925fc6f96bc
NativeFormatImporter:
userData:

BIN
Assets/FungusExample/Animations/BlueAlienWalk.anim

Binary file not shown.

4
Assets/FungusExample/Animations/BlueAlienWalk.anim.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 343528689888b49bcbf688085bf14e83
NativeFormatImporter:
userData:

BIN
Assets/FungusExample/Animations/GreenAlienWalk.anim

Binary file not shown.

4
Assets/FungusExample/Animations/GreenAlienWalk.anim.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: cbce18786790146fea393a4d451d1e6e
NativeFormatImporter:
userData:

BIN
Assets/FungusExample/Audio/effect.wav

Binary file not shown.

12
Assets/FungusExample/Audio/effect.wav.meta

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 5446370c736a84b6d9d6a9bb6f4d4521
AudioImporter:
serializedVersion: 4
format: 0
quality: .5
stream: 1
3D: 0
forceToMono: 0
useHardware: 0
loopable: 0
userData:

BIN
Assets/FungusExample/Audio/music.mp3

Binary file not shown.

12
Assets/FungusExample/Audio/music.mp3.meta

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 81d2b469d3efe4fd9838d3a4f5165bee
AudioImporter:
serializedVersion: 4
format: 0
quality: .5
stream: 2
3D: 0
forceToMono: 0
useHardware: 0
loopable: 0
userData:

5
Assets/FungusExample/Scenes.meta

@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 695c2b87de46948719d8d25616c55ad0
folderAsset: yes
DefaultImporter:
userData:

BIN
Assets/FungusExample/Scenes/Example.unity

Binary file not shown.

4
Assets/FungusExample/Scenes/Example.unity.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 5a6b6f6f9c1684498b25f6f41ef56995
DefaultImporter:
userData:

5
Assets/FungusExample/Scripts.meta

@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 48785157e076a44009fad585c2ab2735
folderAsset: yes
DefaultImporter:
userData:

67
Assets/FungusExample/Scripts/AudioRoom.cs

@ -1,67 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus.Example
{
public class AudioRoom : Room
{
public Room menuRoom;
public AudioClip musicClip;
public AudioClip effectClip;
void OnEnter()
{
if (Variables.GetBoolean("music"))
{
AddOption("Stop the music", StopGameMusic);
if (Variables.GetBoolean("quiet") == false)
{
AddOption("Shhh! Make it quieter", MakeQuiet);
}
}
else
{
AddOption("Play some music", StartGameMusic);
}
AddOption("Play a sound effect", PlaySound);
AddOption("Back to menu", MainMenu);
Say("We are the music makers, and we are the dreamers of dreams.");
}
void StartGameMusic()
{
PlayMusic(musicClip);
SetMusicVolume(1f);
SetBoolean("music", true);
Call(OnEnter);
}
void StopGameMusic()
{
StopMusic();
SetBoolean("music", false);
SetBoolean("quiet", false);
Call(OnEnter);
}
void PlaySound()
{
PlaySound(effectClip, 1f);
Call(OnEnter);
}
void MakeQuiet()
{
SetBoolean("quiet", true);
SetMusicVolume(0.25f, 1f);
Call(OnEnter);
}
void MainMenu()
{
MoveToRoom(menuRoom);
}
}
}

8
Assets/FungusExample/Scripts/AudioRoom.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cf05e131525e5483ebe1ab66557e8824
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

66
Assets/FungusExample/Scripts/ButtonRoom.cs

@ -1,66 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus.Example
{
public class ButtonRoom : Room
{
public Room menuRoom;
public AudioClip effectClip;
public Button homeButton;
public Button soundButton;
public Button questionButton;
// GUIButton displays a button texture at the same size & position regardless of screen resolution.
// This is handy for displaying simple buttons in a consistent manner across devices.
public GUIButton mushroomButton;
void OnEnter()
{
// Show the mushroom logo immediately
mushroomButton.enabled = true;
// Show button, always visible (because autoHide is set to false)
ShowButton(homeButton, OnHomeClicked);
// Show buttons, auto hides when text is displayed (because autoHide is set to true)
ShowButton(soundButton, OnMusicClicked);
ShowButton(questionButton, OnQuestionClicked);
Say("The Mushroom read his book with great interest.");
Say("After turning the last page, he considered his options.");
// Uncomment this line to make the player tap the screen before showing the buttons
// WaitForInput();
// Once the last Say command executes the page will dissappear because there's no more content to show.
// At that point, the game will automatically fade in all Auto Buttons in the room
}
void OnHomeClicked()
{
mushroomButton.enabled = false;
MoveToRoom(menuRoom);
}
void OnMusicClicked()
{
PlaySound(effectClip);
// The music button has been configured to automatically hide when this value is set
SetBoolean("PlayedSound", true);
}
void OnQuestionClicked()
{
// Set the Button.autoHide property to automatically hide buttons when displaying page text/options or waiting
// The Question and Sound buttons have the Auto Hide property set, but the Home button does not.
Say("What book was he reading?");
Say("Sadly we will never know for sure.");
}
}
}

8
Assets/FungusExample/Scripts/ButtonRoom.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: dfdbe550da48a47b7a46c5e5b8fcfceb
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

76
Assets/FungusExample/Scripts/DialogRoom.cs

@ -1,76 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus.Example
{
public class DialogRoom : Room
{
// This is a reference to the menu room so we can transition back to the menu using MoveToRoom()
public Room menuRoom;
// The OnEnter() method is called whenever the player enters the room
void OnEnter()
{
// Each Say() command writes one line of text, followed by a continue button
Say("One day in the deep dark forest, a mushroom grew.");
SetCharacter("Mushroom");
Say("What am I doing here?");
Say("I think I will wait for a while and see if something happens.");
// Wait for a few seconds
Wait(2);
Say("Hmmm. Nothing seems to be happening.");
// Add a some user options, you can add as many as you like.
// The first parameter is the option text
// The second parameter is the method to call if the user selects the option
AddOption("Go to sleep", GoToSleep);
AddOption("Produce spores", ProduceSpores);
// Write some story text.
// The previously added options will be displayed as buttons.
Say("Whatever will I do?");
}
void GoToSleep()
{
// Check to see if a game value has been set
if (Variables.GetBoolean("spawned"))
{
Say("I am feeling rather sleepy after all that spawning!");
Say("Yawn! Good night world!");
// Leave the current room and enter the menu room
MoveToRoom(menuRoom);
}
else
{
Say("I'm not feeling tired. I'm a fresh mushroom!");
Say("Maybe I should spawn some spores?");
// Use Call() to call another method whenever you want.
Call(ProduceSpores);
}
}
void ProduceSpores()
{
Say("Yeah! I feel like doing some sporing!");
ShakeCamera(0.1f, 0.1f, 0.2f);
Say("Wow - look at all these spores! COOL!");
// Sets a global value flag which we check above in GoToSleep
SetBoolean("spawned", true);
AddOption("So tired. I sleep now.", GoToSleep);
AddOption("No way! More spores!", ProduceSpores);
Say("What will I do now?");
}
}
}

8
Assets/FungusExample/Scripts/DialogRoom.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 79047217eeb604324b501728ce6c43b2
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

59
Assets/FungusExample/Scripts/MenuRoom.cs

@ -1,59 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus.Example
{
public class MenuRoom : Room
{
public Room dialogRoom;
public Room viewRoom;
public Room spriteRoom;
public Room parallaxRoom;
public Room buttonRoom;
public Room audioRoom;
void OnEnter()
{
SetCharacter("Narrator");
AddOption("Telling a story with the Dialog", MoveToDialogRoom);
AddOption("Controlling the camera with Views", MoveToViewRoom);
AddOption("Sprites and Animations", MoveToSpriteRoom);
AddOption("Swipe panning and parallax", MoveToParallaxRoom);
AddOption("Using Buttons", MoveToButtonsRoom);
AddOption("Playing music and sound effects", MoveToAudioRoom);
Say("Choose an example");
}
void MoveToDialogRoom()
{
MoveToRoom(dialogRoom);
}
void MoveToViewRoom()
{
MoveToRoom(viewRoom);
}
void MoveToSpriteRoom()
{
MoveToRoom(spriteRoom);
}
void MoveToParallaxRoom()
{
MoveToRoom(parallaxRoom);
}
void MoveToButtonsRoom()
{
MoveToRoom(buttonRoom);
}
void MoveToAudioRoom()
{
MoveToRoom(audioRoom);
}
}
}

8
Assets/FungusExample/Scripts/MenuRoom.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8f3838e29c03e4ebf9a232fb00d4dffb
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

40
Assets/FungusExample/Scripts/ParallaxRoom.cs

@ -1,40 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus.Example
{
// The parallax effect is achieved by attaching a Parallax script to each sprite that requires a
// parallax offset. The offset is then applied automatically whenever the camera moves around the active Room.
// There is a handy parallax sprite prefab in Fungus/Prefabs/ParallaxSprite.prefab
public class ParallaxRoom : Room
{
public View viewA;
public View viewB;
public Button menuButton;
public Room menuRoom;
void OnEnter()
{
SetView(viewA);
Say("Let's move the camera!");
PanToView(viewB, 2);
Say("Oooh! Nice parallax!");
PanToView(viewA, 2);
Say("Now you have a go!");
Say("Swipe the screen to pan around.");
ShowButton(menuButton, OnHomeButtonClicked);
StartSwipePan(viewA, viewB, 0f);
}
void OnHomeButtonClicked()
{
MoveToRoom(menuRoom);
}
}
}

8
Assets/FungusExample/Scripts/ParallaxRoom.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 65166947e16ca4402a77071aca234c0a
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

76
Assets/FungusExample/Scripts/SpriteRoom.cs

@ -1,76 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus.Example
{
public class SpriteRoom : Room
{
public Room menuRoom;
public Animator blueAlienAnim;
public SpriteRenderer blueAlienSprite;
public SpriteRenderer redMushroomSprite;
void OnEnter()
{
HideSprite(redMushroomSprite);
ShowSprite(blueAlienSprite);
SetCharacter("PinkAlienHappy");
Say("Hey Blue Alien!");
Say("Show me your funky moves!");
SetCharacter("BlueAlienHappy");
Say("Watch and learn Pinky!");
SetAnimatorTrigger(blueAlienAnim, "StartBlueWalk");
Wait(4);
SetAnimatorTrigger(blueAlienAnim, "Stop");
SetCharacter("PinkAlienHappy");
Say("Nice moves there Blue Alien!");
Say("Would you like a nice mushroom to sit down on?");
FadeSprite(redMushroomSprite, 1f, 1f);
SetCharacter("BlueAlienSad");
Say("I'd love to, but alas I cannot!");
Say("The artist didn't make a sitting animation for me.");
Say("It's a very rare genetic condition. Sniff.");
SetCharacter("PinkAlienSad");
Say("Oh! Sorry to hear that.");
Wait(1f);
FadeSprite(redMushroomSprite, 0f, 1f);
SetCharacter("PinkAlienSad");
Say("Uh... are you ok?");
Say("Looks like you're turning a little bit green after all that dancing!");
SetAnimatorTrigger(blueAlienAnim, "StartGreenWalk");
Wait(2f);
SetCharacter("PinkAlienHappy");
Say("Never mind, I'm sure you'll feel better soon!");
}
// This method is called by the Animation Event Listener component on the blue alien.
// When the GreenAlienWalk animation finishes it fires an event which calls this method.
void AlienAnimationFinished()
{
SetAnimatorTrigger(blueAlienAnim, "Stop");
Say("Well done Blue Alien! Time to say goodbye!");
FadeSprite(blueAlienSprite, 0, 1f);
Wait(1f);
Say("Heh. That Blue Alien - what a guy!");
MoveToRoom(menuRoom);
}
}
}

8
Assets/FungusExample/Scripts/SpriteRoom.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 481c8e241863048f9adfcc8ab4029c88
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

47
Assets/FungusExample/Scripts/ViewRoom.cs

@ -1,47 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Fungus.Example
{
public class ViewRoom : Room
{
public Room menuRoom;
public View mainView;
public View logoView;
public View toadstoolView;
void OnEnter()
{
SetView(mainView);
AddOption("Lets look at the logo", LookLogo);
AddOption("That's a nice toadstool over there", LookToadstool);
AddOption("Back to menu", MoveToMenu);
Say("Wanna move the camera?");
}
void MoveToMenu()
{
MoveToRoom(menuRoom);
}
void LookLogo()
{
PanToView(logoView, 2f);
Wait(2);
PanToView(mainView, 2f, false); // Don't wait for pan to finish before executing next command
Say("Wow - nice logo!");
Call(OnEnter);
}
void LookToadstool()
{
FadeToView(toadstoolView, 2f);
Say("Now that is a pretty mushroom");
Say("Hey - let's go look at that logo");
Call(LookLogo);
}
}
}

8
Assets/FungusExample/Scripts/ViewRoom.cs.meta

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b17df452ec8b34e1ea67b7ff2c46579b
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

5
Assets/FungusExample/Sprites.meta

@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: b0748817ba5034a03bb11cf6052fd465
folderAsset: yes
DefaultImporter:
userData:

5
Assets/FungusExample/Sprites/GreenCons.meta

@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 8c4fccf89680848c4a765eeef78601d9
folderAsset: yes
DefaultImporter:
userData:

15
Assets/FungusExample/Sprites/GreenCons/MouseRunnerDotComGraphicsLicense.txt

@ -1,15 +0,0 @@
Thanks for downloading ColoCons. While I want you to enjoy these icons for free, I ask that you please abide by the terms that they are licensed under.
Enjoy and come back to MouseRunner.com for all free content and resources.
The graphics contained in these files are licensed under the Creative Commons Attribution-ShareAlike 2.5 License
Furthermore,
You may not claim the works as your own.
You must provide a link back to www.MouseRunner.com when using on a website, for commercial purposes, and for applications.
Visit the address below to learn more about the Creative Commons license.
http://creativecommons.org/licenses/by-nc-sa/2.5/legalcode

4
Assets/FungusExample/Sprites/GreenCons/MouseRunnerDotComGraphicsLicense.txt.meta

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: b2e1b498f5c584f32af544c563ec0a47
TextScriptImporter:
userData:

5
Assets/FungusExample/Sprites/GreenCons/PNGs.meta

@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 3890579a709a746a6b8b2aa9269cec81
folderAsset: yes
DefaultImporter:
userData:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/At.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/At.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: add44c210a6db48c5ae4c6dcda05c2e6
TextureImporter:
fileIDToRecycleName:
21300000: At
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Blank.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Blank.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: 9909599ea1f3b444b9ca793b78cd01d7
TextureImporter:
fileIDToRecycleName:
21300000: Blank
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Cancel.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Cancel.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: 7b689e41388ba4143aa2fd46250e4757
TextureImporter:
fileIDToRecycleName:
21300000: Cancel
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Cash.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Cash.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: edad90679009a4e4a9ce7c1dbf33cb76
TextureImporter:
fileIDToRecycleName:
21300000: Cash
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Chat.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Chat.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: 9669ecb5215864b02af93cbfa4133845
TextureImporter:
fileIDToRecycleName:
21300000: Chat
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/CheckMark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/CheckMark.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: e42fffba9ed624a028274743e0fa2f21
TextureImporter:
fileIDToRecycleName:
21300000: CheckMark
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Copy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Copy.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: ef759df8d7d2241d28331dd24168cded
TextureImporter:
fileIDToRecycleName:
21300000: Copy
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Cut.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Cut.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: cdeace8ee18e1460aa0138b5b6ff3cfa
TextureImporter:
fileIDToRecycleName:
21300000: Cut
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Doc.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Doc.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: 8359c888d234c47e4a613d7cd7eae11a
TextureImporter:
fileIDToRecycleName:
21300000: Doc
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Down.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Down.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: 5ecdcb46978fd433d89b71f0280707fb
TextureImporter:
fileIDToRecycleName:
21300000: Down
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:

BIN
Assets/FungusExample/Sprites/GreenCons/PNGs/Download.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

48
Assets/FungusExample/Sprites/GreenCons/PNGs/Download.png.meta

@ -1,48 +0,0 @@
fileFormatVersion: 2
guid: 0cb504ff8c54a468c824ee37c71c6b1a
TextureImporter:
fileIDToRecycleName:
21300000: Download
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:

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save