Browse Source

Refactored Narrative scripts to use protected fields with public property accessors

master
Christopher 9 years ago
parent
commit
9ead74d659
  1. 6
      Assets/Fungus/Lua/Scripts/LuaExtensions.cs
  2. 12
      Assets/Fungus/Narrative/Editor/CharacterEditor.cs
  3. 6
      Assets/Fungus/Narrative/Editor/LocalizationEditor.cs
  4. 98
      Assets/Fungus/Narrative/Editor/PortraitEditor.cs
  5. 28
      Assets/Fungus/Narrative/Editor/SayEditor.cs
  6. 14
      Assets/Fungus/Narrative/Editor/StageEditor.cs
  7. 40
      Assets/Fungus/Narrative/Scripts/Character.cs
  8. 2
      Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs
  9. 26
      Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs
  10. 4
      Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs
  11. 4
      Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs
  12. 12
      Assets/Fungus/Narrative/Scripts/Commands/Menu.cs
  13. 4
      Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs
  14. 66
      Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs
  15. 44
      Assets/Fungus/Narrative/Scripts/Commands/Say.cs
  16. 2
      Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs
  17. 2
      Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs
  18. 2
      Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs
  19. 14
      Assets/Fungus/Narrative/Scripts/ConversationManager.cs
  20. 21
      Assets/Fungus/Narrative/Scripts/CustomTag.cs
  21. 8
      Assets/Fungus/Narrative/Scripts/DialogInput.cs
  22. 13
      Assets/Fungus/Narrative/Scripts/Localization.cs
  23. 12
      Assets/Fungus/Narrative/Scripts/MenuDialog.cs
  24. 134
      Assets/Fungus/Narrative/Scripts/PortraitController.cs
  25. 43
      Assets/Fungus/Narrative/Scripts/SayDialog.cs
  26. 51
      Assets/Fungus/Narrative/Scripts/Stage.cs
  27. 390
      Assets/Tests/Localisation/LocalisationTests.unity
  28. 12
      Assets/Tests/Narrative/NarrativeTests.cs
  29. 118
      Assets/Tests/Narrative/NarrativeTests.unity
  30. 16
      Assets/Tests/Narrative/OverlapTests.cs
  31. 24
      ProjectSettings/GraphicsSettings.asset

6
Assets/Fungus/Lua/Scripts/LuaExtensions.cs

@ -26,7 +26,7 @@ namespace Fungus
} }
bool addedOption = false; bool addedOption = false;
foreach (Button button in menuDialog.cachedButtons) foreach (Button button in menuDialog.CachedButtons)
{ {
if (!button.gameObject.activeSelf) if (!button.gameObject.activeSelf)
{ {
@ -65,13 +65,13 @@ namespace Fungus
/// </summary> /// </summary>
public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, LuaEnvironment luaEnvironment, Closure callBack) public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, LuaEnvironment luaEnvironment, Closure callBack)
{ {
if (menuDialog.cachedSlider == null || if (menuDialog.CachedSlider == null ||
duration <= 0f) duration <= 0f)
{ {
yield break; yield break;
} }
menuDialog.cachedSlider.gameObject.SetActive(true); menuDialog.CachedSlider.gameObject.SetActive(true);
menuDialog.StopAllCoroutines(); menuDialog.StopAllCoroutines();
float elapsedTime = 0; float elapsedTime = 0;

12
Assets/Fungus/Narrative/Editor/CharacterEditor.cs

@ -46,19 +46,19 @@ namespace Fungus
EditorGUILayout.PropertyField(setSayDialogProp); EditorGUILayout.PropertyField(setSayDialogProp);
EditorGUILayout.PropertyField(descriptionProp, new GUIContent("Description", "Notes about this story character (personality, attibutes, etc.)")); EditorGUILayout.PropertyField(descriptionProp, new GUIContent("Description", "Notes about this story character (personality, attibutes, etc.)"));
if (t.portraits != null && if (t.Portraits != null &&
t.portraits.Count > 0) t.Portraits.Count > 0)
{ {
t.profileSprite = t.portraits[0]; t.ProfileSprite = t.Portraits[0];
} }
else else
{ {
t.profileSprite = null; t.ProfileSprite = null;
} }
if (t.profileSprite != null) if (t.ProfileSprite != null)
{ {
Texture2D characterTexture = t.profileSprite.texture; Texture2D characterTexture = t.ProfileSprite.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height; float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
if (characterTexture != null) if (characterTexture != null)

6
Assets/Fungus/Narrative/Editor/LocalizationEditor.cs

@ -78,7 +78,7 @@ namespace Fungus
TextAsset textAsset = AssetDatabase.LoadAssetAtPath(path, typeof(TextAsset)) as TextAsset; TextAsset textAsset = AssetDatabase.LoadAssetAtPath(path, typeof(TextAsset)) as TextAsset;
if (textAsset != null) if (textAsset != null)
{ {
localization.localizationFile = textAsset; localization.LocalizationFile = textAsset;
} }
ShowNotification(localization); ShowNotification(localization);
@ -119,8 +119,8 @@ namespace Fungus
protected virtual void ShowNotification(Localization localization) protected virtual void ShowNotification(Localization localization)
{ {
FlowchartWindow.ShowNotification(localization.notificationText); FlowchartWindow.ShowNotification(localization.NotificationText);
localization.notificationText = ""; localization.NotificationText = "";
} }
} }

98
Assets/Fungus/Narrative/Editor/PortraitEditor.cs

@ -75,14 +75,14 @@ namespace Fungus
} }
else else
{ {
t.stage = null; t._Stage = null;
} }
// Format Enum names // Format Enum names
string[] displayLabels = StringFormatter.FormatEnumNames(t.display,"<None>"); string[] displayLabels = StringFormatter.FormatEnumNames(t.Display,"<None>");
displayProp.enumValueIndex = EditorGUILayout.Popup("Display", (int)displayProp.enumValueIndex, displayLabels); displayProp.enumValueIndex = EditorGUILayout.Popup("Display", (int)displayProp.enumValueIndex, displayLabels);
string characterLabel = "Character"; string characterLabel = "Character";
if (t.display == DisplayType.Replace) if (t.Display == DisplayType.Replace)
{ {
CommandEditor.ObjectField<Character>(replacedCharacterProp, CommandEditor.ObjectField<Character>(replacedCharacterProp,
new GUIContent("Replace", "Character to replace"), new GUIContent("Replace", "Character to replace"),
@ -97,19 +97,19 @@ namespace Fungus
Character.activeCharacters); Character.activeCharacters);
bool showOptionalFields = true; bool showOptionalFields = true;
Stage s = t.stage; Stage s = t._Stage;
// Only show optional portrait fields once required fields have been filled... // Only show optional portrait fields once required fields have been filled...
if (t.character != null) // Character is selected if (t._Character != null) // Character is selected
{ {
if (t.character.portraits == null || // Character has a portraits field if (t._Character.Portraits == null || // Character has a portraits field
t.character.portraits.Count <= 0 ) // Character has at least one portrait t._Character.Portraits.Count <= 0 ) // Character has at least one portrait
{ {
EditorGUILayout.HelpBox("This character has no portraits. Please add portraits to the character's prefab before using this command.", MessageType.Error); EditorGUILayout.HelpBox("This character has no portraits. Please add portraits to the character's prefab before using this command.", MessageType.Error);
showOptionalFields = false; showOptionalFields = false;
} }
if (t.stage == null) // If default portrait stage selected if (t._Stage == null) // If default portrait stage selected
{ {
if (t.stage == null) // If no default specified, try to get any portrait stage in the scene if (t._Stage == null) // If no default specified, try to get any portrait stage in the scene
{ {
s = GameObject.FindObjectOfType<Stage>(); s = GameObject.FindObjectOfType<Stage>();
} }
@ -120,16 +120,16 @@ namespace Fungus
showOptionalFields = false; showOptionalFields = false;
} }
} }
if (t.display != DisplayType.None && t.character != null && showOptionalFields) if (t.Display != DisplayType.None && t._Character != null && showOptionalFields)
{ {
if (t.display != DisplayType.Hide && t.display != DisplayType.MoveToFront) if (t.Display != DisplayType.Hide && t.Display != DisplayType.MoveToFront)
{ {
// PORTRAIT // PORTRAIT
CommandEditor.ObjectField<Sprite>(portraitProp, CommandEditor.ObjectField<Sprite>(portraitProp,
new GUIContent("Portrait", "Portrait representing character"), new GUIContent("Portrait", "Portrait representing character"),
new GUIContent("<Previous>"), new GUIContent("<Previous>"),
t.character.portraits); t._Character.Portraits);
if (t.character.portraitsFace != FacingDirection.None) if (t._Character.PortraitsFace != FacingDirection.None)
{ {
// FACING // FACING
// Display the values of the facing enum as <-- and --> arrows to avoid confusion with position field // Display the values of the facing enum as <-- and --> arrows to avoid confusion with position field
@ -143,91 +143,91 @@ namespace Fungus
} }
else else
{ {
t.facing = FacingDirection.None; t.Facing = FacingDirection.None;
} }
} }
else else
{ {
t.portrait = null; t._Portrait = null;
t.facing = FacingDirection.None; t.Facing = FacingDirection.None;
} }
string toPositionPrefix = ""; string toPositionPrefix = "";
if (t.move) if (t.Move)
{ {
// MOVE // MOVE
EditorGUILayout.PropertyField(moveProp); EditorGUILayout.PropertyField(moveProp);
} }
if (t.move) if (t.Move)
{ {
if (t.display != DisplayType.Hide) if (t.Display != DisplayType.Hide)
{ {
// START FROM OFFSET // START FROM OFFSET
EditorGUILayout.PropertyField(shiftIntoPlaceProp); EditorGUILayout.PropertyField(shiftIntoPlaceProp);
} }
} }
if (t.move) if (t.Move)
{ {
if (t.display != DisplayType.Hide) if (t.Display != DisplayType.Hide)
{ {
if (t.shiftIntoPlace) if (t.ShiftIntoPlace)
{ {
t.fromPosition = null; t.FromPosition = null;
// OFFSET // OFFSET
// Format Enum names // Format Enum names
string[] offsetLabels = StringFormatter.FormatEnumNames(t.offset,"<Previous>"); string[] offsetLabels = StringFormatter.FormatEnumNames(t.Offset,"<Previous>");
offsetProp.enumValueIndex = EditorGUILayout.Popup("From Offset", (int)offsetProp.enumValueIndex, offsetLabels); offsetProp.enumValueIndex = EditorGUILayout.Popup("From Offset", (int)offsetProp.enumValueIndex, offsetLabels);
} }
else else
{ {
t.offset = PositionOffset.None; t.Offset = PositionOffset.None;
// FROM POSITION // FROM POSITION
CommandEditor.ObjectField<RectTransform>(fromPositionProp, CommandEditor.ObjectField<RectTransform>(fromPositionProp,
new GUIContent("From Position", "Move the portrait to this position"), new GUIContent("From Position", "Move the portrait to this position"),
new GUIContent("<Previous>"), new GUIContent("<Previous>"),
s.positions); s.Positions);
} }
} }
toPositionPrefix = "To "; toPositionPrefix = "To ";
} }
else else
{ {
t.shiftIntoPlace = false; t.ShiftIntoPlace = false;
t.fromPosition = null; t.FromPosition = null;
toPositionPrefix = "At "; toPositionPrefix = "At ";
} }
if (t.display == DisplayType.Show || (t.display == DisplayType.Hide && t.move) ) if (t.Display == DisplayType.Show || (t.Display == DisplayType.Hide && t.Move) )
{ {
// TO POSITION // TO POSITION
CommandEditor.ObjectField<RectTransform>(toPositionProp, CommandEditor.ObjectField<RectTransform>(toPositionProp,
new GUIContent(toPositionPrefix+"Position", "Move the portrait to this position"), new GUIContent(toPositionPrefix+"Position", "Move the portrait to this position"),
new GUIContent("<Previous>"), new GUIContent("<Previous>"),
s.positions); s.Positions);
} }
else else
{ {
t.toPosition = null; t.ToPosition = null;
} }
if (!t.move && t.display != DisplayType.MoveToFront) if (!t.Move && t.Display != DisplayType.MoveToFront)
{ {
// MOVE // MOVE
EditorGUILayout.PropertyField(moveProp); EditorGUILayout.PropertyField(moveProp);
} }
if (t.display != DisplayType.MoveToFront) if (t.Display != DisplayType.MoveToFront)
{ {
EditorGUILayout.Separator(); EditorGUILayout.Separator();
// USE DEFAULT SETTINGS // USE DEFAULT SETTINGS
EditorGUILayout.PropertyField(useDefaultSettingsProp); EditorGUILayout.PropertyField(useDefaultSettingsProp);
if (!t.useDefaultSettings) { if (!t.UseDefaultSettings) {
// FADE DURATION // FADE DURATION
EditorGUILayout.PropertyField(fadeDurationProp); EditorGUILayout.PropertyField(fadeDurationProp);
if (t.move) if (t.Move)
{ {
// MOVE SPEED // MOVE SPEED
EditorGUILayout.PropertyField(moveDurationProp); EditorGUILayout.PropertyField(moveDurationProp);
} }
if (t.shiftIntoPlace) if (t.ShiftIntoPlace)
{ {
// SHIFT OFFSET // SHIFT OFFSET
EditorGUILayout.PropertyField(shiftOffsetProp); EditorGUILayout.PropertyField(shiftOffsetProp);
@ -236,17 +236,17 @@ namespace Fungus
} }
else else
{ {
t.move = false; t.Move = false;
t.useDefaultSettings = true; t.UseDefaultSettings = true;
EditorGUILayout.Separator(); EditorGUILayout.Separator();
} }
EditorGUILayout.PropertyField(waitUntilFinishedProp); EditorGUILayout.PropertyField(waitUntilFinishedProp);
if (t.portrait != null && t.display != DisplayType.Hide) if (t._Portrait != null && t.Display != DisplayType.Hide)
{ {
Texture2D characterTexture = t.portrait.texture; Texture2D characterTexture = t._Portrait.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height; float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
@ -257,12 +257,12 @@ namespace Fungus
} }
} }
if (t.display != DisplayType.Hide) if (t.Display != DisplayType.Hide)
{ {
string portraitName = "<Previous>"; string portraitName = "<Previous>";
if (t.portrait != null) if (t._Portrait != null)
{ {
portraitName = t.portrait.name; portraitName = t._Portrait.name;
} }
string portraitSummary = " " + portraitName; string portraitSummary = " " + portraitName;
int toolbarInt = 1; int toolbarInt = 1;
@ -272,8 +272,8 @@ namespace Fungus
if (toolbarInt != 1) if (toolbarInt != 1)
{ {
for(int i=0; i<t.character.portraits.Count; i++){ for(int i=0; i<t._Character.Portraits.Count; i++){
if(portraitName == t.character.portraits[i].name) if(portraitName == t._Character.Portraits[i].name)
{ {
portraitIndex = i; portraitIndex = i;
} }
@ -284,18 +284,18 @@ namespace Fungus
{ {
if(portraitIndex > 0) if(portraitIndex > 0)
{ {
t.portrait = t.character.portraits[--portraitIndex]; t._Portrait = t._Character.Portraits[--portraitIndex];
} }
else else
{ {
t.portrait = null; t._Portrait = null;
} }
} }
if (toolbarInt == 2) if (toolbarInt == 2)
{ {
if(portraitIndex < t.character.portraits.Count-1) if(portraitIndex < t._Character.Portraits.Count-1)
{ {
t.portrait = t.character.portraits[++portraitIndex]; t._Portrait = t._Character.Portraits[++portraitIndex];
} }
} }
} }

28
Assets/Fungus/Narrative/Editor/SayEditor.cs

@ -50,8 +50,8 @@ namespace Fungus
if (parentTag != null) if (parentTag != null)
{ {
tagName = parentTag.name; tagName = parentTag.name;
tagStartSymbol = parentTag.tagStartSymbol; tagStartSymbol = parentTag.TagStartSymbol;
tagEndSymbol = parentTag.tagEndSymbol; tagEndSymbol = parentTag.TagEndSymbol;
} }
tagsText += "\n\n\t" + tagStartSymbol + " " + tagName + " " + tagEndSymbol; tagsText += "\n\n\t" + tagStartSymbol + " " + tagName + " " + tagEndSymbol;
foreach(Transform child in parent) foreach(Transform child in parent)
@ -63,8 +63,8 @@ namespace Fungus
if (childTag != null) if (childTag != null)
{ {
tagName = childTag.name; tagName = childTag.name;
tagStartSymbol = childTag.tagStartSymbol; tagStartSymbol = childTag.TagStartSymbol;
tagEndSymbol = childTag.tagEndSymbol; tagEndSymbol = childTag.TagEndSymbol;
} }
tagsText += "\n\t " + tagStartSymbol + " " + tagName + " " + tagEndSymbol; tagsText += "\n\t " + tagStartSymbol + " " + tagName + " " + tagEndSymbol;
} }
@ -135,9 +135,9 @@ namespace Fungus
Say t = target as Say; Say t = target as Say;
// Only show portrait selection if... // Only show portrait selection if...
if (t.character != null && // Character is selected if (t._Character != null && // Character is selected
t.character.portraits != null && // Character has a portraits field t._Character.Portraits != null && // Character has a portraits field
t.character.portraits.Count > 0 ) // Selected Character has at least 1 portrait t._Character.Portraits.Count > 0 ) // Selected Character has at least 1 portrait
{ {
showPortraits = true; showPortraits = true;
} }
@ -145,15 +145,15 @@ namespace Fungus
if (showPortraits) if (showPortraits)
{ {
CommandEditor.ObjectField<Sprite>(portraitProp, CommandEditor.ObjectField<Sprite>(portraitProp,
new GUIContent("Portrait", "Portrait representing speaking character"), new GUIContent("Portrait", "Portrait representing speaking character"),
new GUIContent("<None>"), new GUIContent("<None>"),
t.character.portraits); t._Character.Portraits);
} }
else else
{ {
if (!t.extendPrevious) if (!t.ExtendPrevious)
{ {
t.portrait = null; t.Portrait = null;
} }
} }
@ -204,9 +204,9 @@ namespace Fungus
EditorGUILayout.PropertyField(stopVoiceoverProp); EditorGUILayout.PropertyField(stopVoiceoverProp);
EditorGUILayout.PropertyField(setSayDialogProp); EditorGUILayout.PropertyField(setSayDialogProp);
if (showPortraits && t.portrait != null) if (showPortraits && t.Portrait != null)
{ {
Texture2D characterTexture = t.portrait.texture; Texture2D characterTexture = t.Portrait.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height; float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
if (characterTexture != null) if (characterTexture != null)

14
Assets/Fungus/Narrative/Editor/StageEditor.cs

@ -47,11 +47,11 @@ namespace Fungus
ControlStage t = target as ControlStage; ControlStage t = target as ControlStage;
// Format Enum names // Format Enum names
string[] displayLabels = StringFormatter.FormatEnumNames(t.display,"<None>"); string[] displayLabels = StringFormatter.FormatEnumNames(t.Display,"<None>");
displayProp.enumValueIndex = EditorGUILayout.Popup("Display", (int)displayProp.enumValueIndex, displayLabels); displayProp.enumValueIndex = EditorGUILayout.Popup("Display", (int)displayProp.enumValueIndex, displayLabels);
string replaceLabel = "Portrait Stage"; string replaceLabel = "Portrait Stage";
if (t.display == StageDisplayType.Swap) if (t.Display == StageDisplayType.Swap)
{ {
CommandEditor.ObjectField<Stage>(replacedStageProp, CommandEditor.ObjectField<Stage>(replacedStageProp,
new GUIContent("Replace", "Character to swap with"), new GUIContent("Replace", "Character to swap with"),
@ -69,11 +69,11 @@ namespace Fungus
} }
bool showOptionalFields = true; bool showOptionalFields = true;
Stage s = t.stage; Stage s = t._Stage;
// Only show optional portrait fields once required fields have been filled... // Only show optional portrait fields once required fields have been filled...
if (t.stage != null) // Character is selected if (t._Stage != null) // Character is selected
{ {
if (t.stage == null) // If no default specified, try to get any portrait stage in the scene if (t._Stage == null) // If no default specified, try to get any portrait stage in the scene
{ {
s = GameObject.FindObjectOfType<Stage>(); s = GameObject.FindObjectOfType<Stage>();
} }
@ -83,10 +83,10 @@ namespace Fungus
showOptionalFields = false; showOptionalFields = false;
} }
} }
if (t.display != StageDisplayType.None && showOptionalFields) if (t.Display != StageDisplayType.None && showOptionalFields)
{ {
EditorGUILayout.PropertyField(useDefaultSettingsProp); EditorGUILayout.PropertyField(useDefaultSettingsProp);
if (!t.useDefaultSettings) if (!t.UseDefaultSettings)
{ {
EditorGUILayout.PropertyField(fadeDurationProp); EditorGUILayout.PropertyField(fadeDurationProp);
} }

40
Assets/Fungus/Narrative/Scripts/Character.cs

@ -15,20 +15,42 @@ namespace Fungus
[ExecuteInEditMode] [ExecuteInEditMode]
public class Character : MonoBehaviour, ILocalizable public class Character : MonoBehaviour, ILocalizable
{ {
public string nameText; // We need a separate name as the object name is used for character variations (e.g. "Smurf Happy", "Smurf Sad") [SerializeField] protected string nameText; // We need a separate name as the object name is used for character variations (e.g. "Smurf Happy", "Smurf Sad")
public Color nameColor = Color.white;
public AudioClip soundEffect; public string NameText { get { return nameText; } }
public Sprite profileSprite;
public List<Sprite> portraits; [SerializeField] protected Color nameColor = Color.white;
public FacingDirection portraitsFace;
public PortraitState state = new PortraitState(); public Color NameColor { get { return nameColor; } }
[SerializeField] protected AudioClip soundEffect;
public AudioClip SoundEffect { get { return soundEffect; } }
[SerializeField] protected Sprite profileSprite;
public Sprite ProfileSprite { get { return profileSprite; } set { profileSprite = value; } }
[SerializeField] protected List<Sprite> portraits;
public List<Sprite> Portraits { get { return portraits; } }
[SerializeField] protected FacingDirection portraitsFace;
public FacingDirection PortraitsFace { get { return portraitsFace; } }
[SerializeField] protected PortraitState state = new PortraitState();
public PortraitState State { get { return state; } }
[Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")] [Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")]
public SayDialog setSayDialog; [SerializeField] protected SayDialog setSayDialog;
public SayDialog SetSayDialog { get { return setSayDialog; } }
[FormerlySerializedAs("notes")] [FormerlySerializedAs("notes")]
[TextArea(5,10)] [TextArea(5,10)]
public string description; [SerializeField] protected string description;
static public List<Character> activeCharacters = new List<Character>(); static public List<Character> activeCharacters = new List<Character>();

2
Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs

@ -15,7 +15,7 @@ namespace Fungus
public class ClearMenu : Command public class ClearMenu : Command
{ {
[Tooltip("Menu Dialog to clear the options on")] [Tooltip("Menu Dialog to clear the options on")]
public MenuDialog menuDialog; [SerializeField] protected MenuDialog menuDialog;
public override void OnEnter() public override void OnEnter()
{ {

26
Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs

@ -29,19 +29,23 @@ namespace Fungus
public class ControlStage : ControlWithDisplay<StageDisplayType> public class ControlStage : ControlWithDisplay<StageDisplayType>
{ {
[Tooltip("Stage to display characters on")] [Tooltip("Stage to display characters on")]
public Stage stage; [SerializeField] protected Stage stage;
public Stage _Stage { get { return stage; } }
[Tooltip("Stage to swap with")] [Tooltip("Stage to swap with")]
public Stage replacedStage; [SerializeField] protected Stage replacedStage;
[Tooltip("Use Default Settings")] [Tooltip("Use Default Settings")]
public bool useDefaultSettings = true; [SerializeField] protected bool useDefaultSettings = true;
public bool UseDefaultSettings { get { return useDefaultSettings; } }
[Tooltip("Fade Duration")] [Tooltip("Fade Duration")]
public float fadeDuration; [SerializeField] protected float fadeDuration;
[Tooltip("Wait until the tween has finished before executing the next command")] [Tooltip("Wait until the tween has finished before executing the next command")]
public bool waitUntilFinished = false; [SerializeField] protected bool waitUntilFinished = false;
public override void OnEnter() public override void OnEnter()
{ {
@ -83,7 +87,7 @@ namespace Fungus
// Use default settings // Use default settings
if (useDefaultSettings) if (useDefaultSettings)
{ {
fadeDuration = stage.fadeDuration; fadeDuration = stage.FadeDuration;
} }
switch(display) switch(display)
{ {
@ -139,19 +143,19 @@ namespace Fungus
{ {
if (s == stage) if (s == stage)
{ {
s.portraitCanvas.sortingOrder = 1; s.PortraitCanvas.sortingOrder = 1;
} }
else else
{ {
s.portraitCanvas.sortingOrder = 0; s.PortraitCanvas.sortingOrder = 0;
} }
} }
} }
protected void UndimAllPortraits(Stage stage) protected void UndimAllPortraits(Stage stage)
{ {
stage.dimPortraits = false; stage.DimPortraits = false;
foreach (Character character in stage.charactersOnStage) foreach (Character character in stage.CharactersOnStage)
{ {
stage.SetDimmed(character, false); stage.SetDimmed(character, false);
} }
@ -159,7 +163,7 @@ namespace Fungus
protected void DimNonSpeakingPortraits(Stage stage) protected void DimNonSpeakingPortraits(Stage stage)
{ {
stage.dimPortraits = true; stage.DimPortraits = true;
} }
protected void OnComplete() protected void OnComplete()

4
Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs

@ -11,7 +11,9 @@ namespace Fungus
public class ControlWithDisplay<TDisplayEnum> : Command public class ControlWithDisplay<TDisplayEnum> : Command
{ {
[Tooltip("Display type")] [Tooltip("Display type")]
public TDisplayEnum display; [SerializeField] protected TDisplayEnum display;
public TDisplayEnum Display { get { return display; } }
protected bool IsDisplayNone<TEnum>(TEnum enumValue) protected bool IsDisplayNone<TEnum>(TEnum enumValue)
{ {

4
Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs

@ -16,9 +16,9 @@ namespace Fungus
[ExecuteInEditMode] [ExecuteInEditMode]
public class Conversation : Command public class Conversation : Command
{ {
public StringDataMulti conversationText; [SerializeField] protected StringDataMulti conversationText;
public ConversationManager conversationManager = new ConversationManager(); protected ConversationManager conversationManager = new ConversationManager();
protected virtual void Start() protected virtual void Start()
{ {

12
Assets/Fungus/Narrative/Scripts/Commands/Menu.cs

@ -18,23 +18,23 @@ namespace Fungus
public class Menu : Command, ILocalizable public class Menu : Command, ILocalizable
{ {
[Tooltip("Text to display on the menu button")] [Tooltip("Text to display on the menu button")]
public string text = "Option Text"; [SerializeField] protected string text = "Option Text";
[Tooltip("Notes about the option text for other authors, localization, etc.")] [Tooltip("Notes about the option text for other authors, localization, etc.")]
public string description = ""; [SerializeField] protected string description = "";
[FormerlySerializedAs("targetSequence")] [FormerlySerializedAs("targetSequence")]
[Tooltip("Block to execute when this option is selected")] [Tooltip("Block to execute when this option is selected")]
public Block targetBlock; [SerializeField] protected Block targetBlock;
[Tooltip("Hide this option if the target block has been executed previously")] [Tooltip("Hide this option if the target block has been executed previously")]
public bool hideIfVisited; [SerializeField] protected bool hideIfVisited;
[Tooltip("If false, the menu option will be displayed but will not be selectable")] [Tooltip("If false, the menu option will be displayed but will not be selectable")]
public BooleanData interactable = new BooleanData(true); [SerializeField] protected BooleanData interactable = new BooleanData(true);
[Tooltip("A custom Menu Dialog to use to display this menu. All subsequent Menu commands will use this dialog.")] [Tooltip("A custom Menu Dialog to use to display this menu. All subsequent Menu commands will use this dialog.")]
public MenuDialog setMenuDialog; [SerializeField] protected MenuDialog setMenuDialog;
public override void OnEnter() public override void OnEnter()
{ {

4
Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs

@ -20,11 +20,11 @@ namespace Fungus
public class MenuTimer : Command public class MenuTimer : Command
{ {
[Tooltip("Length of time to display the timer for")] [Tooltip("Length of time to display the timer for")]
public FloatData _duration = new FloatData(1); [SerializeField] protected FloatData _duration = new FloatData(1);
[FormerlySerializedAs("targetSequence")] [FormerlySerializedAs("targetSequence")]
[Tooltip("Block to execute when the timer expires")] [Tooltip("Block to execute when the timer expires")]
public Block targetBlock; [SerializeField] protected Block targetBlock;
public override void OnEnter() public override void OnEnter()
{ {

66
Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs

@ -19,49 +19,69 @@ namespace Fungus
public class Portrait : ControlWithDisplay<DisplayType> public class Portrait : ControlWithDisplay<DisplayType>
{ {
[Tooltip("Stage to display portrait on")] [Tooltip("Stage to display portrait on")]
public Stage stage; [SerializeField] protected Stage stage;
public Stage _Stage { get { return stage; } set { stage = value; } }
[Tooltip("Character to display")] [Tooltip("Character to display")]
public Character character; [SerializeField] protected Character character;
public Character _Character { get { return character; } set { character = value; } }
[Tooltip("Character to swap with")] [Tooltip("Character to swap with")]
public Character replacedCharacter; [SerializeField] protected Character replacedCharacter;
[Tooltip("Portrait to display")] [Tooltip("Portrait to display")]
public Sprite portrait; [SerializeField] protected Sprite portrait;
public Sprite _Portrait { get { return portrait; } set { portrait = value; } }
[Tooltip("Move the portrait from/to this offset position")] [Tooltip("Move the portrait from/to this offset position")]
public PositionOffset offset; [SerializeField] protected PositionOffset offset;
public PositionOffset Offset { get { return offset; } set { offset = value; } }
[Tooltip("Move the portrait from this position")] [Tooltip("Move the portrait from this position")]
public RectTransform fromPosition; [SerializeField] protected RectTransform fromPosition;
public RectTransform FromPosition { get { return fromPosition; } set { fromPosition = value;} }
[Tooltip("Move the portrait to this positoin")] [Tooltip("Move the portrait to this positoin")]
public RectTransform toPosition; [SerializeField] protected RectTransform toPosition;
public RectTransform ToPosition { get { return toPosition; } set { toPosition = value;} }
[Tooltip("Direction character is facing")] [Tooltip("Direction character is facing")]
public FacingDirection facing; [SerializeField] protected FacingDirection facing;
public FacingDirection Facing { get { return facing; } set { facing = value; } }
[Tooltip("Use Default Settings")] [Tooltip("Use Default Settings")]
public bool useDefaultSettings = true; [SerializeField] protected bool useDefaultSettings = true;
public bool UseDefaultSettings { get { return useDefaultSettings; } set { useDefaultSettings = value; } }
[Tooltip("Fade Duration")] [Tooltip("Fade Duration")]
public float fadeDuration = 0.5f; [SerializeField] protected float fadeDuration = 0.5f;
[Tooltip("Movement Duration")] [Tooltip("Movement Duration")]
public float moveDuration = 1f; [SerializeField] protected float moveDuration = 1f;
[Tooltip("Shift Offset")] [Tooltip("Shift Offset")]
public Vector2 shiftOffset; [SerializeField] protected Vector2 shiftOffset;
[Tooltip("Move")] [Tooltip("Move")]
public bool move; [SerializeField] protected bool move;
public bool Move { get { return move; } set { move = value; } }
[Tooltip("Start from offset")] [Tooltip("Start from offset")]
public bool shiftIntoPlace; [SerializeField] protected bool shiftIntoPlace;
public bool ShiftIntoPlace { get { return shiftIntoPlace; } set { shiftIntoPlace = value; } }
[Tooltip("Wait until the tween has finished before executing the next command")] [Tooltip("Wait until the tween has finished before executing the next command")]
public bool waitUntilFinished = false; [SerializeField] protected bool waitUntilFinished = false;
public override void OnEnter() public override void OnEnter()
{ {

44
Assets/Fungus/Narrative/Scripts/Commands/Say.cs

@ -18,40 +18,46 @@ namespace Fungus
{ {
// Removed this tooltip as users's reported it obscures the text box // Removed this tooltip as users's reported it obscures the text box
[TextArea(5,10)] [TextArea(5,10)]
public string storyText = ""; [SerializeField] protected string storyText = "";
[Tooltip("Notes about this story text for other authors, localization, etc.")] [Tooltip("Notes about this story text for other authors, localization, etc.")]
public string description = ""; [SerializeField] protected string description = "";
[Tooltip("Character that is speaking")] [Tooltip("Character that is speaking")]
public Character character; [SerializeField] protected Character character;
public Character _Character { get { return character; } }
[Tooltip("Portrait that represents speaking character")] [Tooltip("Portrait that represents speaking character")]
public Sprite portrait; [SerializeField] protected Sprite portrait;
public Sprite Portrait { get { return portrait; } set { portrait = value; } }
[Tooltip("Voiceover audio to play when writing the text")] [Tooltip("Voiceover audio to play when writing the text")]
public AudioClip voiceOverClip; [SerializeField] protected AudioClip voiceOverClip;
[Tooltip("Always show this Say text when the command is executed multiple times")] [Tooltip("Always show this Say text when the command is executed multiple times")]
public bool showAlways = true; [SerializeField] protected bool showAlways = true;
[Tooltip("Number of times to show this Say text when the command is executed multiple times")] [Tooltip("Number of times to show this Say text when the command is executed multiple times")]
public int showCount = 1; [SerializeField] protected int showCount = 1;
[Tooltip("Type this text in the previous dialog box.")] [Tooltip("Type this text in the previous dialog box.")]
public bool extendPrevious = false; [SerializeField] protected bool extendPrevious = false;
public bool ExtendPrevious { get { return extendPrevious; } }
[Tooltip("Fade out the dialog box when writing has finished and not waiting for input.")] [Tooltip("Fade out the dialog box when writing has finished and not waiting for input.")]
public bool fadeWhenDone = true; [SerializeField] protected bool fadeWhenDone = true;
[Tooltip("Wait for player to click before continuing.")] [Tooltip("Wait for player to click before continuing.")]
public bool waitForClick = true; [SerializeField] protected bool waitForClick = true;
[Tooltip("Stop playing voiceover when text finishes writing.")] [Tooltip("Stop playing voiceover when text finishes writing.")]
public bool stopVoiceover = true; [SerializeField] protected bool stopVoiceover = true;
[Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")] [Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")]
public SayDialog setSayDialog; [SerializeField] protected SayDialog setSayDialog;
protected int executionCount; protected int executionCount;
@ -66,9 +72,9 @@ namespace Fungus
executionCount++; executionCount++;
// Override the active say dialog if needed // Override the active say dialog if needed
if (character != null && character.setSayDialog != null) if (character != null && character.SetSayDialog != null)
{ {
SayDialog.activeSayDialog = character.setSayDialog; SayDialog.activeSayDialog = character.SetSayDialog;
} }
if (setSayDialog != null) if (setSayDialog != null)
@ -95,10 +101,10 @@ namespace Fungus
foreach (CustomTag ct in CustomTag.activeCustomTags) foreach (CustomTag ct in CustomTag.activeCustomTags)
{ {
displayText = displayText.Replace(ct.tagStartSymbol, ct.replaceTagStartWith); displayText = displayText.Replace(ct.TagStartSymbol, ct.ReplaceTagStartWith);
if (ct.tagEndSymbol != "" && ct.replaceTagEndWith != "") if (ct.TagEndSymbol != "" && ct.ReplaceTagEndWith != "")
{ {
displayText = displayText.Replace(ct.tagEndSymbol, ct.replaceTagEndWith); displayText = displayText.Replace(ct.TagEndSymbol, ct.ReplaceTagEndWith);
} }
} }
@ -114,7 +120,7 @@ namespace Fungus
string namePrefix = ""; string namePrefix = "";
if (character != null) if (character != null)
{ {
namePrefix = character.nameText + ": "; namePrefix = character.NameText + ": ";
} }
if (extendPrevious) if (extendPrevious)
{ {
@ -169,7 +175,7 @@ namespace Fungus
string stringId = "SAY." + GetFlowchartLocalizationId() + "." + itemId + "."; string stringId = "SAY." + GetFlowchartLocalizationId() + "." + itemId + ".";
if (character != null) if (character != null)
{ {
stringId += character.nameText; stringId += character.NameText;
} }
return stringId; return stringId;

2
Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs

@ -17,7 +17,7 @@ namespace Fungus
public class SetLanguage : Command public class SetLanguage : Command
{ {
[Tooltip("Code of the language to set. e.g. ES, DE, JA")] [Tooltip("Code of the language to set. e.g. ES, DE, JA")]
public StringData _languageCode = new StringData(); [SerializeField] protected StringData _languageCode = new StringData();
public static string mostRecentLanguage = ""; public static string mostRecentLanguage = "";

2
Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs

@ -16,7 +16,7 @@ namespace Fungus
public class SetMenuDialog : Command public class SetMenuDialog : Command
{ {
[Tooltip("The Menu Dialog to use for displaying menu buttons")] [Tooltip("The Menu Dialog to use for displaying menu buttons")]
public MenuDialog menuDialog; [SerializeField] protected MenuDialog menuDialog;
public override void OnEnter() public override void OnEnter()
{ {

2
Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs

@ -16,7 +16,7 @@ namespace Fungus
public class SetSayDialog : Command public class SetSayDialog : Command
{ {
[Tooltip("The Say Dialog to use for displaying Say story text")] [Tooltip("The Say Dialog to use for displaying Say story text")]
public SayDialog sayDialog; [SerializeField] protected SayDialog sayDialog;
public override void OnEnter() public override void OnEnter()
{ {

14
Assets/Fungus/Narrative/Scripts/ConversationManager.cs

@ -33,9 +33,9 @@ namespace Fungus
SayDialog sayDialog = null; SayDialog sayDialog = null;
if (character != null) if (character != null)
{ {
if (character.setSayDialog != null) if (character.SetSayDialog != null)
{ {
sayDialog = character.setSayDialog; sayDialog = character.SetSayDialog;
} }
} }
@ -103,19 +103,19 @@ namespace Fungus
var stage = Stage.GetActiveStage(); var stage = Stage.GetActiveStage();
if (stage != null && currentCharacter != null && if (stage != null && currentCharacter != null &&
(currentPortrait != currentCharacter.state.portrait || (currentPortrait != currentCharacter.State.portrait ||
currentPosition != currentCharacter.state.position)) currentPosition != currentCharacter.State.position))
{ {
var portraitOptions = new PortraitOptions(true); var portraitOptions = new PortraitOptions(true);
portraitOptions.display = item.Hide ? DisplayType.Hide : DisplayType.Show; portraitOptions.display = item.Hide ? DisplayType.Hide : DisplayType.Show;
portraitOptions.character = currentCharacter; portraitOptions.character = currentCharacter;
portraitOptions.fromPosition = currentCharacter.state.position; portraitOptions.fromPosition = currentCharacter.State.position;
portraitOptions.toPosition = currentPosition; portraitOptions.toPosition = currentPosition;
portraitOptions.portrait = currentPortrait; portraitOptions.portrait = currentPortrait;
// Do a move tween if the character is already on screen and not yet at the specified position // Do a move tween if the character is already on screen and not yet at the specified position
if (currentCharacter.state.onScreen && if (currentCharacter.State.onScreen &&
currentPosition != currentCharacter.state.position) currentPosition != currentCharacter.State.position)
{ {
portraitOptions.move = true; portraitOptions.move = true;
} }

21
Assets/Fungus/Narrative/Scripts/CustomTag.cs

@ -14,11 +14,22 @@ namespace Fungus
[ExecuteInEditMode] [ExecuteInEditMode]
public class CustomTag : MonoBehaviour public class CustomTag : MonoBehaviour
{ {
public string tagStartSymbol; [SerializeField] protected string tagStartSymbol;
public string tagEndSymbol;
public string replaceTagStartWith; public string TagStartSymbol { get { return tagStartSymbol; } }
public string replaceTagEndWith;
[SerializeField] protected string tagEndSymbol;
public string TagEndSymbol { get { return tagEndSymbol; } }
[SerializeField] protected string replaceTagStartWith;
public string ReplaceTagStartWith { get { return replaceTagStartWith; } }
[SerializeField] protected string replaceTagEndWith;
public string ReplaceTagEndWith { get { return replaceTagEndWith; } }
static public List<CustomTag> activeCustomTags = new List<CustomTag>(); static public List<CustomTag> activeCustomTags = new List<CustomTag>();
protected virtual void OnEnable() protected virtual void OnEnable()

8
Assets/Fungus/Narrative/Scripts/DialogInput.cs

@ -25,16 +25,16 @@ namespace Fungus
} }
[Tooltip("Click to advance story")] [Tooltip("Click to advance story")]
public ClickMode clickMode; [SerializeField] protected ClickMode clickMode;
[Tooltip("Delay between consecutive clicks. Useful to prevent accidentally clicking through story.")] [Tooltip("Delay between consecutive clicks. Useful to prevent accidentally clicking through story.")]
public float nextClickDelay = 0f; [SerializeField] protected float nextClickDelay = 0f;
[Tooltip("Allow holding Cancel to fast forward text")] [Tooltip("Allow holding Cancel to fast forward text")]
public bool cancelEnabled = true; [SerializeField] protected bool cancelEnabled = true;
[Tooltip("Ignore input if a Menu dialog is currently active")] [Tooltip("Ignore input if a Menu dialog is currently active")]
public bool ignoreMenuClicks = true; [SerializeField] protected bool ignoreMenuClicks = true;
protected bool dialogClickedFlag; protected bool dialogClickedFlag;

13
Assets/Fungus/Narrative/Scripts/Localization.cs

@ -35,7 +35,9 @@ namespace Fungus
* Language to use at startup, usually defined by a two letter language code (e.g DE = German) * Language to use at startup, usually defined by a two letter language code (e.g DE = German)
*/ */
[Tooltip("Language to use at startup, usually defined by a two letter language code (e.g DE = German)")] [Tooltip("Language to use at startup, usually defined by a two letter language code (e.g DE = German)")]
public string activeLanguage = ""; [SerializeField] protected string activeLanguage = "";
public string ActiveLanguage { get { return activeLanguage; } }
protected static Dictionary<string, string> localizedStrings = new Dictionary<string, string>(); protected static Dictionary<string, string> localizedStrings = new Dictionary<string, string>();
@ -55,13 +57,16 @@ namespace Fungus
* CSV file containing localization data which can be easily edited in a spreadsheet tool. * CSV file containing localization data which can be easily edited in a spreadsheet tool.
*/ */
[Tooltip("CSV file containing localization data which can be easily edited in a spreadsheet tool")] [Tooltip("CSV file containing localization data which can be easily edited in a spreadsheet tool")]
public TextAsset localizationFile; [SerializeField] protected TextAsset localizationFile;
public TextAsset LocalizationFile { get { return localizationFile; } set { localizationFile = value; } }
/** /**
* Stores any notification message from export / import methods. * Stores any notification message from export / import methods.
*/ */
[NonSerialized] protected string notificationText = "";
public string notificationText = "";
public string NotificationText { get { return notificationText; } set { notificationText = value; } }
protected bool initialized; protected bool initialized;

12
Assets/Fungus/Narrative/Scripts/MenuDialog.cs

@ -21,13 +21,15 @@ namespace Fungus
public static MenuDialog activeMenuDialog; public static MenuDialog activeMenuDialog;
[Tooltip("Automatically select the first interactable button when the menu is shown.")] [Tooltip("Automatically select the first interactable button when the menu is shown.")]
public bool autoSelectFirstButton = false; [SerializeField] protected bool autoSelectFirstButton = false;
[NonSerialized] protected Button[] cachedButtons;
public Button[] cachedButtons;
[NonSerialized] public Button[] CachedButtons { get { return cachedButtons; } }
public Slider cachedSlider;
protected Slider cachedSlider;
public Slider CachedSlider { get { return cachedSlider; } }
public static MenuDialog GetMenuDialog() public static MenuDialog GetMenuDialog()
{ {

134
Assets/Fungus/Narrative/Scripts/PortraitController.cs

@ -139,7 +139,7 @@ namespace Fungus
// Early out if hiding a character that's already hidden // Early out if hiding a character that's already hidden
if (options.display == DisplayType.Hide && if (options.display == DisplayType.Hide &&
!options.character.state.onScreen) !options.character.State.onScreen)
{ {
onComplete(); onComplete();
return; return;
@ -160,7 +160,7 @@ namespace Fungus
case (DisplayType.Replace): case (DisplayType.Replace):
Show(options); Show(options);
Hide(options.replacedCharacter, options.replacedCharacter.state.position.name); Hide(options.replacedCharacter, options.replacedCharacter.State.position.name);
break; break;
case (DisplayType.MoveToFront): case (DisplayType.MoveToFront):
@ -199,54 +199,54 @@ namespace Fungus
// Use default stage settings // Use default stage settings
if (options.useDefaultSettings) if (options.useDefaultSettings)
{ {
options.fadeDuration = stage.fadeDuration; options.fadeDuration = stage.FadeDuration;
options.moveDuration = stage.moveDuration; options.moveDuration = stage.MoveDuration;
options.shiftOffset = stage.shiftOffset; options.shiftOffset = stage.ShiftOffset;
} }
// if no previous portrait, use default portrait // if no previous portrait, use default portrait
if (options.character.state.portrait == null) if (options.character.State.portrait == null)
{ {
options.character.state.portrait = options.character.profileSprite; options.character.State.portrait = options.character.ProfileSprite;
} }
// Selected "use previous portrait" // Selected "use previous portrait"
if (options.portrait == null) if (options.portrait == null)
{ {
options.portrait = options.character.state.portrait; options.portrait = options.character.State.portrait;
} }
// if no previous position, use default position // if no previous position, use default position
if (options.character.state.position == null) if (options.character.State.position == null)
{ {
options.character.state.position = stage.defaultPosition.rectTransform; options.character.State.position = stage.DefaultPosition.rectTransform;
} }
// Selected "use previous position" // Selected "use previous position"
if (options.toPosition == null) if (options.toPosition == null)
{ {
options.toPosition = options.character.state.position; options.toPosition = options.character.State.position;
} }
if (options.replacedCharacter != null) if (options.replacedCharacter != null)
{ {
// if no previous position, use default position // if no previous position, use default position
if (options.replacedCharacter.state.position == null) if (options.replacedCharacter.State.position == null)
{ {
options.replacedCharacter.state.position = stage.defaultPosition.rectTransform; options.replacedCharacter.State.position = stage.DefaultPosition.rectTransform;
} }
} }
// If swapping, use replaced character's position // If swapping, use replaced character's position
if (options.display == DisplayType.Replace) if (options.display == DisplayType.Replace)
{ {
options.toPosition = options.replacedCharacter.state.position; options.toPosition = options.replacedCharacter.State.position;
} }
// Selected "use previous position" // Selected "use previous position"
if (options.fromPosition == null) if (options.fromPosition == null)
{ {
options.fromPosition = options.character.state.position; options.fromPosition = options.character.State.position;
} }
// if portrait not moving, use from position is same as to position // if portrait not moving, use from position is same as to position
@ -257,22 +257,22 @@ namespace Fungus
if (options.display == DisplayType.Hide) if (options.display == DisplayType.Hide)
{ {
options.fromPosition = options.character.state.position; options.fromPosition = options.character.State.position;
} }
// if no previous facing direction, use default facing direction // if no previous facing direction, use default facing direction
if (options.character.state.facing == FacingDirection.None) if (options.character.State.facing == FacingDirection.None)
{ {
options.character.state.facing = options.character.portraitsFace; options.character.State.facing = options.character.PortraitsFace;
} }
// Selected "use previous facing direction" // Selected "use previous facing direction"
if (options.facing == FacingDirection.None) if (options.facing == FacingDirection.None)
{ {
options.facing = options.character.state.facing; options.facing = options.character.State.facing;
} }
if (options.character.state.portraitImage == null) if (options.character.State.portraitImage == null)
{ {
CreatePortraitObject(options.character, options.fadeDuration); CreatePortraitObject(options.character, options.fadeDuration);
} }
@ -294,22 +294,22 @@ namespace Fungus
typeof(Image)); typeof(Image));
// Set it to be a child of the stage // Set it to be a child of the stage
portraitObj.transform.SetParent(stage.portraitCanvas.transform, true); portraitObj.transform.SetParent(stage.PortraitCanvas.transform, true);
// Configure the portrait image // Configure the portrait image
Image portraitImage = portraitObj.GetComponent<Image>(); Image portraitImage = portraitObj.GetComponent<Image>();
portraitImage.preserveAspect = true; portraitImage.preserveAspect = true;
portraitImage.sprite = character.profileSprite; portraitImage.sprite = character.ProfileSprite;
portraitImage.color = new Color(1f, 1f, 1f, 0f); portraitImage.color = new Color(1f, 1f, 1f, 0f);
// LeanTween doesn't handle 0 duration properly // LeanTween doesn't handle 0 duration properly
float duration = (fadeDuration > 0f) ? fadeDuration : float.Epsilon; float duration = (fadeDuration > 0f) ? fadeDuration : float.Epsilon;
// Fade in character image (first time) // Fade in character image (first time)
LeanTween.alpha(portraitImage.transform as RectTransform, 1f, duration).setEase(stage.fadeEaseType); LeanTween.alpha(portraitImage.transform as RectTransform, 1f, duration).setEase(stage.FadeEaseType);
// Tell character about portrait image // Tell character about portrait image
character.state.portraitImage = portraitImage; character.State.portraitImage = portraitImage;
} }
private IEnumerator WaitUntilFinished(float duration, Action onComplete = null) private IEnumerator WaitUntilFinished(float duration, Action onComplete = null)
@ -332,24 +332,24 @@ namespace Fungus
private void SetupPortrait(PortraitOptions options) private void SetupPortrait(PortraitOptions options)
{ {
SetRectTransform(options.character.state.portraitImage.rectTransform, options.fromPosition); SetRectTransform(options.character.State.portraitImage.rectTransform, options.fromPosition);
if (options.character.state.facing != options.character.portraitsFace) if (options.character.State.facing != options.character.PortraitsFace)
{ {
options.character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f); options.character.State.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
} }
else else
{ {
options.character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f); options.character.State.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
} }
if (options.facing != options.character.portraitsFace) if (options.facing != options.character.PortraitsFace)
{ {
options.character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f); options.character.State.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
} }
else else
{ {
options.character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f); options.character.State.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
} }
} }
@ -380,8 +380,8 @@ namespace Fungus
public void MoveToFront(PortraitOptions options) public void MoveToFront(PortraitOptions options)
{ {
options.character.state.portraitImage.transform.SetSiblingIndex(options.character.state.portraitImage.transform.parent.childCount); options.character.State.portraitImage.transform.SetSiblingIndex(options.character.State.portraitImage.transform.parent.childCount);
options.character.state.display = DisplayType.MoveToFront; options.character.State.display = DisplayType.MoveToFront;
FinishCommand(options); FinishCommand(options);
} }
@ -405,7 +405,7 @@ namespace Fungus
float duration = (options.moveDuration > 0f) ? options.moveDuration : float.Epsilon; float duration = (options.moveDuration > 0f) ? options.moveDuration : float.Epsilon;
// LeanTween.move uses the anchoredPosition, so all position images must have the same anchor position // LeanTween.move uses the anchoredPosition, so all position images must have the same anchor position
LeanTween.move(options.character.state.portraitImage.gameObject, options.toPosition.position, duration).setEase(stage.fadeEaseType); LeanTween.move(options.character.State.portraitImage.gameObject, options.toPosition.position, duration).setEase(stage.FadeEaseType);
if (options.waitUntilFinished) if (options.waitUntilFinished)
{ {
@ -493,47 +493,47 @@ namespace Fungus
float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon; float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon;
// Fade out a duplicate of the existing portrait image // Fade out a duplicate of the existing portrait image
if (options.character.state.portraitImage != null) if (options.character.State.portraitImage != null)
{ {
GameObject tempGO = GameObject.Instantiate(options.character.state.portraitImage.gameObject); GameObject tempGO = GameObject.Instantiate(options.character.State.portraitImage.gameObject);
tempGO.transform.SetParent(options.character.state.portraitImage.transform, false); tempGO.transform.SetParent(options.character.State.portraitImage.transform, false);
tempGO.transform.localPosition = Vector3.zero; tempGO.transform.localPosition = Vector3.zero;
tempGO.transform.localScale = options.character.state.position.localScale; tempGO.transform.localScale = options.character.State.position.localScale;
Image tempImage = tempGO.GetComponent<Image>(); Image tempImage = tempGO.GetComponent<Image>();
tempImage.sprite = options.character.state.portraitImage.sprite; tempImage.sprite = options.character.State.portraitImage.sprite;
tempImage.preserveAspect = true; tempImage.preserveAspect = true;
tempImage.color = options.character.state.portraitImage.color; tempImage.color = options.character.State.portraitImage.color;
LeanTween.alpha(tempImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType).setOnComplete(() => { LeanTween.alpha(tempImage.rectTransform, 0f, duration).setEase(stage.FadeEaseType).setOnComplete(() => {
Destroy(tempGO); Destroy(tempGO);
}); });
} }
// Fade in the new sprite image // Fade in the new sprite image
if (options.character.state.portraitImage.sprite != options.portrait || if (options.character.State.portraitImage.sprite != options.portrait ||
options.character.state.portraitImage.color.a < 1f) options.character.State.portraitImage.color.a < 1f)
{ {
options.character.state.portraitImage.sprite = options.portrait; options.character.State.portraitImage.sprite = options.portrait;
options.character.state.portraitImage.color = new Color(1f, 1f, 1f, 0f); options.character.State.portraitImage.color = new Color(1f, 1f, 1f, 0f);
LeanTween.alpha(options.character.state.portraitImage.rectTransform, 1f, duration).setEase(stage.fadeEaseType); LeanTween.alpha(options.character.State.portraitImage.rectTransform, 1f, duration).setEase(stage.FadeEaseType);
} }
DoMoveTween(options); DoMoveTween(options);
FinishCommand(options); FinishCommand(options);
if (!stage.charactersOnStage.Contains(options.character)) if (!stage.CharactersOnStage.Contains(options.character))
{ {
stage.charactersOnStage.Add(options.character); stage.CharactersOnStage.Add(options.character);
} }
// Update character state after showing // Update character state after showing
options.character.state.onScreen = true; options.character.State.onScreen = true;
options.character.state.display = DisplayType.Show; options.character.State.display = DisplayType.Show;
options.character.state.portrait = options.portrait; options.character.State.portrait = options.portrait;
options.character.state.facing = options.facing; options.character.State.facing = options.facing;
options.character.state.position = options.toPosition; options.character.State.position = options.toPosition;
} }
/// <summary> /// <summary>
@ -547,13 +547,13 @@ namespace Fungus
options.character = character; options.character = character;
options.portrait = character.GetPortrait(portrait); options.portrait = character.GetPortrait(portrait);
if (character.state.position == null) if (character.State.position == null)
{ {
options.toPosition = options.fromPosition = stage.GetPosition("middle"); options.toPosition = options.fromPosition = stage.GetPosition("middle");
} }
else else
{ {
options.fromPosition = options.toPosition = character.state.position; options.fromPosition = options.toPosition = character.State.position;
} }
Show(options); Show(options);
@ -606,7 +606,7 @@ namespace Fungus
{ {
CleanPortraitOptions(options); CleanPortraitOptions(options);
if (options.character.state.display == DisplayType.None) if (options.character.State.display == DisplayType.None)
{ {
return; return;
} }
@ -616,37 +616,37 @@ namespace Fungus
// LeanTween doesn't handle 0 duration properly // LeanTween doesn't handle 0 duration properly
float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon; float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon;
LeanTween.alpha(options.character.state.portraitImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType); LeanTween.alpha(options.character.State.portraitImage.rectTransform, 0f, duration).setEase(stage.FadeEaseType);
DoMoveTween(options); DoMoveTween(options);
stage.charactersOnStage.Remove(options.character); stage.CharactersOnStage.Remove(options.character);
//update character state after hiding //update character state after hiding
options.character.state.onScreen = false; options.character.State.onScreen = false;
options.character.state.portrait = options.portrait; options.character.State.portrait = options.portrait;
options.character.state.facing = options.facing; options.character.State.facing = options.facing;
options.character.state.position = options.toPosition; options.character.State.position = options.toPosition;
options.character.state.display = DisplayType.Hide; options.character.State.display = DisplayType.Hide;
FinishCommand(options); FinishCommand(options);
} }
public void SetDimmed(Character character, bool dimmedState) public void SetDimmed(Character character, bool dimmedState)
{ {
if (character.state.dimmed == dimmedState) if (character.State.dimmed == dimmedState)
{ {
return; return;
} }
character.state.dimmed = dimmedState; character.State.dimmed = dimmedState;
Color targetColor = dimmedState ? new Color(0.5f, 0.5f, 0.5f, 1f) : Color.white; Color targetColor = dimmedState ? new Color(0.5f, 0.5f, 0.5f, 1f) : Color.white;
// LeanTween doesn't handle 0 duration properly // LeanTween doesn't handle 0 duration properly
float duration = (stage.fadeDuration > 0f) ? stage.fadeDuration : float.Epsilon; float duration = (stage.FadeDuration > 0f) ? stage.FadeDuration : float.Epsilon;
LeanTween.color(character.state.portraitImage.rectTransform, targetColor, duration).setEase(stage.fadeEaseType); LeanTween.color(character.State.portraitImage.rectTransform, targetColor, duration).setEase(stage.FadeEaseType);
} }
} }

43
Assets/Fungus/Narrative/Scripts/SayDialog.cs

@ -20,16 +20,21 @@ namespace Fungus
// Most recent speaking character // Most recent speaking character
public static Character speakingCharacter; public static Character speakingCharacter;
public float fadeDuration = 0.25f; [SerializeField] protected float fadeDuration = 0.25f;
public Button continueButton; [SerializeField] protected Button continueButton;
public Canvas dialogCanvas; [SerializeField] protected Canvas dialogCanvas;
public Text nameText; [SerializeField] protected Text nameText;
public Text storyText; [SerializeField] protected Text storyText;
public Image characterImage;
public Text StoryText { get { return storyText; } }
[SerializeField] protected Image characterImage;
public Image CharacterImage { get { return characterImage; } }
[Tooltip("Adjust width of story text when Character Image is displayed (to avoid overlapping)")] [Tooltip("Adjust width of story text when Character Image is displayed (to avoid overlapping)")]
public bool fitTextWithImage = true; [SerializeField] protected bool fitTextWithImage = true;
protected float startStoryTextWidth; protected float startStoryTextWidth;
protected float startStoryTextInset; protected float startStoryTextInset;
@ -179,7 +184,7 @@ namespace Fungus
} }
else if (speakingCharacter != null) else if (speakingCharacter != null)
{ {
soundEffectClip = speakingCharacter.soundEffect; soundEffectClip = speakingCharacter.SoundEffect;
} }
yield return StartCoroutine(writer.Write(text, clearPrevious, waitForInput, stopVoiceover, soundEffectClip, onComplete)); yield return StartCoroutine(writer.Write(text, clearPrevious, waitForInput, stopVoiceover, soundEffectClip, onComplete));
@ -273,9 +278,9 @@ namespace Fungus
foreach (Stage stage in Stage.activeStages) foreach (Stage stage in Stage.activeStages)
{ {
if (stage.dimPortraits) if (stage.DimPortraits)
{ {
foreach (Character c in stage.charactersOnStage) foreach (Character c in stage.CharactersOnStage)
{ {
if (prevSpeakingCharacter != speakingCharacter) if (prevSpeakingCharacter != speakingCharacter)
{ {
@ -292,7 +297,7 @@ namespace Fungus
} }
} }
string characterName = character.nameText; string characterName = character.NameText;
if (characterName == "") if (characterName == "")
{ {
@ -305,7 +310,7 @@ namespace Fungus
characterName = flowchart.SubstituteVariables(characterName); characterName = flowchart.SubstituteVariables(characterName);
} }
SetCharacterName(characterName, character.nameColor); SetCharacterName(characterName, character.NameColor);
} }
} }
@ -391,20 +396,20 @@ namespace Fungus
// Stop all tweening portraits // Stop all tweening portraits
foreach( Character c in Character.activeCharacters ) foreach( Character c in Character.activeCharacters )
{ {
if (c.state.portraitImage != null) if (c.State.portraitImage != null)
{ {
if (LeanTween.isTweening(c.state.portraitImage.gameObject)) if (LeanTween.isTweening(c.State.portraitImage.gameObject))
{ {
LeanTween.cancel(c.state.portraitImage.gameObject, true); LeanTween.cancel(c.State.portraitImage.gameObject, true);
PortraitController.SetRectTransform(c.state.portraitImage.rectTransform, c.state.position); PortraitController.SetRectTransform(c.State.portraitImage.rectTransform, c.State.position);
if (c.state.dimmed == true) if (c.State.dimmed == true)
{ {
c.state.portraitImage.color = new Color(0.5f, 0.5f, 0.5f, 1f); c.State.portraitImage.color = new Color(0.5f, 0.5f, 0.5f, 1f);
} }
else else
{ {
c.state.portraitImage.color = Color.white; c.State.portraitImage.color = Color.white;
} }
} }
} }

51
Assets/Fungus/Narrative/Scripts/Stage.cs

@ -16,19 +16,44 @@ namespace Fungus
[ExecuteInEditMode] [ExecuteInEditMode]
public class Stage : PortraitController public class Stage : PortraitController
{ {
public Canvas portraitCanvas; [SerializeField] protected Canvas portraitCanvas;
public bool dimPortraits;
public float fadeDuration = 0.5f; public Canvas PortraitCanvas { get { return portraitCanvas; } }
public float moveDuration = 1f;
public LeanTweenType fadeEaseType; [SerializeField] protected bool dimPortraits;
public LeanTweenType moveEaseType;
public Vector2 shiftOffset; public bool DimPortraits { get { return dimPortraits; } set { dimPortraits = value; } }
public Image defaultPosition;
public List<RectTransform> positions; [SerializeField] protected float fadeDuration = 0.5f;
public RectTransform[] cachedPositions;
public List<Character> charactersOnStage = new List<Character>(); public float FadeDuration { get { return fadeDuration; } set { fadeDuration = value; } }
[HideInInspector] [SerializeField] protected float moveDuration = 1f;
public float MoveDuration { get { return moveDuration; } set { moveDuration = value; } }
[SerializeField] protected LeanTweenType fadeEaseType;
public LeanTweenType FadeEaseType { get { return fadeEaseType; } }
[SerializeField] protected Vector2 shiftOffset;
public Vector2 ShiftOffset { get { return shiftOffset; } }
[SerializeField] protected Image defaultPosition;
public Image DefaultPosition { get { return defaultPosition; } }
[SerializeField] protected List<RectTransform> positions;
public List<RectTransform> Positions { get { return positions; } }
[SerializeField] protected RectTransform[] cachedPositions;
protected List<Character> charactersOnStage = new List<Character>();
[SerializeField] public List<Character> CharactersOnStage { get { return charactersOnStage; } }
static public List<Stage> activeStages = new List<Stage>(); static public List<Stage> activeStages = new List<Stage>();
protected virtual void OnEnable() protected virtual void OnEnable()

390
Assets/Tests/Localisation/LocalisationTests.unity

File diff suppressed because it is too large Load Diff

12
Assets/Tests/Narrative/NarrativeTests.cs

@ -103,7 +103,7 @@ public class NarrativeTests : Command
// Test showing multiple characters // Test showing multiple characters
protected virtual void TestShow() protected virtual void TestShow()
{ {
bool found = (stage.charactersOnStage.Count == 2); bool found = (stage.CharactersOnStage.Count == 2);
GameObject johnGO = stage.transform.Find("Canvas/JohnCharacter").gameObject; GameObject johnGO = stage.transform.Find("Canvas/JohnCharacter").gameObject;
GameObject sherlockGO = stage.transform.Find("Canvas/SherlockCharacter").gameObject; GameObject sherlockGO = stage.transform.Find("Canvas/SherlockCharacter").gameObject;
@ -116,7 +116,7 @@ public class NarrativeTests : Command
} }
else else
{ {
Fail("Characters not found on stage" + stage.charactersOnStage.Count); Fail("Characters not found on stage" + stage.CharactersOnStage.Count);
} }
} }
@ -143,8 +143,8 @@ public class NarrativeTests : Command
Character johnCharacter = johnGO.GetComponent<Character>(); Character johnCharacter = johnGO.GetComponent<Character>();
Character sherlockCharacter = sherlockGO.GetComponent<Character>(); Character sherlockCharacter = sherlockGO.GetComponent<Character>();
if (johnCharacter.portraitsFace == FacingDirection.Right && if (johnCharacter.PortraitsFace == FacingDirection.Right &&
sherlockCharacter.portraitsFace == FacingDirection.Left) sherlockCharacter.PortraitsFace == FacingDirection.Left)
{ {
Pass(); Pass();
} }
@ -222,8 +222,8 @@ public class NarrativeTests : Command
protected virtual void TestResetNoDelay() protected virtual void TestResetNoDelay()
{ {
// Set the stage durations to 0 so we can rerun the tests in this case // Set the stage durations to 0 so we can rerun the tests in this case
stage.fadeDuration = 0f; stage.FadeDuration = 0f;
stage.moveDuration = 0f; stage.MoveDuration = 0f;
} }
public override string GetSummary() public override string GetSummary()

118
Assets/Tests/Narrative/NarrativeTests.unity

@ -117,7 +117,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
selectedFlowchart: {fileID: 250457565} selectedFlowchart: {fileID: 736071350}
--- !u!4 &11556238 --- !u!4 &11556238
Transform: Transform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -550,7 +550,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: 'wi test{m=DoTest}{wi} storyText: 'wi test{m=DoTest}{wi}
@ -669,7 +668,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -715,7 +713,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 4 itemId: 4
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1066357890} targetObject: {fileID: 1066357890}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -754,7 +751,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 7 itemId: 7
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1066357890} targetObject: {fileID: 1066357890}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -781,7 +777,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -799,7 +794,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 9 itemId: 9
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1066357890} targetObject: {fileID: 1066357890}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -826,7 +820,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 8 itemId: 8
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -844,7 +837,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 10 itemId: 10
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Wait for click off{m=DoTest} storyText: Wait for click off{m=DoTest}
description: description:
@ -893,7 +885,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 12 itemId: 12
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 401634244} targetObject: {fileID: 401634244}
targetComponentAssemblyName: SayTest, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, targetComponentAssemblyName: SayTest, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@ -933,7 +924,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 14 itemId: 14
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1066357895} sayDialog: {fileID: 1066357895}
--- !u!1 &28716239 --- !u!1 &28716239
@ -2690,7 +2680,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
text: Test {$StringVar} text: Test {$StringVar}
description: description:
@ -2789,7 +2778,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 2 itemId: 2
errorMessage:
indentLevel: 0 indentLevel: 0
menuDialog: {fileID: 1393368593} menuDialog: {fileID: 1393368593}
--- !u!1 &254519489 --- !u!1 &254519489
@ -3734,7 +3722,6 @@ MonoBehaviour:
fadeDuration: 0.75 fadeDuration: 0.75
moveDuration: 1 moveDuration: 1
fadeEaseType: 4 fadeEaseType: 4
moveEaseType: 4
shiftOffset: {x: 0, y: 0} shiftOffset: {x: 0, y: 0}
defaultPosition: {fileID: 254519491} defaultPosition: {fileID: 254519491}
positions: positions:
@ -3744,7 +3731,6 @@ MonoBehaviour:
- {fileID: 1049860613} - {fileID: 1049860613}
- {fileID: 813974793} - {fileID: 813974793}
cachedPositions: [] cachedPositions: []
charactersOnStage: []
--- !u!1 &499706539 --- !u!1 &499706539
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3946,7 +3932,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 4 itemId: 4
errorMessage:
indentLevel: 0 indentLevel: 0
text: Option 2 text: Option 2
description: description:
@ -4012,7 +3997,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
text: Option 1 text: Option 1
description: description:
@ -4046,7 +4030,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
menuDialog: {fileID: 231990862} menuDialog: {fileID: 231990862}
--- !u!114 &562609153 --- !u!114 &562609153
@ -4127,7 +4110,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -4145,7 +4127,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 7 itemId: 7
errorMessage:
indentLevel: 0 indentLevel: 0
menuDialog: {fileID: 231990862} menuDialog: {fileID: 231990862}
--- !u!1 &572306878 --- !u!1 &572306878
@ -5060,7 +5041,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Write a bit of text that takes a couple of seconds to write out to the storyText: Write a bit of text that takes a couple of seconds to write out to the
dialog. dialog.
@ -5163,7 +5143,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 4 itemId: 4
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -5193,7 +5172,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Interrupted storyText: Interrupted
description: description:
@ -5243,7 +5221,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1764227332} sayDialog: {fileID: 1764227332}
--- !u!1 &674815458 --- !u!1 &674815458
@ -5717,7 +5694,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -5747,7 +5723,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
--- !u!114 &711866620 --- !u!114 &711866620
MonoBehaviour: MonoBehaviour:
@ -5761,7 +5736,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -5791,7 +5765,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -6059,7 +6032,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: 'Play sound effect from dialog{wc} storyText: 'Play sound effect from dialog{wc}
@ -6142,8 +6114,9 @@ MonoBehaviour:
y: -350 y: -350
width: 1121 width: 1121
height: 870 height: 870
selectedBlock: {fileID: 0} selectedBlock: {fileID: 736071349}
selectedCommands: [] selectedCommands:
- {fileID: 736071366}
variables: [] variables: []
description: 'Manual test to check if portrait images that are description: 'Manual test to check if portrait images that are
@ -6182,7 +6155,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 2 itemId: 2
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Play voice over audio clip storyText: Play voice over audio clip
description: description:
@ -6208,7 +6180,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1714427702} targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -6235,7 +6206,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -6285,7 +6255,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 8 itemId: 8
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1714427702} targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -6312,7 +6281,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 7 itemId: 7
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -6342,7 +6310,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1714427708} sayDialog: {fileID: 1714427708}
--- !u!114 &736071360 --- !u!114 &736071360
@ -6357,7 +6324,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 9 itemId: 9
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Test sound effect specified per character storyText: Test sound effect specified per character
description: description:
@ -6383,7 +6349,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 11 itemId: 11
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1714427702} targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -6410,7 +6375,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 10 itemId: 10
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -6428,7 +6392,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 13 itemId: 13
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1714427702} targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -6455,7 +6418,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 12 itemId: 12
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -6473,7 +6435,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 15 itemId: 15
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Write some audio with beep sounds storyText: Write some audio with beep sounds
description: description:
@ -6499,7 +6460,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 14 itemId: 14
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1714427702} targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.WriterAudio, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.WriterAudio, Assembly-CSharp, Version=0.0.0.0,
@ -6543,7 +6503,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 17 itemId: 17
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1714427702} targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@ -6570,7 +6529,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 16 itemId: 16
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -7447,7 +7405,6 @@ MonoBehaviour:
fadeDuration: 0.75 fadeDuration: 0.75
moveDuration: 1 moveDuration: 1
fadeEaseType: 4 fadeEaseType: 4
moveEaseType: 4
shiftOffset: {x: 0, y: 0} shiftOffset: {x: 0, y: 0}
defaultPosition: {fileID: 879247671} defaultPosition: {fileID: 879247671}
positions: positions:
@ -7457,7 +7414,6 @@ MonoBehaviour:
- {fileID: 1336986580} - {fileID: 1336986580}
- {fileID: 1754947673} - {fileID: 1754947673}
cachedPositions: [] cachedPositions: []
charactersOnStage: []
--- !u!4 &825247592 --- !u!4 &825247592
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -7764,7 +7720,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 2 itemId: 2
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1125936944} sayDialog: {fileID: 1125936944}
--- !u!114 &861253875 --- !u!114 &861253875
@ -7804,7 +7759,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Write out a long piece of text that we want to interrupt before it's storyText: Write out a long piece of text that we want to interrupt before it's
finished. finished.
@ -7867,7 +7821,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 7 itemId: 7
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 1125936939} targetObject: {fileID: 1125936939}
targetComponentAssemblyName: Fungus.SayDialog, Assembly-CSharp, Version=0.0.0.0, targetComponentAssemblyName: Fungus.SayDialog, Assembly-CSharp, Version=0.0.0.0,
@ -7894,7 +7847,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -8323,7 +8275,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 33 itemId: 33
errorMessage:
indentLevel: 0 indentLevel: 0
targetFlowchart: {fileID: 0} targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159676} targetBlock: {fileID: 891159676}
@ -8341,7 +8292,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 35 itemId: 35
errorMessage:
indentLevel: 0 indentLevel: 0
testType: 6 testType: 6
--- !u!114 &891159648 --- !u!114 &891159648
@ -8356,7 +8306,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 34 itemId: 34
errorMessage:
indentLevel: 0 indentLevel: 0
targetFlowchart: {fileID: 0} targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159676} targetBlock: {fileID: 891159676}
@ -8374,7 +8323,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 36 itemId: 36
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Test saying something{x} storyText: Test saying something{x}
description: description:
@ -8400,7 +8348,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 47 itemId: 47
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -8432,7 +8379,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 46 itemId: 46
errorMessage:
indentLevel: 0 indentLevel: 0
display: 2 display: 2
stage: {fileID: 0} stage: {fileID: 0}
@ -8452,7 +8398,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 45 itemId: 45
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -8472,7 +8417,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 44 itemId: 44
errorMessage:
indentLevel: 0 indentLevel: 0
display: 2 display: 2
stage: {fileID: 0} stage: {fileID: 0}
@ -8492,7 +8436,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 48 itemId: 48
errorMessage:
indentLevel: 0 indentLevel: 0
targetFlowchart: {fileID: 0} targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159644} targetBlock: {fileID: 891159644}
@ -8510,7 +8453,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 49 itemId: 49
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1090798156} sayDialog: {fileID: 1090798156}
--- !u!114 &891159661 --- !u!114 &891159661
@ -8525,7 +8467,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 32 itemId: 32
errorMessage:
indentLevel: 0 indentLevel: 0
testType: 5 testType: 5
--- !u!114 &891159662 --- !u!114 &891159662
@ -8540,7 +8481,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 31 itemId: 31
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Test saying something{x} storyText: Test saying something{x}
description: description:
@ -8566,7 +8506,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 30 itemId: 30
errorMessage:
indentLevel: 0 indentLevel: 0
testType: 4 testType: 4
--- !u!114 &891159664 --- !u!114 &891159664
@ -8581,7 +8520,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 29 itemId: 29
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -8611,7 +8549,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 28 itemId: 28
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -8641,7 +8578,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 27 itemId: 27
errorMessage:
indentLevel: 0 indentLevel: 0
testType: 3 testType: 3
--- !u!114 &891159667 --- !u!114 &891159667
@ -8656,7 +8592,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 26 itemId: 26
errorMessage:
indentLevel: 0 indentLevel: 0
display: 4 display: 4
stage: {fileID: 0} stage: {fileID: 0}
@ -8686,7 +8621,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 25 itemId: 25
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -8716,7 +8650,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 24 itemId: 24
errorMessage:
indentLevel: 0 indentLevel: 0
testType: 2 testType: 2
--- !u!114 &891159670 --- !u!114 &891159670
@ -8731,7 +8664,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 23 itemId: 23
errorMessage:
indentLevel: 0 indentLevel: 0
display: 3 display: 3
stage: {fileID: 0} stage: {fileID: 0}
@ -8761,7 +8693,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 22 itemId: 22
errorMessage:
indentLevel: 0 indentLevel: 0
testType: 1 testType: 1
--- !u!114 &891159672 --- !u!114 &891159672
@ -8776,7 +8707,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 21 itemId: 21
errorMessage:
indentLevel: 0 indentLevel: 0
display: 2 display: 2
stage: {fileID: 0} stage: {fileID: 0}
@ -8806,7 +8736,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 20 itemId: 20
errorMessage:
indentLevel: 0 indentLevel: 0
testType: 0 testType: 0
--- !u!114 &891159674 --- !u!114 &891159674
@ -8821,7 +8750,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 19 itemId: 19
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -8851,7 +8779,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 18 itemId: 18
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -10694,7 +10621,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: A long piece of text that takes a while to write out storyText: A long piece of text that takes a while to write out
description: description:
@ -10798,7 +10724,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 2 itemId: 2
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1792345322} sayDialog: {fileID: 1792345322}
--- !u!1 &1083481054 --- !u!1 &1083481054
@ -11866,7 +11791,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Block A storyText: Block A
description: description:
@ -11969,7 +11893,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: Block B storyText: Block B
description: description:
@ -11995,7 +11918,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 4 itemId: 4
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -12013,7 +11935,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
targetFlowchart: {fileID: 0} targetFlowchart: {fileID: 0}
targetBlock: {fileID: 1196429433} targetBlock: {fileID: 1196429433}
@ -12055,7 +11976,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1242507978} sayDialog: {fileID: 1242507978}
--- !u!114 &1210810389 --- !u!114 &1210810389
@ -13346,7 +13266,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
--- !u!114 &1555865763 --- !u!114 &1555865763
MonoBehaviour: MonoBehaviour:
@ -13383,7 +13302,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
text: DoOption text: DoOption
description: description:
@ -15230,7 +15148,7 @@ AudioSource:
tangentMode: 0 tangentMode: 0
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 0
spreadCustomCurve: spreadCustomCurve:
serializedVersion: 2 serializedVersion: 2
m_Curve: m_Curve:
@ -15252,7 +15170,7 @@ AudioSource:
tangentMode: 0 tangentMode: 0
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 0
--- !u!114 &1714427706 --- !u!114 &1714427706
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -16411,7 +16329,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 4 itemId: 4
errorMessage:
indentLevel: 0 indentLevel: 0
--- !u!114 &1807695775 --- !u!114 &1807695775
MonoBehaviour: MonoBehaviour:
@ -16426,7 +16343,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: '{s=40} storyText: '{s=40}
@ -16463,7 +16379,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: '{s=40} storyText: '{s=40}
@ -16578,7 +16493,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 927439921} sayDialog: {fileID: 927439921}
--- !u!1 &1837434062 --- !u!1 &1837434062
@ -16818,7 +16732,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: A long block of text that runs all the way to the end of the text box{w=1}{x} storyText: A long block of text that runs all the way to the end of the text box{w=1}{x}
description: description:
@ -16889,7 +16802,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 2 itemId: 2
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 1508308453} sayDialog: {fileID: 1508308453}
--- !u!114 &1913435025 --- !u!114 &1913435025
@ -16904,7 +16816,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 4 itemId: 4
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: A long block of text that runs all the way to the end of the text box{w=1}{x} storyText: A long block of text that runs all the way to the end of the text box{w=1}{x}
description: description:
@ -16930,7 +16841,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
sayDialog: {fileID: 538232720} sayDialog: {fileID: 538232720}
--- !u!114 &1913435027 --- !u!114 &1913435027
@ -16945,7 +16855,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: No character. A long block of text that runs all the way to the end of storyText: No character. A long block of text that runs all the way to the end of
the text box{w=1}{x} the text box{w=1}{x}
@ -16972,7 +16881,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
storyText: No character. A long block of text that runs all the way to the end of storyText: No character. A long block of text that runs all the way to the end of
the text box{w=1}{x} the text box{w=1}{x}
@ -16999,7 +16907,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 10 itemId: 10
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 392887984} targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@ -17026,7 +16933,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 9 itemId: 9
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 392887984} targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@ -17053,7 +16959,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 8 itemId: 8
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 392887984} targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@ -17080,7 +16985,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 7 itemId: 7
errorMessage:
indentLevel: 0 indentLevel: 0
targetObject: {fileID: 392887984} targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@ -17110,7 +17014,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!4 &1929911610 --- !u!4 &1929911610
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -17576,7 +17480,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
textObject: {fileID: 588326334} textObject: {fileID: 588326334}
text: text:
@ -18326,7 +18229,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 1 itemId: 1
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -18399,7 +18301,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 2 itemId: 2
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -18429,7 +18330,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 3 itemId: 3
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -18447,7 +18347,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 5 itemId: 5
errorMessage:
indentLevel: 0 indentLevel: 0
display: 1 display: 1
stage: {fileID: 0} stage: {fileID: 0}
@ -18477,7 +18376,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 4 itemId: 4
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}
@ -18495,7 +18393,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 6 itemId: 6
errorMessage:
indentLevel: 0 indentLevel: 0
--- !u!114 &2043226680 --- !u!114 &2043226680
MonoBehaviour: MonoBehaviour:
@ -18509,7 +18406,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
itemId: 7 itemId: 7
errorMessage:
indentLevel: 0 indentLevel: 0
_duration: _duration:
floatRef: {fileID: 0} floatRef: {fileID: 0}

16
Assets/Tests/Narrative/OverlapTests.cs

@ -14,12 +14,12 @@ public class OverlapTests : MonoBehaviour
public void Step1() public void Step1()
{ {
if (!sayDialog_RightImage.characterImage.IsActive()) if (!sayDialog_RightImage.CharacterImage.IsActive())
{ {
IntegrationTest.Fail("Character image not active"); IntegrationTest.Fail("Character image not active");
} }
if (sayDialog_RightImage.characterImage.transform.position.x < sayDialog_RightImage.storyText.transform.position.x) if (sayDialog_RightImage.CharacterImage.transform.position.x < sayDialog_RightImage.StoryText.transform.position.x)
{ {
IntegrationTest.Fail("Character image not on right hand side"); IntegrationTest.Fail("Character image not on right hand side");
} }
@ -27,12 +27,12 @@ public class OverlapTests : MonoBehaviour
public void Step2() public void Step2()
{ {
if (sayDialog_RightImage.characterImage.IsActive()) if (sayDialog_RightImage.CharacterImage.IsActive())
{ {
IntegrationTest.Fail("Character image should not be active"); IntegrationTest.Fail("Character image should not be active");
} }
float width = sayDialog_RightImage.storyText.rectTransform.rect.width; float width = sayDialog_RightImage.StoryText.rectTransform.rect.width;
if (!Mathf.Approximately(width, 1439)) if (!Mathf.Approximately(width, 1439))
{ {
IntegrationTest.Fail("Story text width not correct"); IntegrationTest.Fail("Story text width not correct");
@ -41,12 +41,12 @@ public class OverlapTests : MonoBehaviour
public void Step3() public void Step3()
{ {
if (!sayDialog_LeftImage.characterImage.IsActive()) if (!sayDialog_LeftImage.CharacterImage.IsActive())
{ {
IntegrationTest.Fail("Character image not active"); IntegrationTest.Fail("Character image not active");
} }
if (sayDialog_LeftImage.characterImage.transform.position.x > sayDialog_LeftImage.storyText.transform.position.x) if (sayDialog_LeftImage.CharacterImage.transform.position.x > sayDialog_LeftImage.StoryText.transform.position.x)
{ {
IntegrationTest.Fail("Character image not on left hand side"); IntegrationTest.Fail("Character image not on left hand side");
} }
@ -54,12 +54,12 @@ public class OverlapTests : MonoBehaviour
public void Step4() public void Step4()
{ {
if (sayDialog_LeftImage.characterImage.IsActive()) if (sayDialog_LeftImage.CharacterImage.IsActive())
{ {
IntegrationTest.Fail("Character image should not be active"); IntegrationTest.Fail("Character image should not be active");
} }
float width = sayDialog_LeftImage.storyText.rectTransform.rect.width; float width = sayDialog_LeftImage.StoryText.rectTransform.rect.width;
if (!Mathf.Approximately(width, 1439)) if (!Mathf.Approximately(width, 1439))
{ {
IntegrationTest.Fail("Story text width not correct"); IntegrationTest.Fail("Story text width not correct");

24
ProjectSettings/GraphicsSettings.asset

@ -39,20 +39,20 @@ GraphicsSettings:
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0} type: 0}
m_ShaderSettings_Tier1: m_ShaderSettings_Tier1:
useCascadedShadowMaps: 0 useCascadedShadowMaps: 1
standardShaderQuality: 0 standardShaderQuality: 2
useReflectionProbeBoxProjection: 0 useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 0 useReflectionProbeBlending: 1
m_ShaderSettings_Tier2: m_ShaderSettings_Tier2:
useCascadedShadowMaps: 0 useCascadedShadowMaps: 1
standardShaderQuality: 1 standardShaderQuality: 2
useReflectionProbeBoxProjection: 0 useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 0 useReflectionProbeBlending: 1
m_ShaderSettings_Tier3: m_ShaderSettings_Tier3:
useCascadedShadowMaps: 0 useCascadedShadowMaps: 1
standardShaderQuality: 1 standardShaderQuality: 2
useReflectionProbeBoxProjection: 0 useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 0 useReflectionProbeBlending: 1
m_BuildTargetShaderSettings: [] m_BuildTargetShaderSettings: []
m_LightmapStripping: 0 m_LightmapStripping: 0
m_FogStripping: 0 m_FogStripping: 0

Loading…
Cancel
Save