- Added clickSound property to Button component - Added new Dialog component and prefab (replaces Page) - Moved deprecated files to Legacy folder - Game components (CommandQueue, etc.) are now created in Game prefab - Moved all camera related properties and functions from Game to CameraController - Added IDialog interface to support backwards compatibility between Page class and the new Dialog class - Added SetDialog() and SetTimeout() commands - Marked all Page commands as Obsolete - Added character images for use with Dialog component - Added timed multiple choice menus - Added looping typing sound while text is being written - Updated example rooms to use new Dialog systemmaster
@ -0,0 +1,5 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 91a179baad49c4be29b82e774d9a5bb6 |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
userData: |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
@ -0,0 +1,3 @@ |
|||||||
|
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! |
@ -0,0 +1,4 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: afad86a262b5948f2982ede375a25b54 |
||||||
|
TextScriptImporter: |
||||||
|
userData: |
@ -0,0 +1,4 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: c380eb5097e094010b380ed4e37cca24 |
||||||
|
NativeFormatImporter: |
||||||
|
userData: |
@ -0,0 +1,796 @@ |
|||||||
|
using UnityEngine; |
||||||
|
using System; |
||||||
|
using System.Collections; |
||||||
|
using System.Collections.Generic; |
||||||
|
|
||||||
|
namespace Fungus |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Interface for Dialog implementations. |
||||||
|
* This allows us to introduce new types of Dialog in future. |
||||||
|
*/ |
||||||
|
public interface IDialog |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Display a line of story text. |
||||||
|
* If any options have previously been added using AddOption(), these will be displayed and the |
||||||
|
* user must choose an option to continue. The sayAction parameter is ignored |
||||||
|
* @param sayText The line of story text to be displayed. |
||||||
|
* @param sayAction Delegate method to call when the player taps to continue. |
||||||
|
*/ |
||||||
|
void Say(string sayText, Action sayAction); |
||||||
|
|
||||||
|
/** |
||||||
|
* Clear the current list of options previously added using AddOption(). |
||||||
|
*/ |
||||||
|
void ClearOptions(); |
||||||
|
|
||||||
|
/** |
||||||
|
* Add an option to the list of options to be displayed on the next call to Say(). |
||||||
|
* @param optionText Text to display on the button for the option. |
||||||
|
* @param optionAction Delegate method to call when the option button is pressed. |
||||||
|
*/ |
||||||
|
void AddOption(string optionText, Action optionAction); |
||||||
|
|
||||||
|
/** |
||||||
|
* Sets a time limit for the player to choose between multiple options. |
||||||
|
* If the player fails to make a choice in time then the timeoutAction delegate method is called. |
||||||
|
* This setting only applies to the next Say() command and will be reset afterwards. |
||||||
|
* @timeoutDuration Length of time for the player to choose an option. |
||||||
|
* @timeoutAction Delegate method to call when player fails to choose an option. |
||||||
|
*/ |
||||||
|
void SetTimeout(float timeoutDuration, Action timeoutAction); |
||||||
|
} |
||||||
|
|
||||||
|
[ExecuteInEditMode] |
||||||
|
public class Dialog : MonoBehaviour, IDialog |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Padding values for each side of the dialog. |
||||||
|
* Values are in normalized screen coords [0..1] |
||||||
|
*/ |
||||||
|
[Serializable] |
||||||
|
public class Layout |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Pushes the left dialog edge away from the left side of the screen. |
||||||
|
*/ |
||||||
|
public bool leftSpace = false; |
||||||
|
|
||||||
|
/** |
||||||
|
* Pushes the top dialog edge away from the top side of the screen. |
||||||
|
*/ |
||||||
|
public bool topSpace = true; |
||||||
|
|
||||||
|
/** |
||||||
|
* Pushes the right dialog edge away from the right side of the screen. |
||||||
|
*/ |
||||||
|
public bool rightSpace = false; |
||||||
|
|
||||||
|
/** |
||||||
|
* Pushes the bottom dialog edge away from the bottom side of the screen. |
||||||
|
*/ |
||||||
|
public bool bottomSpace = false; |
||||||
|
|
||||||
|
/** |
||||||
|
* Minimum dimensions of the dialog. |
||||||
|
* The dialog may expand beyond these dimensions to fit content. |
||||||
|
* Coordinates are in normalized screen coordinates [0..1] |
||||||
|
*/ |
||||||
|
public Vector2 size = new Vector2(1f, 0.25f); |
||||||
|
|
||||||
|
/** |
||||||
|
* Offsets the dialog relative to the top left corner of the screen. |
||||||
|
* Coordinates are in normalized screen coordinates [0..1] |
||||||
|
*/ |
||||||
|
public Vector2 offset; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Layout values used to control size and position of the dialog. |
||||||
|
*/ |
||||||
|
public Layout layout; |
||||||
|
|
||||||
|
/** |
||||||
|
* Defines the dialog display properties of a game character. |
||||||
|
*/ |
||||||
|
[System.Serializable] |
||||||
|
public class Character |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Side of screen to display character image. |
||||||
|
*/ |
||||||
|
public enum ImageSide |
||||||
|
{ |
||||||
|
/// Display image on the left side of the dialog. |
||||||
|
Left, |
||||||
|
/// Display image on the right side of the dialog. |
||||||
|
Right |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Indentifier for this character for use with the SetCharacter() method. |
||||||
|
*/ |
||||||
|
public string characterID; |
||||||
|
|
||||||
|
/** |
||||||
|
* Name text to display for the character. |
||||||
|
* If empty then the name field is not displayed. |
||||||
|
*/ |
||||||
|
public string name; |
||||||
|
|
||||||
|
/** |
||||||
|
* The color for the name text. |
||||||
|
* This always overrides any color value specified in the NameStyle property. |
||||||
|
*/ |
||||||
|
public Color nameColor; |
||||||
|
|
||||||
|
/** |
||||||
|
* Image to display for the character. |
||||||
|
* If no image is specified then no character image will be displayed. |
||||||
|
*/ |
||||||
|
public Texture2D image; |
||||||
|
|
||||||
|
/** |
||||||
|
* Side of dialog where character image will be displayed. |
||||||
|
*/ |
||||||
|
public ImageSide imageSide; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* List of game characters that can be displayed using this dialog. |
||||||
|
*/ |
||||||
|
public Character[] characters; |
||||||
|
|
||||||
|
/** |
||||||
|
* Active character to use when displaying dialog. |
||||||
|
*/ |
||||||
|
public int activeCharacter; |
||||||
|
|
||||||
|
/** |
||||||
|
* Writing speed for say text in Characters Per Second. |
||||||
|
*/ |
||||||
|
public int writingSpeed = 100; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sound to play while text is being written in the dialog. |
||||||
|
*/ |
||||||
|
public AudioClip writingSound; |
||||||
|
|
||||||
|
/** |
||||||
|
* Loop the writing sound as long as text is being written. |
||||||
|
*/ |
||||||
|
public bool loopWritingSound = true; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sound effect to play when the player taps to continue. |
||||||
|
*/ |
||||||
|
public AudioClip continueSound; |
||||||
|
|
||||||
|
/** |
||||||
|
* Icon to display under the story text when waiting for player to tap to continue. |
||||||
|
*/ |
||||||
|
public Texture2D continueIcon; |
||||||
|
|
||||||
|
/** |
||||||
|
* Number of buttons to display in the same row when showing multiple options |
||||||
|
*/ |
||||||
|
public int buttonsPerRow = 2; |
||||||
|
|
||||||
|
/** |
||||||
|
* Minimum width of each button as a fraction of the screen width [0..1]. |
||||||
|
* This is useful to create a column of buttons with matching width. |
||||||
|
*/ |
||||||
|
public float minButtonWidth = 0; |
||||||
|
|
||||||
|
/** |
||||||
|
* Padding offset to apply around the character image, in pixels. |
||||||
|
*/ |
||||||
|
public RectOffset imagePadding; |
||||||
|
|
||||||
|
/** |
||||||
|
* Scale of character image, specified as a fraction of current screen height [0..1]. |
||||||
|
*/ |
||||||
|
public float imageScale = 0.25f; |
||||||
|
|
||||||
|
/** |
||||||
|
* Animation frames for multiple choice time indicator |
||||||
|
*/ |
||||||
|
public Texture2D[] timerAnimation; |
||||||
|
|
||||||
|
/** |
||||||
|
* Scale of timer image, specified as a fraction of current screen height [0..1]. |
||||||
|
*/ |
||||||
|
public float timerScale = 0.2f; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sound effect to play when time indicator advances. |
||||||
|
*/ |
||||||
|
public AudioClip timerSound; |
||||||
|
|
||||||
|
/** |
||||||
|
* Style for dialog box background. |
||||||
|
*/ |
||||||
|
public GUIStyle boxStyle; |
||||||
|
|
||||||
|
/** |
||||||
|
* Style for name text. |
||||||
|
*/ |
||||||
|
public GUIStyle nameTextStyle; |
||||||
|
|
||||||
|
/** |
||||||
|
* Style for say text. |
||||||
|
*/ |
||||||
|
public GUIStyle sayTextStyle; |
||||||
|
|
||||||
|
/** |
||||||
|
* Style for option buttons |
||||||
|
*/ |
||||||
|
public GUIStyle buttonStyle; |
||||||
|
|
||||||
|
/** |
||||||
|
* Allowed states for dialog |
||||||
|
*/ |
||||||
|
public enum DialogMode |
||||||
|
{ |
||||||
|
Idle, |
||||||
|
Writing, |
||||||
|
Waiting |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Current state of dialog |
||||||
|
*/ |
||||||
|
[HideInInspector] |
||||||
|
public DialogMode dialogMode; |
||||||
|
|
||||||
|
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 timeoutDuration; |
||||||
|
Action timeoutAction; |
||||||
|
float timeoutTimer; |
||||||
|
int timeoutAnimationIndex; |
||||||
|
|
||||||
|
string sayText = ""; |
||||||
|
string previousSayText = ""; |
||||||
|
string displayedSayText = ""; |
||||||
|
|
||||||
|
Action deferredAction; |
||||||
|
Action continueAction; |
||||||
|
bool executeAsCommand; |
||||||
|
|
||||||
|
float continueTimer; |
||||||
|
bool instantCompleteText; |
||||||
|
|
||||||
|
GameObject typingAudio; |
||||||
|
|
||||||
|
// Cached versions of scaled style objects |
||||||
|
GUIStyle cachedBoxStyle; |
||||||
|
GUIStyle cachedNameTextStyle; |
||||||
|
GUIStyle cachedSayTextStyle; |
||||||
|
GUIStyle cachedButtonStyle; |
||||||
|
|
||||||
|
void Start() |
||||||
|
{ |
||||||
|
if (!Application.isPlaying) |
||||||
|
{ |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
// Apply resolution independent scaling to styles |
||||||
|
// Cache these so we're not creating lots of new objects every frame |
||||||
|
cachedBoxStyle = ScaleFontSize(boxStyle); |
||||||
|
cachedNameTextStyle = ScaleFontSize(nameTextStyle); |
||||||
|
cachedSayTextStyle = ScaleFontSize(sayTextStyle); |
||||||
|
cachedButtonStyle = ScaleFontSize (buttonStyle); |
||||||
|
} |
||||||
|
|
||||||
|
void Update() |
||||||
|
{ |
||||||
|
writingSpeed = Math.Max(writingSpeed, 0); |
||||||
|
buttonsPerRow = Math.Max(buttonsPerRow, 1); |
||||||
|
minButtonWidth = Mathf.Max(minButtonWidth, 0); |
||||||
|
imageScale = Mathf.Max(imageScale, 0); |
||||||
|
timerScale = Mathf.Max(timerScale, 0); |
||||||
|
layout.size.x = Mathf.Clamp01(layout.size.x); |
||||||
|
layout.size.y = Mathf.Clamp01(layout.size.y); |
||||||
|
layout.offset.x = Mathf.Clamp01(layout.offset.x); |
||||||
|
layout.offset.y = Mathf.Clamp01(layout.offset.y); |
||||||
|
|
||||||
|
if (!Application.isPlaying) |
||||||
|
{ |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
if (continueTimer > 0) |
||||||
|
{ |
||||||
|
continueTimer -= Time.deltaTime; |
||||||
|
continueTimer = Mathf.Max(continueTimer, 0f); |
||||||
|
} |
||||||
|
|
||||||
|
if (sayText.Length == 0) |
||||||
|
{ |
||||||
|
dialogMode = DialogMode.Idle; |
||||||
|
} |
||||||
|
|
||||||
|
// Check if the sayText field has been modified directly. |
||||||
|
// If that has happened, then write the text with no Action |
||||||
|
if (sayText != previousSayText && |
||||||
|
sayText.Length > 0) |
||||||
|
{ |
||||||
|
StopAllCoroutines(); |
||||||
|
Say(sayText, null); |
||||||
|
} |
||||||
|
|
||||||
|
if (timeoutTimer > 0) |
||||||
|
{ |
||||||
|
timeoutTimer -= Time.deltaTime; |
||||||
|
timeoutTimer = Mathf.Max(timeoutTimer, 0f); |
||||||
|
} |
||||||
|
|
||||||
|
if (Application.isEditor) |
||||||
|
{ |
||||||
|
// Live update of GUIStyles when running in editor |
||||||
|
// Not bid deal if we're triggering garbage collection inside editor |
||||||
|
cachedBoxStyle = ScaleFontSize(boxStyle); |
||||||
|
cachedNameTextStyle = ScaleFontSize(nameTextStyle); |
||||||
|
cachedSayTextStyle = ScaleFontSize(sayTextStyle); |
||||||
|
cachedButtonStyle = ScaleFontSize(buttonStyle); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public void Say(string _sayText, Action sayAction) |
||||||
|
{ |
||||||
|
string subbedText = Game.stringTable.SubstituteStrings(_sayText); |
||||||
|
continueAction = sayAction; |
||||||
|
previousSayText = subbedText; |
||||||
|
|
||||||
|
if (timeoutDuration > 0 && |
||||||
|
options.Count > 0) |
||||||
|
{ |
||||||
|
// Activate timeout timer |
||||||
|
timeoutTimer = timeoutDuration; |
||||||
|
} |
||||||
|
|
||||||
|
WriteSayText(subbedText); |
||||||
|
} |
||||||
|
|
||||||
|
void WriteSayText(string _sayText) |
||||||
|
{ |
||||||
|
// Disable quick continue for a short period to prevent accidental taps |
||||||
|
continueTimer = 0.4f; |
||||||
|
instantCompleteText = false; |
||||||
|
|
||||||
|
sayText = _sayText; |
||||||
|
|
||||||
|
// Hack to avoid displaying partial color tag text |
||||||
|
if (_sayText.Contains("<")) |
||||||
|
{ |
||||||
|
displayedSayText = _sayText; |
||||||
|
} |
||||||
|
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 (writingSpeed == 0) |
||||||
|
{ |
||||||
|
displayedSayText = sayText; |
||||||
|
yield break; |
||||||
|
} |
||||||
|
|
||||||
|
if (writingSound != null) |
||||||
|
{ |
||||||
|
typingAudio = new GameObject(); |
||||||
|
typingAudio.AddComponent<AudioSource>(); |
||||||
|
typingAudio.audio.clip = writingSound; |
||||||
|
typingAudio.audio.loop = loopWritingSound; |
||||||
|
typingAudio.audio.Play(); |
||||||
|
} |
||||||
|
|
||||||
|
dialogMode = DialogMode.Writing; |
||||||
|
|
||||||
|
displayedSayText = ""; |
||||||
|
|
||||||
|
// Make one character visible at a time |
||||||
|
float writeDelay = (1f / (float)writingSpeed); |
||||||
|
float timeAccumulator = 0f; |
||||||
|
int i = 0; |
||||||
|
|
||||||
|
while (true) |
||||||
|
{ |
||||||
|
if (instantCompleteText) |
||||||
|
{ |
||||||
|
instantCompleteText = false; |
||||||
|
displayedSayText = sayText; |
||||||
|
break; |
||||||
|
} |
||||||
|
|
||||||
|
timeAccumulator += Time.deltaTime; |
||||||
|
|
||||||
|
while (timeAccumulator > writeDelay) |
||||||
|
{ |
||||||
|
i++; |
||||||
|
timeAccumulator -= writeDelay; |
||||||
|
} |
||||||
|
|
||||||
|
if (i >= sayText.Length) |
||||||
|
{ |
||||||
|
displayedSayText = sayText; |
||||||
|
break; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
string left = sayText.Substring(0, i + 1); |
||||||
|
string right = sayText.Substring(i + 1); |
||||||
|
|
||||||
|
displayedSayText = left; |
||||||
|
displayedSayText += "<color=#FFFFFF00>"; |
||||||
|
displayedSayText += right; |
||||||
|
displayedSayText += "</color>"; |
||||||
|
} |
||||||
|
|
||||||
|
yield return null; |
||||||
|
} |
||||||
|
|
||||||
|
dialogMode = DialogMode.Waiting; |
||||||
|
|
||||||
|
if (typingAudio != null) |
||||||
|
{ |
||||||
|
Destroy(typingAudio); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
GUIStyle ScaleFontSize(GUIStyle style) |
||||||
|
{ |
||||||
|
GUIStyle styleCopy = new GUIStyle(style); |
||||||
|
styleCopy.fontSize = Mathf.RoundToInt(styleCopy.fontSize * ((float)Screen.height / 768f)); |
||||||
|
return styleCopy; |
||||||
|
} |
||||||
|
|
||||||
|
public void ClearOptions() |
||||||
|
{ |
||||||
|
options.Clear(); |
||||||
|
} |
||||||
|
|
||||||
|
public void AddOption(string optionText, Action optionAction) |
||||||
|
{ |
||||||
|
string subbedText = Game.stringTable.FormatLinkText(Game.stringTable.SubstituteStrings(optionText)); |
||||||
|
options.Add(new Option(subbedText, optionAction)); |
||||||
|
} |
||||||
|
|
||||||
|
public void SetTimeout(float _timeoutDuration, Action _timeoutAction) |
||||||
|
{ |
||||||
|
timeoutDuration = _timeoutDuration; |
||||||
|
timeoutAction = _timeoutAction; |
||||||
|
} |
||||||
|
|
||||||
|
public void SetCharacter(string characterID) |
||||||
|
{ |
||||||
|
for (int i = 0; i < characters.Length; ++i) |
||||||
|
{ |
||||||
|
if (characters[i].characterID == characterID) |
||||||
|
{ |
||||||
|
activeCharacter = i; |
||||||
|
return; |
||||||
|
} |
||||||
|
} |
||||||
|
Debug.Log ("Failed to find character ID " + characterID); |
||||||
|
} |
||||||
|
|
||||||
|
public virtual void OnGUI() |
||||||
|
{ |
||||||
|
if (!Application.isPlaying || |
||||||
|
dialogMode == DialogMode.Idle || |
||||||
|
characters.Length == 0 || |
||||||
|
activeCharacter >= characters.Length) |
||||||
|
{ |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
Rect areaRect = new Rect(layout.offset.x * Screen.width, layout.offset.y * Screen.height, Screen.width, Screen.height); |
||||||
|
Rect sideImageRect = new Rect(); |
||||||
|
Rect dialogRect = new Rect(); |
||||||
|
|
||||||
|
Character character = characters[activeCharacter]; |
||||||
|
|
||||||
|
GUILayout.BeginArea(areaRect); |
||||||
|
{ |
||||||
|
if (layout.topSpace) |
||||||
|
{ |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
|
||||||
|
GUILayout.BeginHorizontal(); |
||||||
|
{ |
||||||
|
if (layout.leftSpace) |
||||||
|
{ |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
|
||||||
|
GUILayout.BeginHorizontal(cachedBoxStyle, GUILayout.MinWidth(Screen.width * layout.size.x), GUILayout.MinHeight(Screen.height * layout.size.y)); |
||||||
|
{ |
||||||
|
if (character.imageSide == Character.ImageSide.Left && |
||||||
|
character.image != null) |
||||||
|
{ |
||||||
|
// Reserve a rect for the side image based on the current screen height and imageScale |
||||||
|
float sideImageHeight = Screen.height * imageScale; |
||||||
|
float sideImageWidth = (sideImageHeight / character.image.height) * character.image.width; |
||||||
|
float w = sideImageWidth + imagePadding.left + imagePadding.right; |
||||||
|
float h = sideImageHeight + imagePadding.top + imagePadding.bottom; |
||||||
|
sideImageRect = GUILayoutUtility.GetRect(w, h, GUILayout.Width(w), GUILayout.Height(h)); |
||||||
|
} |
||||||
|
else if (character.imageSide == Character.ImageSide.Right) |
||||||
|
{ |
||||||
|
DrawTimer(); |
||||||
|
} |
||||||
|
|
||||||
|
GUILayout.BeginVertical(GUILayout.ExpandWidth(false)); |
||||||
|
{ |
||||||
|
if (character.name.Length > 0) |
||||||
|
{ |
||||||
|
cachedNameTextStyle.normal.textColor = character.nameColor; |
||||||
|
GUILayout.Label(new GUIContent(character.name), cachedNameTextStyle); |
||||||
|
} |
||||||
|
|
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
|
||||||
|
GUILayout.Label(new GUIContent(displayedSayText), cachedSayTextStyle); |
||||||
|
|
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
|
||||||
|
// Show buttons for player options, or the continue icon if there are no options |
||||||
|
if (options.Count > 0) |
||||||
|
{ |
||||||
|
GUILayout.BeginHorizontal(); |
||||||
|
{ |
||||||
|
GUILayout.BeginVertical(); |
||||||
|
{ |
||||||
|
int buttonCount = 0; |
||||||
|
for (int i = 0; i < options.Count; ++i) |
||||||
|
{ |
||||||
|
if (buttonCount == 0) |
||||||
|
{ |
||||||
|
GUILayout.BeginHorizontal(); |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
buttonCount++; |
||||||
|
|
||||||
|
if (GUILayout.Button(options[i].optionText, cachedButtonStyle, GUILayout.MinWidth(Screen.width * minButtonWidth))) |
||||||
|
{ |
||||||
|
if (options[i].optionAction == null) |
||||||
|
{ |
||||||
|
deferredAction = DoNullAction; |
||||||
|
executeAsCommand = false; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
deferredAction = options[i].optionAction; |
||||||
|
executeAsCommand = true; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (buttonCount == buttonsPerRow || |
||||||
|
i == options.Count - 1) |
||||||
|
{ |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
GUILayout.EndHorizontal(); |
||||||
|
buttonCount = 0; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
GUILayout.EndVertical(); |
||||||
|
} |
||||||
|
GUILayout.EndHorizontal(); |
||||||
|
} |
||||||
|
else if (continueIcon != null) |
||||||
|
{ |
||||||
|
GUILayout.BeginHorizontal(); |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
|
||||||
|
Rect continueButtonRect = GUILayoutUtility.GetRect(continueIcon.width, |
||||||
|
continueIcon.height, |
||||||
|
GUILayout.MaxWidth(continueIcon.width), |
||||||
|
GUILayout.MaxHeight(continueIcon.height)); |
||||||
|
|
||||||
|
|
||||||
|
if (dialogMode == DialogMode.Waiting) |
||||||
|
{ |
||||||
|
continueButtonRect.y += Mathf.Sin(Time.timeSinceLevelLoad * 15f) * (float)(continueIcon.height * 0.2f); |
||||||
|
GUI.DrawTexture(continueButtonRect, continueIcon); |
||||||
|
} |
||||||
|
|
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
GUILayout.EndHorizontal(); |
||||||
|
} |
||||||
|
|
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
GUILayout.EndVertical(); |
||||||
|
|
||||||
|
if (character.imageSide == Character.ImageSide.Right && |
||||||
|
character.image != null) |
||||||
|
{ |
||||||
|
// Reserve a rect for the side image based on the current screen height and imageScale |
||||||
|
float sideImageHeight = Screen.height * imageScale; |
||||||
|
float sideImageWidth = (sideImageHeight / character.image.height) * character.image.width; |
||||||
|
float w = sideImageWidth + imagePadding.left + imagePadding.right; |
||||||
|
float h = sideImageHeight + imagePadding.top + imagePadding.bottom; |
||||||
|
sideImageRect = GUILayoutUtility.GetRect(w, h, GUILayout.Width(w), GUILayout.Height(h)); |
||||||
|
} |
||||||
|
else if (character.imageSide == Character.ImageSide.Left) |
||||||
|
{ |
||||||
|
DrawTimer(); |
||||||
|
} |
||||||
|
} |
||||||
|
GUILayout.EndHorizontal(); |
||||||
|
|
||||||
|
// Get rect of dialog for testing mouse hit later on |
||||||
|
dialogRect = GUILayoutUtility.GetLastRect(); |
||||||
|
|
||||||
|
if (layout.rightSpace) |
||||||
|
{ |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
} |
||||||
|
GUILayout.EndHorizontal(); |
||||||
|
|
||||||
|
if (layout.bottomSpace) |
||||||
|
{ |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
} |
||||||
|
GUILayout.EndArea(); |
||||||
|
|
||||||
|
if (character.image != null) |
||||||
|
{ |
||||||
|
// Adjust side image rect based on aspect ratio of the image. |
||||||
|
float sideImageHeight = character.image.height * ((sideImageRect.width - imagePadding.left - imagePadding.right) / character.image.width); |
||||||
|
sideImageRect.yMax = sideImageRect.yMin + sideImageHeight + imagePadding.bottom + imagePadding.top; |
||||||
|
sideImageRect = imagePadding.Remove(sideImageRect); |
||||||
|
|
||||||
|
// Adjust rect based on layout offset |
||||||
|
sideImageRect.x += areaRect.x; |
||||||
|
sideImageRect.y += areaRect.y; |
||||||
|
|
||||||
|
// Draw side image |
||||||
|
GUI.DrawTexture(sideImageRect, character.image); |
||||||
|
} |
||||||
|
|
||||||
|
bool clickedOnDialog = (Input.GetMouseButtonUp(0) && dialogRect.Contains(Event.current.mousePosition)); |
||||||
|
|
||||||
|
if (dialogMode == DialogMode.Writing) |
||||||
|
{ |
||||||
|
if (clickedOnDialog || Input.GetKeyUp("space")) |
||||||
|
{ |
||||||
|
instantCompleteText = true; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (dialogMode == DialogMode.Waiting) |
||||||
|
{ |
||||||
|
// Player can continue by clicking anywhere |
||||||
|
if (options.Count == 0 && |
||||||
|
continueTimer == 0 && |
||||||
|
(clickedOnDialog || Input.GetKeyUp("space"))) |
||||||
|
{ |
||||||
|
if (continueSound != null) |
||||||
|
{ |
||||||
|
AudioSource.PlayClipAtPoint(continueSound, new Vector3()); |
||||||
|
} |
||||||
|
|
||||||
|
if (continueAction == null) |
||||||
|
{ |
||||||
|
deferredAction = DoNullAction; |
||||||
|
executeAsCommand = false; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
deferredAction = continueAction; |
||||||
|
executeAsCommand = false; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Check if timeout timer has expired |
||||||
|
if (options.Count > 0 && |
||||||
|
timeoutDuration > 0 && |
||||||
|
timeoutTimer == 0) |
||||||
|
{ |
||||||
|
deferredAction = timeoutAction; |
||||||
|
executeAsCommand = true; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Execute any deferred actions on the last call to OnGUI |
||||||
|
if (Event.current.type == EventType.Repaint) |
||||||
|
{ |
||||||
|
if (deferredAction != null) |
||||||
|
{ |
||||||
|
Action tempAction = deferredAction; |
||||||
|
|
||||||
|
displayedSayText = ""; |
||||||
|
sayText = ""; |
||||||
|
deferredAction = null; |
||||||
|
dialogMode = DialogMode.Idle; |
||||||
|
ClearOptions(); |
||||||
|
timeoutAction = null; |
||||||
|
timeoutDuration = 0; |
||||||
|
timeoutTimer = 0; |
||||||
|
timeoutAnimationIndex = 0; |
||||||
|
|
||||||
|
if (executeAsCommand) |
||||||
|
{ |
||||||
|
executeAsCommand = false; |
||||||
|
|
||||||
|
// Execute next command |
||||||
|
CommandQueue commandQueue = Game.GetInstance().commandQueue; |
||||||
|
commandQueue.CallCommandMethod(tempAction); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
tempAction(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void DrawTimer() |
||||||
|
{ |
||||||
|
if (timeoutTimer > 0 && |
||||||
|
timerAnimation.Length > 0) |
||||||
|
{ |
||||||
|
GUILayout.BeginHorizontal(); |
||||||
|
{ |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
|
||||||
|
GUILayout.BeginVertical(); |
||||||
|
{ |
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
|
||||||
|
float t = 1f - timeoutTimer / timeoutDuration; |
||||||
|
int index = Mathf.RoundToInt(Mathf.Lerp(0, timerAnimation.Length - 1, t)); |
||||||
|
|
||||||
|
// Play a sound effect for each animation frame |
||||||
|
if (timeoutAnimationIndex != index && |
||||||
|
timerSound != null) |
||||||
|
{ |
||||||
|
AudioSource.PlayClipAtPoint(timerSound, Vector3.zero); |
||||||
|
} |
||||||
|
|
||||||
|
timeoutAnimationIndex = index; |
||||||
|
|
||||||
|
float height = Screen.height * timerScale; |
||||||
|
GUILayout.Box(timerAnimation[timeoutAnimationIndex], new GUIStyle(), GUILayout.Height(height)); |
||||||
|
|
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
GUILayout.EndVertical(); |
||||||
|
|
||||||
|
GUILayout.FlexibleSpace(); |
||||||
|
} |
||||||
|
GUILayout.EndHorizontal(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void DoNullAction() |
||||||
|
{} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: d5fe4de5a03e34488bb65c75039a328d |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
Before Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 396 B |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 363331a570f304a599a78d96cb27ef9c |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 0975349aaf3674f38871e243a020e7f6 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 5.2 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: eb694ae0efdbf4249b07f412f75eac36 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 5.5 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 25ad45ce587f8477eb40ee585c3d9bd7 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
Before Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 27 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 448e1c099245748b0b678d7459c7fd9e |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 5.2 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: a9d1d81f685ad4f6187e8fbc9741c0f7 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 5.1 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: dfc218f95e17b40aebd7098a43eadb1c |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
@ -0,0 +1,5 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 365ec981102f744e7aadd03229567f5c |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
userData: |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 5f7ee045af2534886a16662db3f7006d |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ac73b583dc1504c6491a325836ad94b1 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 555662858b0934b0190253d207e5307c |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ec79ba3732a0a4a97b4a76a6c17553ff |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ea73cab89b59b4f9f8041f7e9cd1c67c |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 99864c2132a774486ad645356b9eb3e6 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: dfab90fb1315749dc846d15b6abd2a77 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 94135642b514c40af8c9f51c76a5f8f2 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 0b4a9c44132cf4a748b257b3c72fa778 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,46 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 48617ec39d5af466b9b5bda1ec6c5fc0 |
||||||
|
TextureImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
mipmaps: |
||||||
|
mipMapMode: 0 |
||||||
|
enableMipMap: 0 |
||||||
|
linearTexture: 1 |
||||||
|
correctGamma: 0 |
||||||
|
fadeOut: 0 |
||||||
|
borderMipMap: 0 |
||||||
|
mipMapFadeDistanceStart: 1 |
||||||
|
mipMapFadeDistanceEnd: 3 |
||||||
|
bumpmap: |
||||||
|
convertToNormalMap: 0 |
||||||
|
externalNormalMap: 0 |
||||||
|
heightScale: .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: 0 |
||||||
|
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: 2 |
||||||
|
buildTargetSettings: [] |
||||||
|
spriteSheet: |
||||||
|
sprites: [] |
||||||
|
spritePackingTag: |
||||||
|
userData: |
@ -1,2 +1,8 @@ |
|||||||
The Swipe.png icon uses a Creative Commons license. |
Creative Commons Attribution |
||||||
See http://www.icons8.com/ for more information. |
============================ |
||||||
|
|
||||||
|
Swipe and Continue icons by icons8 |
||||||
|
http://www.icons8.com/ |
||||||
|
|
||||||
|
Buttons by BrightRetro |
||||||
|
http://opengameart.org/content/various-gui-elements-part-2 |
||||||
|