From 4207ef5d55d231572124e773ea827ca4c9c8e79e Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 17 Sep 2016 11:02:24 +0100 Subject: [PATCH] Added missing copyright headers, tidied up enums --- Assets/Fungus/Scripts/Commands/Call.cs | 16 ++++++++-------- .../Fungus/Scripts/Components/SelectOnEnable.cs | 5 ++++- Assets/Fungus/Scripts/Components/Variable.cs | 9 --------- Assets/Fungus/Scripts/Components/WriterAudio.cs | 12 ++++++------ Assets/Fungus/Scripts/Interfaces/IBlock.cs | 4 +++- .../Scripts/Interfaces/ICameraController.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/ICharacter.cs | 6 ++++-- Assets/Fungus/Scripts/Interfaces/IClickable2D.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/ICommand.cs | 5 ++++- .../Scripts/Interfaces/IConversationManager.cs | 4 +++- Assets/Fungus/Scripts/Interfaces/ICustomTag.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IDialogInput.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs | 4 ++-- .../Fungus/Scripts/Interfaces/IEventHandler.cs | 3 ++- Assets/Fungus/Scripts/Interfaces/IFlowchart.cs | 6 ++++-- .../Fungus/Scripts/Interfaces/ILocalization.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs | 5 ++++- .../Scripts/Interfaces/IMusicController.cs | 5 ++++- .../Scripts/Interfaces/IPortraitController.cs | 4 +++- Assets/Fungus/Scripts/Interfaces/ISayDialog.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IStage.cs | 5 ++++- .../Fungus/Scripts/Interfaces/ITextTagParser.cs | 5 +++-- Assets/Fungus/Scripts/Interfaces/IUpdateable.cs | 4 ++-- Assets/Fungus/Scripts/Interfaces/IVariable.cs | 12 +++++++++++- Assets/Fungus/Scripts/Interfaces/IView.cs | 6 ++++-- Assets/Fungus/Scripts/Interfaces/IWriter.cs | 5 ++++- .../Fungus/Scripts/Utils/ConversationManager.cs | 5 ++++- Assets/Fungus/Scripts/Utils/FungusConstants.cs | 5 ++++- Assets/Fungus/Scripts/Utils/PortraitUtils.cs | 5 ++++- Assets/Fungus/Scripts/Utils/TextTagToken.cs | 5 ++++- 30 files changed, 119 insertions(+), 56 deletions(-) diff --git a/Assets/Fungus/Scripts/Commands/Call.cs b/Assets/Fungus/Scripts/Commands/Call.cs index 3780a5c8..0464e5ec 100644 --- a/Assets/Fungus/Scripts/Commands/Call.cs +++ b/Assets/Fungus/Scripts/Commands/Call.cs @@ -16,7 +16,14 @@ namespace Fungus "Execute another block in the same Flowchart as the command, or in a different Flowchart.")] [AddComponentMenu("")] public class Call : Command - { + { + public enum CallMode + { + Stop, // Stop executing the current block after calling + Continue, // Continue executing the current block after calling + WaitUntilFinished // Wait until the called block finishes executing, then continue executing current block + } + [Tooltip("Flowchart which contains the block to execute. If none is specified then the current Flowchart is used.")] [SerializeField] protected Flowchart targetFlowchart; @@ -28,13 +35,6 @@ namespace Fungus [FormerlySerializedAs("commandIndex")] [SerializeField] protected int startIndex; - public enum CallMode - { - Stop, // Stop executing the current block after calling - Continue, // Continue executing the current block after calling - WaitUntilFinished // Wait until the called block finishes executing, then continue executing current block - } - [Tooltip("Select if the calling block should stop or continue executing commands, or wait until the called block finishes.")] [SerializeField] protected CallMode callMode; diff --git a/Assets/Fungus/Scripts/Components/SelectOnEnable.cs b/Assets/Fungus/Scripts/Components/SelectOnEnable.cs index 8b61c4a1..c7a0095b 100644 --- a/Assets/Fungus/Scripts/Components/SelectOnEnable.cs +++ b/Assets/Fungus/Scripts/Components/SelectOnEnable.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using UnityEngine.UI; namespace Fungus diff --git a/Assets/Fungus/Scripts/Components/Variable.cs b/Assets/Fungus/Scripts/Components/Variable.cs index 4e7c28d5..6f8969d1 100644 --- a/Assets/Fungus/Scripts/Components/Variable.cs +++ b/Assets/Fungus/Scripts/Components/Variable.cs @@ -6,15 +6,6 @@ using System; namespace Fungus { - /// - /// Scope types for Variables. - /// - public enum VariableScope - { - Private, - Public - } - /// /// Attribute class for variables. /// diff --git a/Assets/Fungus/Scripts/Components/WriterAudio.cs b/Assets/Fungus/Scripts/Components/WriterAudio.cs index 9290b59b..e8242954 100644 --- a/Assets/Fungus/Scripts/Components/WriterAudio.cs +++ b/Assets/Fungus/Scripts/Components/WriterAudio.cs @@ -11,6 +11,12 @@ namespace Fungus /// public class WriterAudio : MonoBehaviour, IWriterListener { + public enum AudioMode + { + Beeps, // Use short beep sound effects + SoundEffect, // Use long looping sound effect + } + [Tooltip("Volume level of writing sound effects")] [Range(0,1)] [SerializeField] protected float volume = 1f; @@ -22,12 +28,6 @@ namespace Fungus [Tooltip("AudioSource to use for playing sound effects. If none is selected then one will be created.")] [SerializeField] protected AudioSource targetAudioSource; - public enum AudioMode - { - Beeps, // Use short beep sound effects - SoundEffect, // Use long looping sound effect - } - [Tooltip("Type of sound effect to play when writing text")] [SerializeField] protected AudioMode audioMode = AudioMode.Beeps; diff --git a/Assets/Fungus/Scripts/Interfaces/IBlock.cs b/Assets/Fungus/Scripts/Interfaces/IBlock.cs index a23e1a34..ad6f5c6a 100644 --- a/Assets/Fungus/Scripts/Interfaces/IBlock.cs +++ b/Assets/Fungus/Scripts/Interfaces/IBlock.cs @@ -1,4 +1,6 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using System.Collections; using System.Collections.Generic; diff --git a/Assets/Fungus/Scripts/Interfaces/ICameraController.cs b/Assets/Fungus/Scripts/Interfaces/ICameraController.cs index 636c5da9..977d20da 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICameraController.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICameraController.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/ICharacter.cs b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs index e721e215..fda47b83 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICharacter.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs @@ -1,5 +1,7 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs b/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs index 8d0e23df..d43d67c1 100644 --- a/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs +++ b/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Detects mouse clicks and touches on a Game Object, and sends an event to all Flowchart event handlers in the scene. diff --git a/Assets/Fungus/Scripts/Interfaces/ICommand.cs b/Assets/Fungus/Scripts/Interfaces/ICommand.cs index 600e7071..796450b2 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICommand.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICommand.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs b/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs index 00d1495c..594748bc 100644 --- a/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs +++ b/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs @@ -1,4 +1,6 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using System.Collections; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs b/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs index d0f38781..778791cf 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Create custom tags for use in Say text. diff --git a/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs b/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs index d8676de9..aa4d5a85 100644 --- a/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs +++ b/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Input handler for say dialogues. diff --git a/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs b/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs index d01d6cb6..9070cd03 100644 --- a/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs +++ b/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs @@ -1,5 +1,5 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs index 649340a5..4baa1669 100644 --- a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs +++ b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs @@ -1,4 +1,5 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs b/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs index 7bb76d01..5116cd34 100644 --- a/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs +++ b/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs @@ -1,5 +1,7 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/ILocalization.cs b/Assets/Fungus/Scripts/Interfaces/ILocalization.cs index 0c03c30a..bbc5cd71 100644 --- a/Assets/Fungus/Scripts/Interfaces/ILocalization.cs +++ b/Assets/Fungus/Scripts/Interfaces/ILocalization.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs index ae3a445c..9d000f89 100644 --- a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs @@ -1,4 +1,7 @@ -using UnityEngine.UI; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine.UI; using MoonSharp.Interpreter; using System.Collections; diff --git a/Assets/Fungus/Scripts/Interfaces/IMusicController.cs b/Assets/Fungus/Scripts/Interfaces/IMusicController.cs index 2ee37d7d..92735861 100644 --- a/Assets/Fungus/Scripts/Interfaces/IMusicController.cs +++ b/Assets/Fungus/Scripts/Interfaces/IMusicController.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs b/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs index 966ef404..512fab1c 100644 --- a/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs +++ b/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs @@ -1,4 +1,6 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using MoonSharp.Interpreter; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs index c37aecb7..a6882b36 100644 --- a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IStage.cs b/Assets/Fungus/Scripts/Interfaces/IStage.cs index e9e689b8..cb554b1c 100644 --- a/Assets/Fungus/Scripts/Interfaces/IStage.cs +++ b/Assets/Fungus/Scripts/Interfaces/IStage.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using UnityEngine.UI; using System.Collections.Generic; diff --git a/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs b/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs index 8df9dc67..8337b300 100644 --- a/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs +++ b/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs @@ -1,5 +1,6 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs b/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs index 2f736011..6f9e9188 100644 --- a/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs +++ b/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs @@ -1,5 +1,5 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IVariable.cs b/Assets/Fungus/Scripts/Interfaces/IVariable.cs index 72da5ff6..86dec752 100644 --- a/Assets/Fungus/Scripts/Interfaces/IVariable.cs +++ b/Assets/Fungus/Scripts/Interfaces/IVariable.cs @@ -1,7 +1,17 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { + /// + /// Scope types for Variables. + /// + public enum VariableScope + { + Private, + Public + } + /// /// A Fungus variable that can be used with Commands. /// diff --git a/Assets/Fungus/Scripts/Interfaces/IView.cs b/Assets/Fungus/Scripts/Interfaces/IView.cs index 2992af36..a1e55e97 100644 --- a/Assets/Fungus/Scripts/Interfaces/IView.cs +++ b/Assets/Fungus/Scripts/Interfaces/IView.cs @@ -1,5 +1,7 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IWriter.cs b/Assets/Fungus/Scripts/Interfaces/IWriter.cs index 77b283c9..c74ab264 100644 --- a/Assets/Fungus/Scripts/Interfaces/IWriter.cs +++ b/Assets/Fungus/Scripts/Interfaces/IWriter.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections; namespace Fungus diff --git a/Assets/Fungus/Scripts/Utils/ConversationManager.cs b/Assets/Fungus/Scripts/Utils/ConversationManager.cs index 42437fab..d5fb1477 100644 --- a/Assets/Fungus/Scripts/Utils/ConversationManager.cs +++ b/Assets/Fungus/Scripts/Utils/ConversationManager.cs @@ -1,4 +1,7 @@ -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using UnityEngine; diff --git a/Assets/Fungus/Scripts/Utils/FungusConstants.cs b/Assets/Fungus/Scripts/Utils/FungusConstants.cs index d53dffb2..e4bd43b6 100644 --- a/Assets/Fungus/Scripts/Utils/FungusConstants.cs +++ b/Assets/Fungus/Scripts/Utils/FungusConstants.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Global constants used in various parts of Fungus. diff --git a/Assets/Fungus/Scripts/Utils/PortraitUtils.cs b/Assets/Fungus/Scripts/Utils/PortraitUtils.cs index bea15496..54d5f1b8 100644 --- a/Assets/Fungus/Scripts/Utils/PortraitUtils.cs +++ b/Assets/Fungus/Scripts/Utils/PortraitUtils.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using UnityEngine.UI; using MoonSharp.Interpreter; diff --git a/Assets/Fungus/Scripts/Utils/TextTagToken.cs b/Assets/Fungus/Scripts/Utils/TextTagToken.cs index 2d4b703c..06f93144 100644 --- a/Assets/Fungus/Scripts/Utils/TextTagToken.cs +++ b/Assets/Fungus/Scripts/Utils/TextTagToken.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using System.Collections.Generic; namespace Fungus {