Browse Source

Documentation fixes

master
chrisgregan 11 years ago
parent
commit
b3a5bb1a2e
  1. 2
      Assets/Fungus/Docs/_0_mainpage.md
  2. 29
      Assets/Fungus/Docs/_2_pages.md
  3. 1
      Assets/Fungus/Docs/_3_views.md
  4. 16
      Assets/Fungus/Docs/_4_sprites.md
  5. 36
      Assets/Fungus/Docs/_5_sprites.md
  6. 2
      Assets/Fungus/Docs/_5_sprites.md.meta
  7. 40
      Assets/Fungus/Docs/_8_planned_features.md
  8. 4
      Doxyfile
  9. BIN
      ProjectSettings/ProjectSettings.asset

2
Assets/Fungus/Docs/_0_mainpage.md

@ -6,5 +6,5 @@ Fungus is an open source library for Unity 3D for creating interactive fiction /
It was created and is maintained by Chris Gregan from [Snozbot.com](http://www.snozbot.com/).
- See the [GameController](@ref Fungus.GameController) class for a full list of supported commands.
- See http://www.snozbot.com/fungus for more information about the Fungus project.
- See http://fungus.snozbot.com for more information about the Fungus project.

29
Assets/Fungus/Docs/_2_pages.md

@ -2,9 +2,11 @@ Writing Story Text With Pages
=============================
The [Page](@ref Fungus.Page) component defines an area where the story textbox will appear on screen.
- A Page can display title text, say text and a list of options.
- Only one page is ever active at a time.
- The active Page automatically hides when there is no remaining story text or options to display.
- The Page can display title text, say text and a list of options.
- The Page automatically hides when there is no remaining story text or options to display.
- The appearance of the text in the Page is controlled via the active [PageStyle](@ref Fungus.PageStyle) object.
# How do I add a Page to a Room?
@ -17,7 +19,7 @@ The [Page](@ref Fungus.Page) component defines an area where the story textbox w
1. Ensure there are at least two Page objects in your Room.
2. Add public Page properties to your Room script and setup references to each Page in the Room.
3. Use the [SetPage](@ref Fungus.GameController.SetPage) command to control which Page will be used for text rendering.
3. Use the [SetPage](@ref Fungus.GameController.SetPage) command to control which Page rect will be used for rendering text.
## C# code example
~~~~~~~~~~~~~~~~~~~~
@ -40,17 +42,13 @@ public class MyRoom : Room
}
~~~~~~~~~~~~~~~~~~~~
## Notes
- If there is only one Page in a Room, Fungus will automatically make this the active Page when entering the Room.
- If a View has a child Page object, Fungus will automatically make this the active Page after transitioning to that View (e.g. via [SetView](@ref Fungus.GameController.SetView))).
- If you find that text is not rendering on the Page you expect, you probably need to set the active Page explicitly using the method shown above.
- - -
# How do I write story text to the active Page?
1. Use the [Title](@ref Fungus.GameController.Title) command to set the title text to be displayed at the top of the active page.
2. Use the [Say](@ref Fungus.GameController.Say) command to display a single line of story text and then wait for the player to press the continue button.
1. Use the [SetHeader](@ref Fungus.GameController.SetHeader) command to set the header text to be displayed at the top of the active page.
1. Use the [SetFooter](@ref Fungus.GameController.SetFooter) command to set the footer text to be displayed at the bottom of the active page.
2. Use the [Say](@ref Fungus.GameController.Say) command to display a single line of story text and then wait for the player to click to continue.
## C# code example
~~~~~~~~~~~~~~~~~~~~
@ -62,19 +60,12 @@ public class MyRoom : Room
{
void OnEnter()
{
Title("The Title"); // Sets the title text
SetHeader("The Title"); // Sets the header text
Say("Hello"); // Writes the story text and waits for player to continue
}
}
~~~~~~~~~~~~~~~~~~~~
## Notes
- The [Page](@ref Fungus.Page) component defines the area where the story textbox will appear on screen.
- A Page can display title text, say text and a list of options.
- Only one Page is ever active at a time.
- The active Page automatically hides when there is no remaining story text or options to display.
- The appearance of the title and say text in the Page is controlled via the active [PageStyle](@ref Fungus.PageStyle) object.
- - -
# How do I create a multiple choice menu on the active Page?

1
Assets/Fungus/Docs/_3_views.md

@ -41,7 +41,6 @@ public class MyRoom : Room
- The [View](@ref Fungus.View) component specifies a single camera position and orthographic size.
- Fungus automatically modifies the position and size of the camera when changing Rooms and transitioning between Views.
- You can add multiple Views in a Fungus room and perform transitions between those Views to move the camera around the Room.
- When a transition to a new View completes, Fungus looks for a Page object that is a child of that View. The child Page then utomatically becomes the active Page.
- View transitions cause the command queue to pause until the transition has completed.
- The View class currently only supports the Orthographic mode for Unity's Camera component.

16
Assets/Fungus/Docs/_4_sprites.md

@ -34,19 +34,3 @@ public class MyRoom : Room
- Use a [Wait](@ref Fungus.GameController.Wait) command if you need to wait for a sprite fade to finish before continuing.
- - -
# How do I make Buttons?
TODO: Document this!
- - -
# How do I trigger an animation?
TODO: Document this!
- - -
# How do I listen for Animation Events?
TODO: Document this!

36
Assets/Fungus/Docs/_5_sprites.md

@ -0,0 +1,36 @@
Using Sprites
=============
# How do I control sprite visibility?
1. Add a public SpriteRenderer property to your Room script and setup a reference to your SpriteRenderer object in the inspector.
2. Use the [ShowSprite](@ref Fungus.GameController.ShowSprite) command to make a sprite visible instantly.
3. Use the [HideSprite](@ref Fungus.GameController.HideSprite) command to make a sprite invisible instantly.
4. Use the [FadeSprite](@ref Fungus.GameController.FadeSprite) command to fade a sprite in or out over a period of time.
## C# Code Example
~~~~~~~~~~~~~~~~~~~~
using UnityEngine;
using System.Collections;
using Fungus;
public class MyRoom : Room
{
public SpriteRenderer mySprite;
void OnEnter()
{
HideSprite(mySprite); // Sets sprite alpha to 0 (invisible)
Wait(5);
ShowSprite(mySprite); // Sets sprite alpha to 1 (fully visible)
Wait(5);
FadeSprite(mySprite, 0f, 5f); // Fades sprite alpha to 0 over 5 seconds
}
}
~~~~~~~~~~~~~~~~~~~~
## Notes
- The [FadeSprite](@ref Fungus.GameController.FadeSprite) command does not pause command execution. This allows for fading multiple sprites simultaneously.
- Use a [Wait](@ref Fungus.GameController.Wait) command if you need to wait for a sprite fade to finish before continuing.
- - -

2
Assets/Fungus/Docs/_8_planned_features.md.meta → Assets/Fungus/Docs/_5_sprites.md.meta

@ -1,4 +1,4 @@
fileFormatVersion: 2
guid: 9fbec5fce88b84a7db29d72d3aefddc4
guid: dc24541bca65e4768a8cd00cf7e8f77f
DefaultImporter:
userData:

40
Assets/Fungus/Docs/_8_planned_features.md

@ -1,40 +0,0 @@
Planned Features
================
# Cross Fade
- Fade a sprite over time to use a different texture.
~~~~~~~~~~~~~~~~~~~~
CrossFade(SpriteRenderer spriteRenderer, Texture2D texture2D, float duration);
~~~~~~~~~~~~~~~~~~~~
# Page Icons
- Set a sprite icon on left or right side of the active page
- Size is specified as a fraction of screen height for consistent display on different device types
~~~~~~~~~~~~~~~~~~~~
SetLeftIcon(Texture2D texture2D, float iconScale);
SetRightIcon(Texture2D texture2D, float iconScale);
SetNoIcon();
~~~~~~~~~~~~~~~~~~~~
# More examples
- Examples Rooms showing usage for common game types (RPG, Visual Novel, Comic Strip, ...)
# Fixed Page
- Option to clamp page to bottom or top section of screen (standard Visual Novel layout)
# Comic Strip Bubbles
- Comic strip style bubbles
- Automatic fitting for bubble text
# Button Hover
- Highlight buttons on mouse hover
# New Unity GUI Support
- Complete rewrite Page system to use new Unity GUI system (when it's released!)
- Support checkboxes, scroll boxes, sliders, advanced font rendering, ...
# Dice Roll Page
- Simple combat system via visual dice roll

4
Doxyfile

@ -38,7 +38,7 @@ PROJECT_NAME = Fungus
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.2.0
PROJECT_NUMBER = 1.3.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@ -753,7 +753,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT = Assets/Fungus/Scripts/AnimationListener.cs \
INPUT = Assets/Fungus/Scripts/ \
Assets/Fungus/Scripts/Button.cs \
Assets/Fungus/Scripts/CameraController.cs \
Assets/Fungus/Scripts/CommandQueue.cs \

BIN
ProjectSettings/ProjectSettings.asset

Binary file not shown.
Loading…
Cancel
Save