Browse Source

Add option to disable menu

master
lealeelu 8 years ago
parent
commit
8b06f173d2
  1. 1113
      Assets/Fungus/Resources/Prefabs/SaveMenu.prefab
  2. 32
      Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs
  3. 5760
      Assets/FungusExamples/Conversation/Say History.unity

1113
Assets/Fungus/Resources/Prefabs/SaveMenu.prefab

File diff suppressed because it is too large Load Diff

32
Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs

@ -14,8 +14,11 @@ namespace Fungus
/// </summary>
public class NarrativeLogMenu : MonoBehaviour
{
[Tooltip("The button that shows conversation history.")]
[SerializeField] protected Button narrativeLogButton;
[Tooltip("Show the Narrative Log Menu")]
[SerializeField] protected bool showLog = true;
[Tooltip("Show previous lines instead of previous and current")]
[SerializeField] protected bool previousLines = true;
[Tooltip("A scrollable text field used for displaying conversation history.")]
[SerializeField] protected ScrollRect narrativeLogView;
@ -33,18 +36,27 @@ namespace Fungus
protected virtual void Awake()
{
// Only one instance of NarrativeLogMenu may exist
if (instance != null)
if (showLog)
{
Destroy(gameObject);
return;
}
// Only one instance of NarrativeLogMenu may exist
if (instance != null)
{
Destroy(gameObject);
return;
}
instance = this;
instance = this;
GameObject.DontDestroyOnLoad(this);
GameObject.DontDestroyOnLoad(this);
clickAudioSource = GetComponent<AudioSource>();
clickAudioSource = GetComponent<AudioSource>();
}
else
{
GameObject logView = GameObject.Find("NarrativeLogView");
logView.SetActive(false);
this.enabled = false;
}
}
protected virtual void Start()

5760
Assets/FungusExamples/Conversation/Say History.unity

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save