Browse Source

Merging PR #490

master
Christopher 9 years ago
parent
commit
a0b11e074b
  1. 1
      Assets/Fungus/Narrative/Resources/Stage.prefab
  2. 26
      Assets/Fungus/Narrative/Scripts/Character.cs
  3. 2
      Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs
  4. 416
      Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs
  5. 730
      Assets/Fungus/Narrative/Scripts/PortraitController.cs
  6. 12
      Assets/Fungus/Narrative/Scripts/PortraitController.cs.meta
  7. 13
      Assets/Fungus/Narrative/Scripts/SayDialog.cs
  8. 31
      Assets/Fungus/Narrative/Scripts/Stage.cs
  9. 12
      Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs
  10. 3
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs
  11. 736
      Assets/FungusExamples/FungusLua/Narrative/PortaitControlExample.unity
  12. 8
      Assets/FungusExamples/FungusLua/Narrative/PortaitControlExample.unity.meta
  13. 689
      Assets/Tests/Lua/FungusTests.unity
  14. 118
      Assets/Tests/Narrative/NarrativeTests.unity

1
Assets/Fungus/Narrative/Resources/Stage.prefab

@ -376,7 +376,6 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0

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

@ -54,6 +54,32 @@ namespace Fungus
nameText = standardText;
}
/// <summary>
/// Looks for a portrait by name on a character
/// If none is found, give a warning and return a blank sprite
/// </summary>
/// <param name="portrait_string"></param>
/// <returns>Character portrait sprite</returns>
public virtual Sprite GetPortrait(string portrait_string)
{
if (portrait_string == null)
{
Debug.LogWarning("No portrait specifed for character " + name);
//Would be nice to have a <picture missing> sprite show up instead
return new Sprite();
}
foreach (Sprite portrait in portraits)
{
if ( String.Compare(portrait.name, portrait_string, true) == 0)
{
return portrait;
}
}
Debug.LogWarning("No portrait \"" + portrait_string + "\" found for character \"" + name + "\"");
return new Sprite();
}
public virtual string GetDescription()
{
return description;

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

@ -148,7 +148,7 @@ namespace Fungus
stage.dimPortraits = false;
foreach (Character character in stage.charactersOnStage)
{
Portrait.SetDimmed(character, stage, false);
stage.SetDimmed(character, false);
}
}

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

@ -7,45 +7,12 @@ using System.Collections.Generic;
namespace Fungus
{
public struct PortraitState
{
public bool onScreen;
public bool dimmed;
public DisplayType display;
public Sprite portrait;
public RectTransform position;
public FacingDirection facing;
public Image portraitImage;
}
public enum DisplayType
{
None,
Show,
Hide,
Replace,
MoveToFront
}
public enum FacingDirection
{
None,
Left,
Right
}
public enum PositionOffset
{
None,
OffsetLeft,
OffsetRight
}
[CommandInfo("Narrative",
"Portrait",
"Controls a character portrait. ")]
"Portrait",
"Controls a character portrait. ")]
public class Portrait : ControlWithDisplay<DisplayType>
{
{
[Tooltip("Stage to display portrait on")]
public Stage stage;
@ -91,370 +58,51 @@ namespace Fungus
[Tooltip("Wait until the tween has finished before executing the next command")]
public bool waitUntilFinished = false;
// Timer for waitUntilFinished functionality
protected float waitTimer;
public override void OnEnter()
{
// If no display specified, do nothing
if (IsDisplayNone(display))
{
Continue();
return;
}
// If no character specified, do nothing
if (character == null)
{
Continue();
return;
}
// If Replace and no replaced character specified, do nothing
if (display == DisplayType.Replace && replacedCharacter == null)
{
Continue();
return;
}
// Selected "use default Portrait Stage"
if (stage == null)
{
// If no default specified, try to get any portrait stage in the scene
stage = FindObjectOfType<Stage>();
// If portrait stage does not exist, do nothing
if (stage == null)
{
Continue();
return;
}
}
// Early out if hiding a character that's already hidden
if (display == DisplayType.Hide &&
!character.state.onScreen)
{
Continue();
return;
}
// Use default settings
if (useDefaultSettings)
{
fadeDuration = stage.fadeDuration;
moveDuration = stage.moveDuration;
shiftOffset = stage.shiftOffset;
}
if (character.state.portraitImage == null)
{
CreatePortraitObject(character, stage);
}
// if no previous portrait, use default portrait
if (character.state.portrait == null)
// Selected "use default Portrait Stage"
if (stage == null)
{
character.state.portrait = character.profileSprite;
}
// Selected "use previous portrait"
if (portrait == null)
{
portrait = character.state.portrait;
}
// if no previous position, use default position
if (character.state.position == null)
{
character.state.position = stage.defaultPosition.rectTransform;
}
// Selected "use previous position"
if (toPosition == null)
{
toPosition = character.state.position;
}
if (replacedCharacter != null)
{
// if no previous position, use default position
if (replacedCharacter.state.position == null)
// If no default specified, try to get any portrait stage in the scene
stage = FindObjectOfType<Stage>();
// If portrait stage does not exist, do nothing
if (stage == null)
{
replacedCharacter.state.position = stage.defaultPosition.rectTransform;
Continue();
return;
}
}
// If swapping, use replaced character's position
if (display == DisplayType.Replace)
{
toPosition = replacedCharacter.state.position;
}
// Selected "use previous position"
if (fromPosition == null)
{
fromPosition = character.state.position;
}
// if portrait not moving, use from position is same as to position
if (!move)
{
fromPosition = toPosition;
}
if (display == DisplayType.Hide)
{
fromPosition = character.state.position;
}
// if no previous facing direction, use default facing direction
if (character.state.facing == FacingDirection.None)
{
character.state.facing = character.portraitsFace;
}
// Selected "use previous facing direction"
if (facing == FacingDirection.None)
{
facing = character.state.facing;
}
switch(display)
{
case (DisplayType.Show):
Show(character, fromPosition, toPosition);
character.state.onScreen = true;
if (!stage.charactersOnStage.Contains(character))
{
stage.charactersOnStage.Add(character);
}
break;
case (DisplayType.Hide):
Hide(character, fromPosition, toPosition);
character.state.onScreen = false;
stage.charactersOnStage.Remove(character);
break;
case (DisplayType.Replace):
Show(character, fromPosition, toPosition);
Hide(replacedCharacter, replacedCharacter.state.position, replacedCharacter.state.position);
character.state.onScreen = true;
replacedCharacter.state.onScreen = false;
stage.charactersOnStage.Add(character);
stage.charactersOnStage.Remove(replacedCharacter);
break;
case (DisplayType.MoveToFront):
MoveToFront(character);
break;
}
if (display == DisplayType.Replace)
{
character.state.display = DisplayType.Show;
replacedCharacter.state.display = DisplayType.Hide;
}
else
{
character.state.display = display;
}
character.state.portrait = portrait;
character.state.facing = facing;
character.state.position = toPosition;
waitTimer = 0f;
if (!waitUntilFinished)
// If no display specified, do nothing
if (IsDisplayNone(display))
{
Continue();
}
else
{
StartCoroutine(WaitUntilFinished(fadeDuration));
}
}
protected virtual IEnumerator WaitUntilFinished(float duration)
{
// Wait until the timer has expired
// Any method can modify this timer variable to delay continuing.
waitTimer = duration;
while (waitTimer > 0f)
{
waitTimer -= Time.deltaTime;
yield return null;
}
Continue();
}
protected virtual void CreatePortraitObject(Character character, Stage stage)
{
// Create a new portrait object
GameObject portraitObj = new GameObject(character.name,
typeof(RectTransform),
typeof(CanvasRenderer),
typeof(Image));
// Set it to be a child of the stage
portraitObj.transform.SetParent(stage.portraitCanvas.transform, true);
// Configure the portrait image
Image portraitImage = portraitObj.GetComponent<Image>();
portraitImage.preserveAspect = true;
portraitImage.sprite = character.profileSprite;
portraitImage.color = new Color(1f, 1f, 1f, 0f);
// LeanTween doesn't handle 0 duration properly
float duration = (fadeDuration > 0f) ? fadeDuration : float.Epsilon;
// Fade in character image (first time)
LeanTween.alpha(portraitImage.transform as RectTransform, 1f, duration).setEase(stage.fadeEaseType);
// Tell character about portrait image
character.state.portraitImage = portraitImage;
}
protected void SetupPortrait(Character character, RectTransform fromPosition)
{
SetRectTransform(character.state.portraitImage.rectTransform, fromPosition);
if (character.state.facing != character.portraitsFace)
{
character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
}
else
{
character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
}
if (facing != character.portraitsFace)
{
character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
}
else
{
character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
}
}
public static void SetRectTransform(RectTransform oldRectTransform, RectTransform newRectTransform)
{
oldRectTransform.eulerAngles = newRectTransform.eulerAngles;
oldRectTransform.position = newRectTransform.position;
oldRectTransform.rotation = newRectTransform.rotation;
oldRectTransform.anchoredPosition = newRectTransform.anchoredPosition;
oldRectTransform.sizeDelta = newRectTransform.sizeDelta;
oldRectTransform.anchorMax = newRectTransform.anchorMax;
oldRectTransform.anchorMin = newRectTransform.anchorMin;
oldRectTransform.pivot = newRectTransform.pivot;
oldRectTransform.localScale = newRectTransform.localScale;
}
protected void Show(Character character, RectTransform fromPosition, RectTransform toPosition)
{
if (shiftIntoPlace)
{
fromPosition = Instantiate(toPosition) as RectTransform;
if (offset == PositionOffset.OffsetLeft)
{
fromPosition.anchoredPosition = new Vector2(fromPosition.anchoredPosition.x - Mathf.Abs(shiftOffset.x), fromPosition.anchoredPosition.y - Mathf.Abs(shiftOffset.y));
}
else if (offset == PositionOffset.OffsetRight)
{
fromPosition.anchoredPosition = new Vector2(fromPosition.anchoredPosition.x + Mathf.Abs(shiftOffset.x), fromPosition.anchoredPosition.y + Mathf.Abs(shiftOffset.y));
}
else
{
fromPosition.anchoredPosition = new Vector2(fromPosition.anchoredPosition.x, fromPosition.anchoredPosition.y);
}
}
SetupPortrait(character, fromPosition);
// LeanTween doesn't handle 0 duration properly
float duration = (fadeDuration > 0f) ? fadeDuration : float.Epsilon;
// Fade out a duplicate of the existing portrait image
if (character.state.portraitImage != null)
{
GameObject tempGO = GameObject.Instantiate(character.state.portraitImage.gameObject);
tempGO.transform.SetParent(character.state.portraitImage.transform, false);
tempGO.transform.localPosition = Vector3.zero;
tempGO.transform.localScale = character.state.position.localScale;
Image tempImage = tempGO.GetComponent<Image>();
tempImage.sprite = character.state.portraitImage.sprite;
tempImage.preserveAspect = true;
tempImage.color = character.state.portraitImage.color;
LeanTween.alpha(tempImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType).setOnComplete(() => {
Destroy(tempGO);
});
}
// Fade in the new sprite image
character.state.portraitImage.sprite = portrait;
character.state.portraitImage.color = new Color(1f, 1f, 1f, 0f);
LeanTween.alpha(character.state.portraitImage.rectTransform, 1f, duration).setEase(stage.fadeEaseType);
DoMoveTween(character, fromPosition, toPosition);
}
protected void Hide(Character character, RectTransform fromPosition, RectTransform toPosition)
{
if (character.state.display == DisplayType.None)
{
return;
}
SetupPortrait(character, fromPosition);
// LeanTween doesn't handle 0 duration properly
float duration = (fadeDuration > 0f) ? fadeDuration : float.Epsilon;
PortraitOptions options = new PortraitOptions();
LeanTween.alpha(character.state.portraitImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType);
DoMoveTween(character, fromPosition, toPosition);
}
protected void MoveToFront(Character character)
{
character.state.portraitImage.transform.SetSiblingIndex(character.state.portraitImage.transform.parent.childCount);
}
protected void DoMoveTween(Character character, RectTransform fromPosition, RectTransform toPosition)
{
// LeanTween doesn't handle 0 duration properly
float duration = (moveDuration > 0f) ? moveDuration : float.Epsilon;
// LeanTween.move uses the anchoredPosition, so all position images must have the same anchor position
LeanTween.move(character.state.portraitImage.gameObject, toPosition.position, duration).setEase(stage.fadeEaseType);
if (waitUntilFinished)
{
waitTimer = duration;
}
}
public static void SetDimmed(Character character, Stage stage, bool dimmedState)
{
if (character.state.dimmed == dimmedState)
{
return;
}
character.state.dimmed = dimmedState;
Color targetColor = dimmedState ? new Color(0.5f, 0.5f, 0.5f, 1f) : Color.white;
// LeanTween doesn't handle 0 duration properly
float duration = (stage.fadeDuration > 0f) ? stage.fadeDuration : float.Epsilon;
options.character = character;
options.replacedCharacter = replacedCharacter;
options.portrait = portrait;
options.display = display;
options.offset = offset;
options.fromPosition = fromPosition;
options.toPosition = toPosition;
options.facing = facing;
options.useDefaultSettings = useDefaultSettings;
options.fadeDuration = fadeDuration;
options.moveDuration = moveDuration;
options.shiftOffset = shiftOffset;
options.move = move;
options.shiftIntoPlace = shiftIntoPlace;
options.waitUntilFinished = waitUntilFinished;
stage.RunPortraitCommand(options, Continue);
LeanTween.color(character.state.portraitImage.rectTransform, targetColor, duration).setEase(stage.fadeEaseType);
}
public override string GetSummary()
{
if (display == DisplayType.None && character == null)

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

@ -0,0 +1,730 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using MoonSharp.Interpreter;
namespace Fungus
{
public struct PortraitOptions
{
public Character character;
public Character replacedCharacter;
public Sprite portrait;
public DisplayType display;
public PositionOffset offset;
public RectTransform fromPosition;
public RectTransform toPosition;
public FacingDirection facing;
public bool useDefaultSettings;
public float fadeDuration;
public float moveDuration;
public Vector2 shiftOffset;
public bool move; //sets to position to be the same as from
public bool shiftIntoPlace;
public bool waitUntilFinished;
public Action onComplete;
/// <summary>
/// Contains all options to run a portrait command.
/// </summary>
/// <param name="useDefaultSettings">Will use stage default times for animation and fade</param>
public PortraitOptions(bool useDefaultSettings = true)
{
// Defaults usually assigned on constructing a struct
character = null;
replacedCharacter = null;
portrait = null;
display = DisplayType.None;
offset = PositionOffset.None;
fromPosition = null;
toPosition = null;
facing = FacingDirection.None;
shiftOffset = new Vector2(0, 0);
move = false;
shiftIntoPlace = false;
waitUntilFinished = false;
onComplete = null;
// Special values that can be overriden
fadeDuration = 0.5f;
moveDuration = 1f;
this.useDefaultSettings = useDefaultSettings;
}
public override string ToString()
{
return base.ToString();
}
}
public struct PortraitState
{
public bool onScreen;
public bool dimmed;
public DisplayType display;
public Sprite portrait;
public RectTransform position;
public FacingDirection facing;
public Image portraitImage;
}
public enum DisplayType
{
None,
Show,
Hide,
Replace,
MoveToFront
}
public enum FacingDirection
{
None,
Left,
Right
}
public enum PositionOffset
{
None,
OffsetLeft,
OffsetRight
}
/// <summary>
/// Controls the Portrait sprites on stage
/// </summary>
public class PortraitController : MonoBehaviour
{
// Timer for waitUntilFinished functionality
protected float waitTimer;
protected Stage stage;
void Awake()
{
stage = GetComponentInParent<Stage>();
}
/// <summary>
/// Using all portrait options available, run any portrait command.
/// </summary>
/// <param name="options">Portrait Options</param>
/// <param name="onComplete">The function that will run once the portrait command finishes</param>
public void RunPortraitCommand(PortraitOptions options, Action onComplete)
{
waitTimer = 0f;
// If no character specified, do nothing
if (options.character == null)
{
onComplete();
return;
}
// If Replace and no replaced character specified, do nothing
if (options.display == DisplayType.Replace && options.replacedCharacter == null)
{
onComplete();
return;
}
// Early out if hiding a character that's already hidden
if (options.display == DisplayType.Hide &&
!options.character.state.onScreen)
{
onComplete();
return;
}
options = CleanPortraitOptions(options);
options.onComplete = onComplete;
switch (options.display)
{
case (DisplayType.Show):
Show(options);
break;
case (DisplayType.Hide):
Hide(options);
break;
case (DisplayType.Replace):
Show(options);
Hide(options.replacedCharacter, options.replacedCharacter.state.position.name);
break;
case (DisplayType.MoveToFront):
MoveToFront(options);
break;
}
}
private void FinishCommand(PortraitOptions options)
{
if (options.onComplete != null)
{
if (!options.waitUntilFinished)
{
options.onComplete();
}
else
{
StartCoroutine(WaitUntilFinished(options.fadeDuration, options.onComplete));
}
}
else
{
StartCoroutine(WaitUntilFinished(options.fadeDuration));
}
}
/// <summary>
/// Makes sure all options are set correctly so it won't break whatever command it's sent to
/// </summary>
/// <param name="options"></param>
/// <returns></returns>
private PortraitOptions CleanPortraitOptions(PortraitOptions options)
{
// Use default stage settings
if (options.useDefaultSettings)
{
options.fadeDuration = stage.fadeDuration;
options.moveDuration = stage.moveDuration;
options.shiftOffset = stage.shiftOffset;
}
// if no previous portrait, use default portrait
if (options.character.state.portrait == null)
{
options.character.state.portrait = options.character.profileSprite;
}
// Selected "use previous portrait"
if (options.portrait == null)
{
options.portrait = options.character.state.portrait;
}
// if no previous position, use default position
if (options.character.state.position == null)
{
options.character.state.position = stage.defaultPosition.rectTransform;
}
// Selected "use previous position"
if (options.toPosition == null)
{
options.toPosition = options.character.state.position;
}
if (options.replacedCharacter != null)
{
// if no previous position, use default position
if (options.replacedCharacter.state.position == null)
{
options.replacedCharacter.state.position = stage.defaultPosition.rectTransform;
}
}
// If swapping, use replaced character's position
if (options.display == DisplayType.Replace)
{
options.toPosition = options.replacedCharacter.state.position;
}
// Selected "use previous position"
if (options.fromPosition == null)
{
options.fromPosition = options.character.state.position;
}
// if portrait not moving, use from position is same as to position
if (!options.move)
{
options.fromPosition = options.toPosition;
}
if (options.display == DisplayType.Hide)
{
options.fromPosition = options.character.state.position;
}
// if no previous facing direction, use default facing direction
if (options.character.state.facing == FacingDirection.None)
{
options.character.state.facing = options.character.portraitsFace;
}
// Selected "use previous facing direction"
if (options.facing == FacingDirection.None)
{
options.facing = options.character.state.facing;
}
if (options.character.state.portraitImage == null)
{
CreatePortraitObject(options.character, options.fadeDuration);
}
return options;
}
/// <summary>
/// Creates and sets the portrait image for a character
/// </summary>
/// <param name="character"></param>
/// <param name="fadeDuration"></param>
private void CreatePortraitObject(Character character, float fadeDuration)
{
// Create a new portrait object
GameObject portraitObj = new GameObject(character.name,
typeof(RectTransform),
typeof(CanvasRenderer),
typeof(Image));
// Set it to be a child of the stage
portraitObj.transform.SetParent(stage.portraitCanvas.transform, true);
// Configure the portrait image
Image portraitImage = portraitObj.GetComponent<Image>();
portraitImage.preserveAspect = true;
portraitImage.sprite = character.profileSprite;
portraitImage.color = new Color(1f, 1f, 1f, 0f);
// LeanTween doesn't handle 0 duration properly
float duration = (fadeDuration > 0f) ? fadeDuration : float.Epsilon;
// Fade in character image (first time)
LeanTween.alpha(portraitImage.transform as RectTransform, 1f, duration).setEase(stage.fadeEaseType);
// Tell character about portrait image
character.state.portraitImage = portraitImage;
}
private IEnumerator WaitUntilFinished(float duration, Action onComplete = null)
{
// Wait until the timer has expired
// Any method can modify this timer variable to delay continuing.
waitTimer = duration;
while (waitTimer > 0f)
{
waitTimer -= Time.deltaTime;
yield return null;
}
if (onComplete != null)
{
onComplete();
}
}
private void SetupPortrait(PortraitOptions options)
{
SetRectTransform(options.character.state.portraitImage.rectTransform, options.fromPosition);
if (options.character.state.facing != options.character.portraitsFace)
{
options.character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
}
else
{
options.character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
}
if (options.facing != options.character.portraitsFace)
{
options.character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
}
else
{
options.character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
}
}
public static void SetRectTransform(RectTransform oldRectTransform, RectTransform newRectTransform)
{
oldRectTransform.eulerAngles = newRectTransform.eulerAngles;
oldRectTransform.position = newRectTransform.position;
oldRectTransform.rotation = newRectTransform.rotation;
oldRectTransform.anchoredPosition = newRectTransform.anchoredPosition;
oldRectTransform.sizeDelta = newRectTransform.sizeDelta;
oldRectTransform.anchorMax = newRectTransform.anchorMax;
oldRectTransform.anchorMin = newRectTransform.anchorMin;
oldRectTransform.pivot = newRectTransform.pivot;
oldRectTransform.localScale = newRectTransform.localScale;
}
/// <summary>
/// Moves Character in front of other characters on stage
/// </summary>
/// <param name="character"></param>
public void MoveToFront(Character character)
{
PortraitOptions options = new PortraitOptions(true);
options.character = character;
MoveToFront(CleanPortraitOptions(options));
}
public void MoveToFront(PortraitOptions options)
{
options.character.state.portraitImage.transform.SetSiblingIndex(options.character.state.portraitImage.transform.parent.childCount);
options.character.state.display = DisplayType.MoveToFront;
FinishCommand(options);
}
public void DoMoveTween(Character character, RectTransform fromPosition, RectTransform toPosition, float moveDuration, Boolean waitUntilFinished)
{
PortraitOptions options = new PortraitOptions(true);
options.character = character;
options.fromPosition = fromPosition;
options.toPosition = toPosition;
options.moveDuration = moveDuration;
options.waitUntilFinished = waitUntilFinished;
DoMoveTween(CleanPortraitOptions(options));
}
public void DoMoveTween(PortraitOptions options)
{
// LeanTween doesn't handle 0 duration properly
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(options.character.state.portraitImage.gameObject, options.toPosition.position, duration).setEase(stage.fadeEaseType);
if (options.waitUntilFinished)
{
waitTimer = duration;
}
}
/// <summary>
/// Shows character at a named position in the stage
/// </summary>
/// <param name="character"></param>
/// <param name="position">Named position on stage</param>
public void Show(Character character, string position)
{
PortraitOptions options = new PortraitOptions(true);
options.character = character;
options.fromPosition = options.toPosition = stage.GetPosition(position);
Show(CleanPortraitOptions(options));
}
/// <summary>
/// Shows character moving from a position to a position
/// </summary>
/// <param name="character"></param>
/// <param name="portrait"></param>
/// <param name="fromPosition">Where the character will appear</param>
/// <param name="toPosition">Where the character will move to</param>
public void Show(Character character, string portrait, string fromPosition, string toPosition)
{
PortraitOptions options = new PortraitOptions(true);
options.character = character;
options.portrait = character.GetPortrait(portrait);
options.fromPosition = stage.GetPosition(fromPosition);
options.toPosition = stage.GetPosition(toPosition);
options.move = true;
Show(CleanPortraitOptions(options));
}
/// <summary>
/// From lua, you can pass an options table with named arguments
/// example:
/// stage.show{character=jill, portrait="happy", fromPosition="right", toPosition="left"}
/// Any option available in the PortraitOptions is available from Lua
/// </summary>
/// <param name="optionsTable">Moonsharp Table</param>
public void Show(Table optionsTable)
{
Show(CleanPortraitOptions(PortraitUtil.ConvertTableToPortraitOptions(optionsTable, stage)));
}
/// <summary>
/// Show portrait with the supplied portrait options
/// </summary>
/// <param name="options"></param>
public void Show(PortraitOptions options)
{
if (options.shiftIntoPlace)
{
options.fromPosition = Instantiate(options.toPosition) as RectTransform;
if (options.offset == PositionOffset.OffsetLeft)
{
options.fromPosition.anchoredPosition =
new Vector2(options.fromPosition.anchoredPosition.x - Mathf.Abs(options.shiftOffset.x),
options.fromPosition.anchoredPosition.y - Mathf.Abs(options.shiftOffset.y));
}
else if (options.offset == PositionOffset.OffsetRight)
{
options.fromPosition.anchoredPosition =
new Vector2(options.fromPosition.anchoredPosition.x + Mathf.Abs(options.shiftOffset.x),
options.fromPosition.anchoredPosition.y + Mathf.Abs(options.shiftOffset.y));
}
else
{
options.fromPosition.anchoredPosition = new Vector2(options.fromPosition.anchoredPosition.x, options.fromPosition.anchoredPosition.y);
}
}
SetupPortrait(options);
// LeanTween doesn't handle 0 duration properly
float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon;
// Fade out a duplicate of the existing portrait image
if (options.character.state.portraitImage != null)
{
GameObject tempGO = GameObject.Instantiate(options.character.state.portraitImage.gameObject);
tempGO.transform.SetParent(options.character.state.portraitImage.transform, false);
tempGO.transform.localPosition = Vector3.zero;
tempGO.transform.localScale = options.character.state.position.localScale;
Image tempImage = tempGO.GetComponent<Image>();
tempImage.sprite = options.character.state.portraitImage.sprite;
tempImage.preserveAspect = true;
tempImage.color = options.character.state.portraitImage.color;
LeanTween.alpha(tempImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType).setOnComplete(() => {
Destroy(tempGO);
});
}
// Fade in the new sprite image
options.character.state.portraitImage.sprite = options.portrait;
options.character.state.portraitImage.color = new Color(1f, 1f, 1f, 0f);
LeanTween.alpha(options.character.state.portraitImage.rectTransform, 1f, duration).setEase(stage.fadeEaseType);
DoMoveTween(options);
FinishCommand(options);
if (!stage.charactersOnStage.Contains(options.character))
{
stage.charactersOnStage.Add(options.character);
}
// Update character state after showing
options.character.state.onScreen = true;
options.character.state.display = DisplayType.Show;
options.character.state.portrait = options.portrait;
options.character.state.facing = options.facing;
options.character.state.position = options.toPosition;
}
/// <summary>
/// Simple show command that shows the character with an available named portrait
/// </summary>
/// <param name="character">Character to show</param>
/// <param name="portrait">Named portrait to show for the character, i.e. "angry", "happy", etc</param>
public void ShowPortrait(Character character, string portrait)
{
PortraitOptions options = new PortraitOptions(true);
options.character = character;
options.portrait = character.GetPortrait(portrait);
if (character.state.position == null)
{
options.toPosition = options.fromPosition = stage.GetPosition("middle");
}
else
{
options.fromPosition = options.toPosition = character.state.position;
}
Show(CleanPortraitOptions(options));
}
/// <summary>
/// Simple character hide command
/// </summary>
/// <param name="character">Character to hide</param>
public void Hide(Character character)
{
PortraitOptions options = new PortraitOptions(true);
options.character = character;
Hide(CleanPortraitOptions(options));
}
/// <summary>
/// Move the character to a position then hide it
/// </summary>
/// <param name="character"></param>
/// <param name="toPosition">Where the character will disapear to</param>
public void Hide(Character character, string toPosition)
{
PortraitOptions options = new PortraitOptions(true);
options.character = character;
options.toPosition = stage.GetPosition(toPosition);
options.move = true;
Hide(CleanPortraitOptions(options));
}
/// <summary>
/// From lua, you can pass an options table with named arguments
/// example:
/// stage.hide{character=jill, toPosition="left"}
/// Any option available in the PortraitOptions is available from Lua
/// </summary>
/// <param name="optionsTable">Moonsharp Table</param>
public void Hide(Table optionsTable)
{
Hide(CleanPortraitOptions(PortraitUtil.ConvertTableToPortraitOptions(optionsTable, stage)));
}
/// <summary>
/// Hide portrait with provided options
/// </summary>
/// <param name="options"></param>
public void Hide(PortraitOptions options)
{
if (options.character.state.display == DisplayType.None)
{
return;
}
SetupPortrait(options);
// LeanTween doesn't handle 0 duration properly
float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon;
LeanTween.alpha(options.character.state.portraitImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType);
DoMoveTween(options);
stage.charactersOnStage.Remove(options.character);
//update character state after hiding
options.character.state.onScreen = false;
options.character.state.portrait = options.portrait;
options.character.state.facing = options.facing;
options.character.state.position = options.toPosition;
options.character.state.display = DisplayType.Hide;
FinishCommand(options);
}
public void SetDimmed(Character character, bool dimmedState)
{
if (character.state.dimmed == dimmedState)
{
return;
}
character.state.dimmed = dimmedState;
Color targetColor = dimmedState ? new Color(0.5f, 0.5f, 0.5f, 1f) : Color.white;
// LeanTween doesn't handle 0 duration properly
float duration = (stage.fadeDuration > 0f) ? stage.fadeDuration : float.Epsilon;
LeanTween.color(character.state.portraitImage.rectTransform, targetColor, duration).setEase(stage.fadeEaseType);
}
}
/// <summary>
/// Util functions that I wanted to keep the main class clean of
/// </summary>
public class PortraitUtil {
/// <summary>
/// Convert a Moonsharp table to portrait options
/// If the table returns a null for any of the parameters, it should keep the defaults
/// </summary>
/// <param name="table">Moonsharp Table</param>
/// <param name="stage">Stage</param>
/// <returns></returns>
public static PortraitOptions ConvertTableToPortraitOptions(Table table, Stage stage)
{
PortraitOptions options = new PortraitOptions(true);
// If the table supplies a nil, keep the default
options.character = table.Get("character").ToObject<Character>()
?? options.character;
options.replacedCharacter = table.Get("replacedCharacter").ToObject<Character>()
?? options.replacedCharacter;
if (!table.Get("portrait").IsNil())
{
options.portrait = options.character.GetPortrait(table.Get("portrait").CastToString());
}
if (!table.Get("display").IsNil())
{
options.display = table.Get("display").ToObject<DisplayType>();
}
if (!table.Get("offset").IsNil())
{
options.offset = table.Get("offset").ToObject<PositionOffset>();
}
if (!table.Get("fromPosition").IsNil())
{
options.fromPosition = stage.GetPosition(table.Get("fromPosition").CastToString());
}
if (!table.Get("toPosition").IsNil())
{
options.toPosition = stage.GetPosition(table.Get("toPosition").CastToString());
}
if (!table.Get("facing").IsNil())
{
options.facing = table.Get("facing").ToObject<FacingDirection>();
}
if (!table.Get("useDefaultSettings").IsNil())
{
options.useDefaultSettings = table.Get("useDefaultSettings").CastToBool();
}
if (!table.Get("fadeDuration").IsNil())
{
options.fadeDuration = table.Get("fadeDuration").ToObject<float>();
}
if (!table.Get("moveDuration").IsNil())
{
options.moveDuration = table.Get("moveDuration").ToObject<float>();
}
if (!table.Get("move").IsNil())
{
options.move = table.Get("move").CastToBool();
}
else if (options.fromPosition != options.toPosition)
{
options.move = true;
}
if (!table.Get("shiftIntoPlace").IsNil())
{
options.shiftIntoPlace = table.Get("shiftIntoPlace").CastToBool();
}
//TODO: Make the next lua command wait when this options is true
if (!table.Get("waitUntilFinished").IsNil())
{
options.waitUntilFinished = table.Get("waitUntilFinished").CastToBool();
}
return options;
}
}
}

12
Assets/Fungus/Narrative/Scripts/PortraitController.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: cc7c4e379c0d3bb4eb7537ad653ea7f6
timeCreated: 1465412488
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

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

@ -261,21 +261,22 @@ namespace Fungus
speakingCharacter = character;
// Dim portraits of non-speaking characters
foreach (Stage s in Stage.activeStages)
foreach (Stage stage in Stage.activeStages)
{
if (s.dimPortraits)
if (stage.dimPortraits)
{
foreach (Character c in s.charactersOnStage)
foreach (Character c in stage.charactersOnStage)
{
if (prevSpeakingCharacter != speakingCharacter)
{
if (c != speakingCharacter)
{
Portrait.SetDimmed(c, s, true);
stage.SetDimmed(c, true);
}
else
{
Portrait.SetDimmed(c, s, false);
stage.SetDimmed(c, false);
}
}
}
@ -387,7 +388,7 @@ namespace Fungus
{
LeanTween.cancel(c.state.portraitImage.gameObject, true);
Portrait.SetRectTransform(c.state.portraitImage.rectTransform, c.state.position);
PortraitController.SetRectTransform(c.state.portraitImage.rectTransform, c.state.position);
if (c.state.dimmed == true)
{
c.state.portraitImage.color = new Color(0.5f, 0.5f, 0.5f, 1f);

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

@ -9,7 +9,7 @@ namespace Fungus
{
[ExecuteInEditMode]
public class Stage : MonoBehaviour
public class Stage : PortraitController
{
public Canvas portraitCanvas;
public bool dimPortraits;
@ -25,7 +25,7 @@ namespace Fungus
[HideInInspector]
static public List<Stage> activeStages = new List<Stage>();
protected virtual void OnEnable()
protected virtual void OnEnable()
{
if (!activeStages.Contains(this))
{
@ -47,6 +47,31 @@ namespace Fungus
portraitCanvas.gameObject.SetActive(true);
}
}
}
/// <summary>
/// Searches the stage's named positions
/// If none matches the string provided, give a warning and return a new RectTransform
/// </summary>
/// <param name="position_string">Position name to search for</param>
/// <returns></returns>
public RectTransform GetPosition(String position_string)
{
if (position_string == null)
{
Debug.LogWarning("Missing stage position.");
return new RectTransform();
}
foreach (RectTransform position in positions)
{
if ( String.Compare(position.name, position_string, true) == 0 )
{
return position;
}
}
Debug.LogWarning("Unidentified stage position: " + position_string);
return new RectTransform();
}
}
}

12
Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs vendored

@ -21,6 +21,7 @@ namespace Fungus
protected SerializedProperty tableNameProp;
protected SerializedProperty registerTypesProp;
protected SerializedProperty boundObjectsProp;
protected SerializedProperty showInheritedProp;
protected string bindingHelpItem = "";
protected string bindingHelpDetail = "";
@ -32,6 +33,7 @@ namespace Fungus
tableNameProp = serializedObject.FindProperty("tableName");
registerTypesProp = serializedObject.FindProperty("registerTypes");
boundObjectsProp = serializedObject.FindProperty("boundObjects");
showInheritedProp = serializedObject.FindProperty("showInherited");
CreateBoundObjectsList();
}
@ -213,8 +215,14 @@ namespace Fungus
continue;
}
BindingFlags flags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public;
if (!showInheritedProp.boolValue)
{
flags |= BindingFlags.DeclaredOnly;
}
// Show info for fields and properties
MemberInfo[] memberInfos = inspectObject.GetType().GetMembers(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly);
MemberInfo[] memberInfos = inspectObject.GetType().GetMembers(flags);
foreach (MemberInfo memberInfo in memberInfos)
{
if (memberInfo.MemberType != MemberTypes.Field &&
@ -315,6 +323,8 @@ namespace Fungus
EditorGUILayout.EndHorizontal();
EditorGUILayout.PropertyField(showInheritedProp);
// Show help info for currently selected item
if (bindingHelpItem != "")
{

3
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs vendored

@ -63,6 +63,9 @@ namespace Fungus
[Tooltip("The list of Unity objects to be bound to make them accessible in Lua script.")]
public List<BoundObject> boundObjects = new List<BoundObject>();
[Tooltip("Show inherited public members.")]
public bool showInherited;
/// <summary>
/// Always ensure there is at least one row in the bound objects list.
/// </summary>

736
Assets/FungusExamples/FungusLua/Narrative/PortaitControlExample.unity

@ -0,0 +1,736 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &104527169
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 104527174}
- 20: {fileID: 104527173}
- 92: {fileID: 104527172}
- 124: {fileID: 104527171}
- 81: {fileID: 104527170}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &104527170
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 104527169}
m_Enabled: 1
--- !u!124 &104527171
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 104527169}
m_Enabled: 1
--- !u!92 &104527172
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 104527169}
m_Enabled: 1
--- !u!20 &104527173
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 104527169}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &104527174
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 104527169}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &574033265
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 574033270}
- 114: {fileID: 574033269}
- 114: {fileID: 574033268}
- 114: {fileID: 574033267}
- 114: {fileID: 574033272}
- 114: {fileID: 574033266}
m_Layer: 0
m_Name: Flowchart
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &574033266
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 574033265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 71f455683d4ba4405b8dbba457159620, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 4
errorMessage:
indentLevel: 0
luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Shows how to use stage.show with positional arguments
-- This method is less verbose but also easier to get wrong!
stage.show(watson, "left")
setcharacter(watson)
say "Sherlock....."
stage.show(sherlock, "angry", "offscreen right", "right")
setcharacter(sherlock)
say "{i}what?{/i}"
setcharacter(watson)
say "You don''t understand how I feel! I''m leaving!"
stage.hide(watson, "offscreen left")
stage.showPortrait(sherlock, "bored")
setcharacter(sherlock)
say "Look at me~! I''m Watson~! I''m grumpy all the tii~me."
stage.hide(sherlock, "offscreen right")
stage.show(watson, "confident", "offscreen left", "left")
setcharacter(watson)
say "I showed him!"
stage.hide(watson)'
runAsCoroutine: 1
waitUntilFinished: 1
returnVariable: {fileID: 0}
--- !u!114 &574033267
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 574033265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3}
m_Name:
m_EditorClassIdentifier:
parentBlock: {fileID: 574033268}
--- !u!114 &574033268
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 574033265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3}
m_Name:
m_EditorClassIdentifier:
nodeRect:
serializedVersion: 2
x: 67
y: 70
width: 120
height: 40
itemId: 0
blockName: Start
description:
eventHandler: {fileID: 574033267}
commandList:
- {fileID: 574033272}
- {fileID: 574033266}
--- !u!114 &574033269
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 574033265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
blockViewHeight: 214
zoom: 1
scrollViewRect:
serializedVersion: 2
x: -343
y: -340
width: 1114
height: 859
selectedBlock: {fileID: 574033268}
selectedCommands:
- {fileID: 574033266}
variables: []
description:
stepPause: 0
colorCommands: 1
hideComponents: 1
saveSelection: 1
localizationId:
showLineNumbers: 0
hideCommands: []
--- !u!4 &574033270
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 574033265}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
--- !u!114 &574033272
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 574033265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 71f455683d4ba4405b8dbba457159620, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 3
errorMessage:
indentLevel: 0
luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Shows how to use stage.show with named arguments
stage.show{character=watson, fromPosition="offscreen right", toPosition="right"}
stage.show{character=sherlock, portrait="angry"}
wait(1)
stage.show{character=sherlock, portrait="bored"}
wait(1)
stage.hide{character=sherlock}
wait(1)
stage.hide{character=watson}
wait(1)'
runAsCoroutine: 1
waitUntilFinished: 1
returnVariable: {fileID: 0}
--- !u!1 &653560666 stripped
GameObject:
m_PrefabParentObject: {fileID: 110274, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
m_PrefabInternal: {fileID: 2059718440}
--- !u!114 &653560667 stripped
MonoBehaviour:
m_PrefabParentObject: {fileID: 11410274, guid: c6289d5f8fa843145a2355af9cb09719,
type: 2}
m_PrefabInternal: {fileID: 2059718440}
m_Script: {fileID: 11500000, guid: 6f6478b25a400c642b2dee75f022ab12, type: 3}
--- !u!1 &682432115
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 178698, guid: e0c2b90c058ff43f4a56a266d4fa721b, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 682432117}
- 114: {fileID: 682432116}
m_Layer: 0
m_Name: LuaBindings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &682432116
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11414792, guid: e0c2b90c058ff43f4a56a266d4fa721b,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 682432115}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4cc8a659e950044b69d7c62696c36962, type: 3}
m_Name:
m_EditorClassIdentifier:
allEnvironments: 1
luaEnvironment: {fileID: 0}
tableName:
registerTypes: 1
boundTypes:
- UnityEngine.GameObject, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.PrimitiveType, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.Component, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- System.Type, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- UnityEngine.SendMessageOptions, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
- UnityEngine.SceneManagement.Scene, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
- UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Fungus.Character, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.Sprite, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.Color, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.AudioClip, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- Fungus.FacingDirection, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- Fungus.PortraitState, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- Fungus.SayDialog, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- Fungus.Stage, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.Canvas, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- LeanTweenType, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.Vector2, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.UI.Image, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
boundObjects:
- key: sherlock
obj: {fileID: 1876668763}
component: {fileID: 1876668764}
- key: watson
obj: {fileID: 1818980091}
component: {fileID: 1818980092}
- key: stage
obj: {fileID: 653560666}
component: {fileID: 653560667}
showInherited: 1
--- !u!4 &682432117
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 403334, guid: e0c2b90c058ff43f4a56a266d4fa721b, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 682432115}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &856587351
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 856587355}
- 114: {fileID: 856587354}
- 114: {fileID: 856587353}
- 114: {fileID: 856587352}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &856587352
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 856587351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ForceModuleActive: 0
--- !u!114 &856587353
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 856587351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &856587354
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 856587351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 5
--- !u!4 &856587355
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 856587351}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
--- !u!1 &1756024128
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1756024130}
- 114: {fileID: 1756024129}
m_Layer: 0
m_Name: _FungusState
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1756024129
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1756024128}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name:
m_EditorClassIdentifier:
selectedFlowchart: {fileID: 574033269}
--- !u!4 &1756024130
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1756024128}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!1 &1818980091
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100000, guid: b20518d45890e4be59ba82946f88026c, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1818980093}
- 114: {fileID: 1818980092}
m_Layer: 0
m_Name: Character_watson
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1818980092
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400000, guid: b20518d45890e4be59ba82946f88026c,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1818980091}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 25fb867d2049d41f597aefdd6b19f598, type: 3}
m_Name:
m_EditorClassIdentifier:
nameText: Watson
nameColor: {r: 1, g: 1, b: 1, a: 1}
soundEffect: {fileID: 0}
profileSprite: {fileID: 21300000, guid: a92b08a118b7d46f59dd091acb2e4102, type: 3}
portraits:
- {fileID: 21300000, guid: a92b08a118b7d46f59dd091acb2e4102, type: 3}
- {fileID: 21300000, guid: 03bc547cc0049594bae51f00903eedef, type: 3}
portraitsFace: 0
setSayDialog: {fileID: 0}
description:
--- !u!4 &1818980093
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400000, guid: b20518d45890e4be59ba82946f88026c, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1818980091}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
--- !u!1 &1876668763
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100000, guid: b20518d45890e4be59ba82946f88026c, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1876668765}
- 114: {fileID: 1876668764}
m_Layer: 0
m_Name: Character_sherlock
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1876668764
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400000, guid: b20518d45890e4be59ba82946f88026c,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1876668763}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 25fb867d2049d41f597aefdd6b19f598, type: 3}
m_Name:
m_EditorClassIdentifier:
nameText: Sherlock
nameColor: {r: 1, g: 1, b: 1, a: 1}
soundEffect: {fileID: 0}
profileSprite: {fileID: 21300000, guid: 8f5b5b110e73a414eb229eeead86200f, type: 3}
portraits:
- {fileID: 21300000, guid: 8f5b5b110e73a414eb229eeead86200f, type: 3}
- {fileID: 21300000, guid: c779e34c6eb8e45da98c70cf2802a54c, type: 3}
portraitsFace: 0
setSayDialog: {fileID: 0}
description:
--- !u!4 &1876668765
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400000, guid: b20518d45890e4be59ba82946f88026c, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1876668763}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
--- !u!1001 &2059718440
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c6289d5f8fa843145a2355af9cb09719, type: 2}
m_IsPrefabParent: 0

8
Assets/FungusExamples/FungusLua/Narrative/PortaitControlExample.unity.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3312c37f754b09a4cbd29b7605692148
timeCreated: 1465575269
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

689
Assets/Tests/Lua/FungusTests.unity

File diff suppressed because it is too large Load Diff

118
Assets/Tests/Narrative/NarrativeTests.unity

@ -112,7 +112,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name:
m_EditorClassIdentifier:
selectedFlowchart: {fileID: 1555865767}
selectedFlowchart: {fileID: 0}
--- !u!4 &11556238
Transform:
m_ObjectHideFlags: 1
@ -3725,7 +3725,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &528531414
MonoBehaviour:
m_ObjectHideFlags: 0
@ -5547,10 +5547,10 @@ RectTransform:
- {fileID: 2143346849}
m_Father: {fileID: 760607770}
m_RootOrder: 4
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 650, y: -470}
m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &674815460
MonoBehaviour:
@ -5970,7 +5970,8 @@ MonoBehaviour:
width: 1114
height: 859
selectedBlock: {fileID: 711866615}
selectedCommands: []
selectedCommands:
- {fileID: 711866618}
variables: []
description: '
@ -5996,8 +5997,8 @@ MonoBehaviour:
itemId: 1
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 1635768761}
replacedCharacter: {fileID: 0}
portrait: {fileID: 21300000, guid: 450277e404c2d4d1e87c5bd4012283bb, type: 3}
@ -6014,7 +6015,7 @@ MonoBehaviour:
waitUntilFinished: 0
--- !u!114 &711866618
MonoBehaviour:
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 711866612}
@ -6040,8 +6041,8 @@ MonoBehaviour:
itemId: 3
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 1635768761}
replacedCharacter: {fileID: 0}
portrait: {fileID: 21300000, guid: c779e34c6eb8e45da98c70cf2802a54c, type: 3}
@ -6184,10 +6185,10 @@ RectTransform:
- {fileID: 1186288425}
m_Father: {fileID: 760607770}
m_RootOrder: 3
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 650, y: -365}
m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &726991599
MonoBehaviour:
@ -7040,7 +7041,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000018477, y: 191}
m_SizeDelta: {x: 1300, y: 0}
m_SizeDelta: {x: 1300, y: 680}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &760607771
MonoBehaviour:
@ -7819,7 +7820,6 @@ GameObject:
m_Component:
- 4: {fileID: 825247592}
- 114: {fileID: 825247591}
- 114: {fileID: 825247593}
m_Layer: 0
m_Name: Stage
m_TagString: Untagged
@ -7867,17 +7867,6 @@ Transform:
- {fileID: 131087274}
m_Father: {fileID: 1667572790}
m_RootOrder: 2
--- !u!114 &825247593
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 825247590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cd9f5c93d50b44e9ba1b822ff6993500, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &852567084
MonoBehaviour:
m_ObjectHideFlags: 0
@ -7931,10 +7920,10 @@ RectTransform:
- {fileID: 2095206454}
m_Father: {fileID: 760607770}
m_RootOrder: 5
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 650, y: -575}
m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &854322377
MonoBehaviour:
@ -8739,6 +8728,7 @@ MonoBehaviour:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159676}
commandIndex: 0
callMode: 2
--- !u!114 &891159647
MonoBehaviour:
@ -8771,6 +8761,7 @@ MonoBehaviour:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159676}
commandIndex: 0
callMode: 2
--- !u!114 &891159649
MonoBehaviour:
@ -8906,6 +8897,7 @@ MonoBehaviour:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159644}
commandIndex: 0
callMode: 2
--- !u!114 &891159656
MonoBehaviour:
@ -8992,8 +8984,8 @@ MonoBehaviour:
itemId: 29
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 362523163}
replacedCharacter: {fileID: 290123700}
portrait: {fileID: 0}
@ -9022,8 +9014,8 @@ MonoBehaviour:
itemId: 28
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 362523163}
replacedCharacter: {fileID: 290123700}
portrait: {fileID: 21300000, guid: f0a480312d1664a9d9c7749fed3eb1b5, type: 3}
@ -9067,8 +9059,8 @@ MonoBehaviour:
itemId: 26
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 4
stage: {fileID: 0}
character: {fileID: 362523163}
replacedCharacter: {fileID: 290123700}
portrait: {fileID: 0}
@ -9097,8 +9089,8 @@ MonoBehaviour:
itemId: 25
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 290123700}
replacedCharacter: {fileID: 290123700}
portrait: {fileID: 0}
@ -9142,8 +9134,8 @@ MonoBehaviour:
itemId: 23
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 3
stage: {fileID: 0}
character: {fileID: 362523163}
replacedCharacter: {fileID: 290123700}
portrait: {fileID: 21300000, guid: daa5ae3d727b143f0b42aaa4e6b1e2a5, type: 3}
@ -9187,8 +9179,8 @@ MonoBehaviour:
itemId: 21
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 2
stage: {fileID: 0}
character: {fileID: 362523163}
replacedCharacter: {fileID: 0}
portrait: {fileID: 0}
@ -9232,8 +9224,8 @@ MonoBehaviour:
itemId: 19
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 290123700}
replacedCharacter: {fileID: 0}
portrait: {fileID: 21300000, guid: 10cc2fec4b8aa4db983981588b06b591, type: 3}
@ -9262,8 +9254,8 @@ MonoBehaviour:
itemId: 18
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 362523163}
replacedCharacter: {fileID: 0}
portrait: {fileID: 21300000, guid: b498a62f179e149be9515ba5614ccfa3, type: 3}
@ -10428,10 +10420,10 @@ RectTransform:
- {fileID: 1399333576}
m_Father: {fileID: 760607770}
m_RootOrder: 2
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 650, y: -260}
m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1037116039
MonoBehaviour:
@ -12507,6 +12499,7 @@ MonoBehaviour:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 1196429433}
commandIndex: 0
callMode: 1
--- !u!114 &1196429433
MonoBehaviour:
@ -13225,10 +13218,10 @@ RectTransform:
- {fileID: 1360071173}
m_Father: {fileID: 760607770}
m_RootOrder: 1
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 650, y: -155}
m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1389373603
MonoBehaviour:
@ -15579,10 +15572,10 @@ RectTransform:
- {fileID: 1325423831}
m_Father: {fileID: 760607770}
m_RootOrder: 6
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 650, y: -655}
m_SizeDelta: {x: 1300, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1711682873
MonoBehaviour:
@ -17899,10 +17892,10 @@ RectTransform:
- {fileID: 1077696039}
m_Father: {fileID: 760607770}
m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 650, y: -50}
m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1959629232
MonoBehaviour:
@ -18685,7 +18678,7 @@ RectTransform:
m_Father: {fileID: 1325423831}
m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@ -18985,8 +18978,9 @@ MonoBehaviour:
y: -340
width: 1114
height: 859
selectedBlock: {fileID: 0}
selectedCommands: []
selectedBlock: {fileID: 2043226673}
selectedCommands:
- {fileID: 2043226677}
variables: []
description:
stepPause: 0
@ -19010,8 +19004,8 @@ MonoBehaviour:
itemId: 1
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 1065579872}
replacedCharacter: {fileID: 0}
portrait: {fileID: 21300000, guid: 820bab66bb5a044ec961ba8ee3b045cc, type: 3}
@ -19083,8 +19077,8 @@ MonoBehaviour:
itemId: 2
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
stage: {fileID: 0}
character: {fileID: 1065579872}
replacedCharacter: {fileID: 0}
portrait: {fileID: 21300000, guid: 5b776e5296df54952a07a367943f5c7c, type: 3}
@ -19131,9 +19125,9 @@ MonoBehaviour:
itemId: 5
errorMessage:
indentLevel: 0
stage: {fileID: 0}
display: 1
character: {fileID: 1065579872}
stage: {fileID: 0}
character: {fileID: 0}
replacedCharacter: {fileID: 0}
portrait: {fileID: 21300000, guid: 820bab66bb5a044ec961ba8ee3b045cc, type: 3}
offset: 0

Loading…
Cancel
Save