From d1636c94c88ac33738e4a16ab774d14e2c699345 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 4 Sep 2014 11:14:01 +0100 Subject: [PATCH] Removed left / right setting for characters Should use alternate dialogs if feature is required --- Assets/Fungus/Dialog/Commands/Say.cs | 4 +- .../Fungus/Dialog/Editor/CharacterEditor.cs | 4 -- Assets/Fungus/Dialog/Scripts/Character.cs | 1 - Assets/Fungus/Dialog/Scripts/Dialog.cs | 44 ++++-------------- Assets/Shuttle/ShuttleGame.unity | Bin 129828 -> 128732 bytes 5 files changed, 12 insertions(+), 41 deletions(-) diff --git a/Assets/Fungus/Dialog/Commands/Say.cs b/Assets/Fungus/Dialog/Commands/Say.cs index 656a37ff..e3664c8d 100644 --- a/Assets/Fungus/Dialog/Commands/Say.cs +++ b/Assets/Fungus/Dialog/Commands/Say.cs @@ -51,10 +51,10 @@ namespace Fungus.Script activeDialog = dialog; } - dialog.ShowDialog(true); - dialog.SetCharacter(character); + dialog.ShowDialog(true); + if (voiceOverClip != null) { MusicController.GetInstance().PlaySound(voiceOverClip, 1f); diff --git a/Assets/Fungus/Dialog/Editor/CharacterEditor.cs b/Assets/Fungus/Dialog/Editor/CharacterEditor.cs index 8b827344..6a59e4c1 100644 --- a/Assets/Fungus/Dialog/Editor/CharacterEditor.cs +++ b/Assets/Fungus/Dialog/Editor/CharacterEditor.cs @@ -42,9 +42,6 @@ namespace Fungus.Script typeof(Sprite), true) as Sprite; - SayDialog.DialogSide dialogSide = (SayDialog.DialogSide)EditorGUILayout.EnumPopup(new GUIContent("Image Side", "Which side to display the image in the dialog"), - t.dialogSide); - EditorGUILayout.Separator(); if (characterImage != null && @@ -68,7 +65,6 @@ namespace Fungus.Script t.characterName = characterName; t.characterColor = characterColor; t.characterImage = characterImage; - t.dialogSide = dialogSide; } } diff --git a/Assets/Fungus/Dialog/Scripts/Character.cs b/Assets/Fungus/Dialog/Scripts/Character.cs index 7e1e0e86..a46bf102 100644 --- a/Assets/Fungus/Dialog/Scripts/Character.cs +++ b/Assets/Fungus/Dialog/Scripts/Character.cs @@ -10,7 +10,6 @@ namespace Fungus.Script { public string characterName; public Sprite characterImage; - public SayDialog.DialogSide dialogSide; public Color characterColor; static public List activeCharacters = new List(); diff --git a/Assets/Fungus/Dialog/Scripts/Dialog.cs b/Assets/Fungus/Dialog/Scripts/Dialog.cs index e3256ce7..011bd96c 100644 --- a/Assets/Fungus/Dialog/Scripts/Dialog.cs +++ b/Assets/Fungus/Dialog/Scripts/Dialog.cs @@ -11,12 +11,6 @@ namespace Fungus.Script public class Dialog : MonoBehaviour { - public enum DialogSide - { - Left, - Right - }; - public float writingSpeed = 60; public AudioClip writingSound; public bool loopWritingSound = true; @@ -25,8 +19,7 @@ namespace Fungus.Script public Canvas dialogCanvas; public Text nameText; public Text storyText; - public Image leftImage; - public Image rightImage; + public Image characterImage; float currentSpeed; float currentPunctuationPause; @@ -71,47 +64,30 @@ namespace Fungus.Script { if (character == null) { - if (leftImage != null) - leftImage.enabled = false; - if (rightImage != null) - rightImage.enabled = false; + if (characterImage != null) + characterImage.enabled = false; if (nameText != null) nameText.text = ""; } else { - SetCharacterImage(character.characterImage, character.dialogSide); + SetCharacterImage(character.characterImage); SetCharacterName(character.name, character.characterColor); } } - public void SetCharacterImage(Sprite image, DialogSide side) + public void SetCharacterImage(Sprite image) { - if (leftImage != null) - { - if (image != null && - side == DialogSide.Left) - { - leftImage.sprite = image; - leftImage.enabled = true; - } - else - { - leftImage.enabled = false; - } - } - - if (rightImage != null) + if (characterImage != null) { - if (image != null && - side == DialogSide.Right) + if (image != null) { - rightImage.sprite = image; - rightImage.enabled = true; + characterImage.sprite = image; + characterImage.enabled = true; } else { - rightImage.enabled = false; + characterImage.enabled = false; } } } diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index f1c8452954b74fbeec177f37fafb5932c40c8748..3ad5d1801afa743034c5ac986fa4f72d30182c1c 100644 GIT binary patch delta 7449 zcmaLcdvr|K9t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