@ -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; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: dce33924cf6804b2c94d17784a6037d1 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
Before Width: | Height: | Size: 5.3 KiB |
@ -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: |
|
@ -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: |
|
@ -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: |
|
@ -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; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: ec557b5a76ab94961964394b8511fc9b |
|
||||||
NativeFormatImporter: |
|
||||||
userData: |
|
@ -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() |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: ae90082ad9904474ebe8554e864a0539 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 2154cd49b43b3450fb92da231e24e065 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 1f1a1fd7fb09d46438885139f2364a93 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: cdd7a3dba1d864bb78106f6d917a70ae |
|
||||||
NativeFormatImporter: |
|
||||||
userData: |
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: de46053ad86174553ba5072033c12105 |
|
||||||
NativeFormatImporter: |
|
||||||
userData: |
|
@ -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! |
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: afad86a262b5948f2982ede375a25b54 |
|
||||||
TextScriptImporter: |
|
||||||
userData: |
|
@ -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: |
|
@ -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: |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 6552eb7d3f623479097c813cc27dcf92 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -1,5 +1,5 @@ |
|||||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||||
guid: 19f5178ee50b34817a7cdafbda2ce166 |
guid: 120b23b5240c94aee960b7434706811c |
||||||
folderAsset: yes |
folderAsset: yes |
||||||
DefaultImporter: |
DefaultImporter: |
||||||
userData: |
userData: |
@ -1,5 +1,5 @@ |
|||||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||||
guid: 9df5429c56bc94f1990bfbddd361ebe3 |
guid: 6e9a956b0b8294e4f82ab030bb93a8e4 |
||||||
folderAsset: yes |
folderAsset: yes |
||||||
DefaultImporter: |
DefaultImporter: |
||||||
userData: |
userData: |
@ -1,5 +1,5 @@ |
|||||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||||
guid: 91a179baad49c4be29b82e774d9a5bb6 |
guid: 0e8e8de5785db46fc89683d8b6d3ffec |
||||||
folderAsset: yes |
folderAsset: yes |
||||||
DefaultImporter: |
DefaultImporter: |
||||||
userData: |
userData: |
@ -1,5 +1,5 @@ |
|||||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||||
guid: 23916e2f1deff4e31a36b6e75aed0906 |
guid: 57bf29b4215da4cf9b7c331fe6283c12 |
||||||
folderAsset: yes |
folderAsset: yes |
||||||
DefaultImporter: |
DefaultImporter: |
||||||
userData: |
userData: |
@ -1,5 +1,5 @@ |
|||||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||||
guid: 627f97c837bdf479aa14a90d8ea3a736 |
guid: 718be5f6f7dc04ff48fa0232673c89c7 |
||||||
MonoImporter: |
MonoImporter: |
||||||
serializedVersion: 2 |
serializedVersion: 2 |
||||||
defaultReferences: [] |
defaultReferences: [] |
@ -0,0 +1,5 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 11656a29c65f3446298fdf276df9f918 |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
userData: |
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: d0bc59cbd3e6646048c9f925fc6f96bc |
|
||||||
NativeFormatImporter: |
|
||||||
userData: |
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 343528689888b49bcbf688085bf14e83 |
|
||||||
NativeFormatImporter: |
|
||||||
userData: |
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: cbce18786790146fea393a4d451d1e6e |
|
||||||
NativeFormatImporter: |
|
||||||
userData: |
|
@ -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: |
|
@ -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: |
|
@ -1,5 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 695c2b87de46948719d8d25616c55ad0 |
|
||||||
folderAsset: yes |
|
||||||
DefaultImporter: |
|
||||||
userData: |
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 5a6b6f6f9c1684498b25f6f41ef56995 |
|
||||||
DefaultImporter: |
|
||||||
userData: |
|
@ -1,5 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 48785157e076a44009fad585c2ab2735 |
|
||||||
folderAsset: yes |
|
||||||
DefaultImporter: |
|
||||||
userData: |
|
@ -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); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: cf05e131525e5483ebe1ab66557e8824 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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."); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: dfdbe550da48a47b7a46c5e5b8fcfceb |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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?"); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 79047217eeb604324b501728ce6c43b2 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 8f3838e29c03e4ebf9a232fb00d4dffb |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 65166947e16ca4402a77071aca234c0a |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 481c8e241863048f9adfcc8ab4029c88 |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -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); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: b17df452ec8b34e1ea67b7ff2c46579b |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
@ -1,5 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: b0748817ba5034a03bb11cf6052fd465 |
|
||||||
folderAsset: yes |
|
||||||
DefaultImporter: |
|
||||||
userData: |
|
@ -1,5 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 8c4fccf89680848c4a765eeef78601d9 |
|
||||||
folderAsset: yes |
|
||||||
DefaultImporter: |
|
||||||
userData: |
|
@ -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 |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,4 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: b2e1b498f5c584f32af544c563ec0a47 |
|
||||||
TextScriptImporter: |
|
||||||
userData: |
|
@ -1,5 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 3890579a709a746a6b8b2aa9269cec81 |
|
||||||
folderAsset: yes |
|
||||||
DefaultImporter: |
|
||||||
userData: |
|
Before Width: | Height: | Size: 14 KiB |
@ -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: |
|
Before Width: | Height: | Size: 11 KiB |
@ -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: |
|
Before Width: | Height: | Size: 12 KiB |
@ -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: |
|
Before Width: | Height: | Size: 13 KiB |
@ -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: |
|
Before Width: | Height: | Size: 12 KiB |
@ -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: |
|
Before Width: | Height: | Size: 12 KiB |
@ -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: |
|
Before Width: | Height: | Size: 13 KiB |
@ -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: |
|
Before Width: | Height: | Size: 14 KiB |
@ -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: |
|
Before Width: | Height: | Size: 12 KiB |
@ -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: |
|
Before Width: | Height: | Size: 12 KiB |
@ -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: |
|
Before Width: | Height: | Size: 12 KiB |
@ -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: |
|