Browse Source

Change all public properties to use virtual

master
Christopher 9 years ago
parent
commit
cc4406a8fb
  1. 2
      Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs
  2. 2
      Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs
  3. 2
      Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs
  4. 6
      Assets/Fungus/Camera/Scripts/View.cs
  5. 16
      Assets/Fungus/Flowchart/Scripts/Block.cs
  6. 14
      Assets/Fungus/Flowchart/Scripts/Command.cs
  7. 2
      Assets/Fungus/Flowchart/Scripts/Commands/End.cs
  8. 3
      Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs
  9. 3
      Assets/Fungus/Flowchart/Scripts/Commands/Label.cs
  10. 2
      Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs
  11. 2
      Assets/Fungus/Flowchart/Scripts/EventHandler.cs
  12. 36
      Assets/Fungus/Flowchart/Scripts/Flowchart.cs
  13. 2
      Assets/Fungus/Flowchart/Scripts/FungusState.cs
  14. 2
      Assets/Fungus/Flowchart/Scripts/Node.cs
  15. 8
      Assets/Fungus/Flowchart/Scripts/Variable.cs
  16. 16
      Assets/Fungus/Narrative/Scripts/Character.cs
  17. 4
      Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs
  18. 2
      Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs
  19. 20
      Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs
  20. 6
      Assets/Fungus/Narrative/Scripts/Commands/Say.cs
  21. 8
      Assets/Fungus/Narrative/Scripts/CustomTag.cs
  22. 8
      Assets/Fungus/Narrative/Scripts/Localization.cs
  23. 6
      Assets/Fungus/Narrative/Scripts/MenuDialog.cs
  24. 4
      Assets/Fungus/Narrative/Scripts/SayDialog.cs
  25. 18
      Assets/Fungus/Narrative/Scripts/Stage.cs
  26. 2
      Assets/Fungus/Sprite/Scripts/Draggable2D.cs
  27. 3
      Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs
  28. 16
      Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs
  29. 2
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs
  30. 2
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs
  31. 2
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs
  32. 2
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs
  33. 2
      Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs
  34. 6
      Assets/Fungus/UI/Scripts/Writer.cs

2
Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs

@ -27,7 +27,7 @@ namespace Fungus
[Tooltip("What to do to audio")] [Tooltip("What to do to audio")]
[SerializeField] protected controlType control; [SerializeField] protected controlType control;
public controlType Control { get { return control; } } public virtual controlType Control { get { return control; } }
[Tooltip("Audio clip to play")] [Tooltip("Audio clip to play")]
[SerializeField] protected AudioSourceData _audioSource; [SerializeField] protected AudioSourceData _audioSource;

2
Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs

@ -22,7 +22,7 @@ namespace Fungus
[Tooltip("View to transition to when Fade is complete")] [Tooltip("View to transition to when Fade is complete")]
[SerializeField] protected View targetView; [SerializeField] protected View targetView;
public View TargetView { get { return targetView; } } public virtual View TargetView { get { return targetView; } }
[Tooltip("Wait until the fade has finished before executing next command")] [Tooltip("Wait until the fade has finished before executing next command")]
[SerializeField] protected bool waitUntilFinished = true; [SerializeField] protected bool waitUntilFinished = true;

2
Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs

@ -19,7 +19,7 @@ namespace Fungus
[Tooltip("View to transition to when move is complete")] [Tooltip("View to transition to when move is complete")]
[SerializeField] protected View targetView; [SerializeField] protected View targetView;
public View TargetView { get { return targetView; } } public virtual View TargetView { get { return targetView; } }
[Tooltip("Wait until the fade has finished before executing next command")] [Tooltip("Wait until the fade has finished before executing next command")]
[SerializeField] protected bool waitUntilFinished = true; [SerializeField] protected bool waitUntilFinished = true;

6
Assets/Fungus/Camera/Scripts/View.cs

@ -17,21 +17,21 @@ namespace Fungus
/// </summary> /// </summary>
[Tooltip("Orthographic size of the camera view in world units.")] [Tooltip("Orthographic size of the camera view in world units.")]
[SerializeField] protected float viewSize = 0.5f; [SerializeField] protected float viewSize = 0.5f;
public float ViewSize { get { return viewSize; } set { viewSize = value; } } public virtual float ViewSize { get { return viewSize; } set { viewSize = value; } }
/// <summary> /// <summary>
/// Aspect ratio of the primary view rectangle. e.g. a 4:3 aspect ratio = 1.333. /// Aspect ratio of the primary view rectangle. e.g. a 4:3 aspect ratio = 1.333.
/// </summary> /// </summary>
[Tooltip("Aspect ratio of the primary view rectangle. (e.g. 4:3 aspect ratio = 1.333)")] [Tooltip("Aspect ratio of the primary view rectangle. (e.g. 4:3 aspect ratio = 1.333)")]
[SerializeField] protected Vector2 primaryAspectRatio = new Vector2(4, 3); [SerializeField] protected Vector2 primaryAspectRatio = new Vector2(4, 3);
public Vector2 PrimaryAspectRatio { get { return primaryAspectRatio; } set { primaryAspectRatio = value; } } public virtual Vector2 PrimaryAspectRatio { get { return primaryAspectRatio; } set { primaryAspectRatio = value; } }
/// <summary> /// <summary>
/// Aspect ratio of the secondary view rectangle. e.g. a 2:1 aspect ratio = 2/1 = 2.0. /// Aspect ratio of the secondary view rectangle. e.g. a 2:1 aspect ratio = 2/1 = 2.0.
/// </summary> /// </summary>
[Tooltip("Aspect ratio of the secondary view rectangle. (e.g. 2:1 aspect ratio = 2.0)")] [Tooltip("Aspect ratio of the secondary view rectangle. (e.g. 2:1 aspect ratio = 2.0)")]
[SerializeField] protected Vector2 secondaryAspectRatio = new Vector2(2, 1); [SerializeField] protected Vector2 secondaryAspectRatio = new Vector2(2, 1);
public Vector2 SecondaryAspectRatio { get { return secondaryAspectRatio; } set { secondaryAspectRatio = value; } } public virtual Vector2 SecondaryAspectRatio { get { return secondaryAspectRatio; } set { secondaryAspectRatio = value; } }
protected virtual void Update() protected virtual void Update()
{ {

16
Assets/Fungus/Flowchart/Scripts/Block.cs

@ -27,13 +27,13 @@ namespace Fungus
/// The execution state of the Block. /// The execution state of the Block.
/// </summary> /// </summary>
protected ExecutionState executionState; protected ExecutionState executionState;
public ExecutionState State { get { return executionState; } } public virtual ExecutionState State { get { return executionState; } }
/// <summary> /// <summary>
/// Unique identifier for the Block. /// Unique identifier for the Block.
/// </summary> /// </summary>
[SerializeField] protected int itemId = -1; // Invalid flowchart item id [SerializeField] protected int itemId = -1; // Invalid flowchart item id
public int ItemId { get { return itemId; } set { itemId = value; } } public virtual int ItemId { get { return itemId; } set { itemId = value; } }
/// <summary> /// <summary>
/// The name of the block node as displayed in the Flowchart window. /// The name of the block node as displayed in the Flowchart window.
@ -41,7 +41,7 @@ namespace Fungus
[FormerlySerializedAs("sequenceName")] [FormerlySerializedAs("sequenceName")]
[Tooltip("The name of the block node as displayed in the Flowchart window")] [Tooltip("The name of the block node as displayed in the Flowchart window")]
[SerializeField] protected string blockName = "New Block"; [SerializeField] protected string blockName = "New Block";
public string BlockName { get { return blockName; } set { blockName = value; } } public virtual string BlockName { get { return blockName; } set { blockName = value; } }
/// <summary> /// <summary>
/// Description text to display under the block node /// Description text to display under the block node
@ -49,33 +49,33 @@ namespace Fungus
[TextArea(2, 5)] [TextArea(2, 5)]
[Tooltip("Description text to display under the block node")] [Tooltip("Description text to display under the block node")]
[SerializeField] protected string description = ""; [SerializeField] protected string description = "";
public string Description { get { return description; } } public virtual string Description { get { return description; } }
/// <summary> /// <summary>
/// An optional Event Handler which can execute the block when an event occurs. /// An optional Event Handler which can execute the block when an event occurs.
/// </summary> /// </summary>
[Tooltip("An optional Event Handler which can execute the block when an event occurs")] [Tooltip("An optional Event Handler which can execute the block when an event occurs")]
[SerializeField] protected EventHandler eventHandler; [SerializeField] protected EventHandler eventHandler;
public EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } } public virtual EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } }
/// <summary> /// <summary>
/// The currently executing command. /// The currently executing command.
/// </summary> /// </summary>
protected Command activeCommand; protected Command activeCommand;
public Command ActiveCommand { get { return activeCommand; } } public virtual Command ActiveCommand { get { return activeCommand; } }
/// <summary> /// <summary>
// Index of last command executed before the current one. // Index of last command executed before the current one.
// -1 indicates no previous command. // -1 indicates no previous command.
/// </summary> /// </summary>
protected int previousActiveCommandIndex = -1; protected int previousActiveCommandIndex = -1;
public float ExecutingIconTimer { get; set; } public virtual float ExecutingIconTimer { get; set; }
/// <summary> /// <summary>
/// The list of commands in the sequence. /// The list of commands in the sequence.
/// </summary> /// </summary>
[SerializeField] protected List<Command> commandList = new List<Command>(); [SerializeField] protected List<Command> commandList = new List<Command>();
public List<Command> CommandList { get { return commandList; } } public virtual List<Command> CommandList { get { return commandList; } }
/// <summary> /// <summary>
/// Controls the next command to execute in the block execution coroutine. /// Controls the next command to execute in the block execution coroutine.

14
Assets/Fungus/Flowchart/Scripts/Command.cs

@ -46,13 +46,13 @@ namespace Fungus
[FormerlySerializedAs("commandId")] [FormerlySerializedAs("commandId")]
[HideInInspector] [HideInInspector]
[SerializeField] protected int itemId = -1; // Invalid flowchart item id [SerializeField] protected int itemId = -1; // Invalid flowchart item id
public int ItemId { get { return itemId; } set { itemId = value; } } public virtual int ItemId { get { return itemId; } set { itemId = value; } }
/// <summary> /// <summary>
/// Error message to display in the command inspector. /// Error message to display in the command inspector.
/// </summary> /// </summary>
protected string errorMessage = ""; protected string errorMessage = "";
public string ErrorMessage { get { return errorMessage; } } public virtual string ErrorMessage { get { return errorMessage; } }
/// <summary> /// <summary>
/// Indent depth of the current commands. /// Indent depth of the current commands.
@ -60,29 +60,29 @@ namespace Fungus
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected int indentLevel; [SerializeField] protected int indentLevel;
public int IndentLevel { get { return indentLevel; } set { indentLevel = value; } } public virtual int IndentLevel { get { return indentLevel; } set { indentLevel = value; } }
/// <summary> /// <summary>
/// Index of the command in the parent block's command list. /// Index of the command in the parent block's command list.
/// </summary> /// </summary>
public int CommandIndex { get; set; } public virtual int CommandIndex { get; set; }
/// <summary> /// <summary>
/// Set to true by the parent block while the command is executing. /// Set to true by the parent block while the command is executing.
/// </summary> /// </summary>
public bool IsExecuting { get; set; } public virtual bool IsExecuting { get; set; }
/// <summary> /// <summary>
/// Timer used to control appearance of executing icon in inspector. /// Timer used to control appearance of executing icon in inspector.
/// </summary> /// </summary>
public float ExecutingIconTimer { get; set; } public virtual float ExecutingIconTimer { get; set; }
/// <summary> /// <summary>
/// Reference to the Block object that this command belongs to. /// Reference to the Block object that this command belongs to.
/// This reference is only populated at runtime and in the editor when the /// This reference is only populated at runtime and in the editor when the
/// block is selected. /// block is selected.
/// </summary> /// </summary>
public Block ParentBlock { get; set; } public virtual Block ParentBlock { get; set; }
/// <summary> /// <summary>
/// Returns the Flowchart that this command belongs to. /// Returns the Flowchart that this command belongs to.

2
Assets/Fungus/Flowchart/Scripts/Commands/End.cs

@ -14,7 +14,7 @@ namespace Fungus
[AddComponentMenu("")] [AddComponentMenu("")]
public class End : Command public class End : Command
{ {
public bool Loop { get; set; } public virtual bool Loop { get; set; }
public override void OnEnter() public override void OnEnter()
{ {

3
Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs

@ -21,8 +21,7 @@ namespace Fungus
{ {
[Tooltip("GameObject containing the component method to be invoked")] [Tooltip("GameObject containing the component method to be invoked")]
[SerializeField] protected GameObject targetObject; [SerializeField] protected GameObject targetObject;
public virtual GameObject TargetObject { get { return targetObject; } }
public GameObject TargetObject { get { return targetObject; } }
[HideInInspector] [HideInInspector]
[Tooltip("Name of assembly containing the target component")] [Tooltip("Name of assembly containing the target component")]

3
Assets/Fungus/Flowchart/Scripts/Commands/Label.cs

@ -16,8 +16,7 @@ namespace Fungus
{ {
[Tooltip("Display name for the label")] [Tooltip("Display name for the label")]
[SerializeField] protected string key = ""; [SerializeField] protected string key = "";
public virtual string Key { get { return key; } }
public string Key { get { return key; } }
public override void OnEnter() public override void OnEnter()
{ {

2
Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs

@ -33,7 +33,7 @@ namespace Fungus
[Tooltip("The type of math operation to be performed")] [Tooltip("The type of math operation to be performed")]
[SerializeField] protected SetOperator setOperator; [SerializeField] protected SetOperator setOperator;
public SetOperator _SetOperator { get { return setOperator; } } public virtual SetOperator _SetOperator { get { return setOperator; } }
[Tooltip("Boolean value to set with")] [Tooltip("Boolean value to set with")]
[SerializeField] protected BooleanData booleanData; [SerializeField] protected BooleanData booleanData;

2
Assets/Fungus/Flowchart/Scripts/EventHandler.cs

@ -44,7 +44,7 @@ namespace Fungus
[HideInInspector] [HideInInspector]
[FormerlySerializedAs("parentSequence")] [FormerlySerializedAs("parentSequence")]
[SerializeField] protected Block parentBlock; [SerializeField] protected Block parentBlock;
public Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } } public virtual Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } }
/// <summary> /// <summary>
/// The Event Handler should call this method when the event is detected. /// The Event Handler should call this method when the event is detected.

36
Assets/Fungus/Flowchart/Scripts/Flowchart.cs

@ -51,42 +51,42 @@ namespace Fungus
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected Vector2 scrollPos; [SerializeField] protected Vector2 scrollPos;
public Vector2 ScrollPos { get { return scrollPos; } set { scrollPos = value; } } public virtual Vector2 ScrollPos { get { return scrollPos; } set { scrollPos = value; } }
/// <summary> /// <summary>
/// Scroll position of Flowchart variables window. /// Scroll position of Flowchart variables window.
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected Vector2 variablesScrollPos; [SerializeField] protected Vector2 variablesScrollPos;
public Vector2 VariablesScrollPos { get { return variablesScrollPos; } set { variablesScrollPos = value; } } public virtual Vector2 VariablesScrollPos { get { return variablesScrollPos; } set { variablesScrollPos = value; } }
/// <summary> /// <summary>
/// Show the variables pane. /// Show the variables pane.
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected bool variablesExpanded = true; [SerializeField] protected bool variablesExpanded = true;
public bool VariablesExpanded { get { return variablesExpanded; } set { variablesExpanded = value; } } public virtual bool VariablesExpanded { get { return variablesExpanded; } set { variablesExpanded = value; } }
/// <summary> /// <summary>
/// Height of command block view in inspector. /// Height of command block view in inspector.
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected float blockViewHeight = 400; [SerializeField] protected float blockViewHeight = 400;
public float BlockViewHeight { get { return blockViewHeight; } set { blockViewHeight = value; } } public virtual float BlockViewHeight { get { return blockViewHeight; } set { blockViewHeight = value; } }
/// <summary> /// <summary>
/// Zoom level of Flowchart editor window. /// Zoom level of Flowchart editor window.
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected float zoom = 1f; [SerializeField] protected float zoom = 1f;
public float Zoom { get { return zoom; } set { zoom = value; } } public virtual float Zoom { get { return zoom; } set { zoom = value; } }
/// <summary> /// <summary>
/// Scrollable area for Flowchart editor window. /// Scrollable area for Flowchart editor window.
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected Rect scrollViewRect; [SerializeField] protected Rect scrollViewRect;
public Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } } public virtual Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } }
/// <summary> /// <summary>
/// Currently selected block in the Flowchart editor. /// Currently selected block in the Flowchart editor.
@ -94,21 +94,21 @@ namespace Fungus
[HideInInspector] [HideInInspector]
[FormerlySerializedAs("selectedSequence")] [FormerlySerializedAs("selectedSequence")]
[SerializeField] protected Block selectedBlock; [SerializeField] protected Block selectedBlock;
public Block SelectedBlock { get { return selectedBlock; } set { selectedBlock = value; } } public virtual Block SelectedBlock { get { return selectedBlock; } set { selectedBlock = value; } }
/// <summary> /// <summary>
/// Currently selected command in the Flowchart editor. /// Currently selected command in the Flowchart editor.
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected List<Command> selectedCommands = new List<Command>(); [SerializeField] protected List<Command> selectedCommands = new List<Command>();
public List<Command> SelectedCommands { get { return selectedCommands; } } public virtual List<Command> SelectedCommands { get { return selectedCommands; } }
/// <summary> /// <summary>
/// The list of variables that can be accessed by the Flowchart. /// The list of variables that can be accessed by the Flowchart.
/// </summary> /// </summary>
[HideInInspector] [HideInInspector]
[SerializeField] protected List<Variable> variables = new List<Variable>(); [SerializeField] protected List<Variable> variables = new List<Variable>();
public List<Variable> Variables { get { return variables; } } public virtual List<Variable> Variables { get { return variables; } }
/// <summary> /// <summary>
/// Description text displayed in the Flowchart editor window /// Description text displayed in the Flowchart editor window
@ -116,7 +116,7 @@ namespace Fungus
[TextArea(3, 5)] [TextArea(3, 5)]
[Tooltip("Description text displayed in the Flowchart editor window")] [Tooltip("Description text displayed in the Flowchart editor window")]
[SerializeField] protected string description = ""; [SerializeField] protected string description = "";
public string Description { get { return description; } } public virtual string Description { get { return description; } }
/// <summary> /// <summary>
/// Slow down execution in the editor to make it easier to visualise program flow. /// Slow down execution in the editor to make it easier to visualise program flow.
@ -124,14 +124,14 @@ namespace Fungus
[Range(0f, 5f)] [Range(0f, 5f)]
[Tooltip("Adds a pause after each execution step to make it easier to visualise program flow. Editor only, has no effect in platform builds.")] [Tooltip("Adds a pause after each execution step to make it easier to visualise program flow. Editor only, has no effect in platform builds.")]
[SerializeField] protected float stepPause = 0f; [SerializeField] protected float stepPause = 0f;
public float StepPause { get { return stepPause; } } public virtual float StepPause { get { return stepPause; } }
/// <summary> /// <summary>
/// Use command color when displaying the command list in the inspector. /// Use command color when displaying the command list in the inspector.
/// </summary> /// </summary>
[Tooltip("Use command color when displaying the command list in the Fungus Editor window")] [Tooltip("Use command color when displaying the command list in the Fungus Editor window")]
[SerializeField] protected bool colorCommands = true; [SerializeField] protected bool colorCommands = true;
public bool ColorCommands { get { return colorCommands; } } public virtual bool ColorCommands { get { return colorCommands; } }
/// <summary> /// <summary>
/// Hides the Flowchart block and command components in the inspector. /// Hides the Flowchart block and command components in the inspector.
@ -145,21 +145,21 @@ namespace Fungus
/// </summary> /// </summary>
[Tooltip("Saves the selected block and commands when saving the scene. Helps avoid version control conflicts if you've only changed the active selection.")] [Tooltip("Saves the selected block and commands when saving the scene. Helps avoid version control conflicts if you've only changed the active selection.")]
[SerializeField] protected bool saveSelection = true; [SerializeField] protected bool saveSelection = true;
public bool SaveSelection { get { return saveSelection; } } public virtual bool SaveSelection { get { return saveSelection; } }
/// <summary> /// <summary>
/// Unique identifier for identifying this flowchart in localized string keys. /// Unique identifier for identifying this flowchart in localized string keys.
/// </summary> /// </summary>
[Tooltip("Unique identifier for this flowchart in localized string keys. If no id is specified then the name of the Flowchart object will be used.")] [Tooltip("Unique identifier for this flowchart in localized string keys. If no id is specified then the name of the Flowchart object will be used.")]
[SerializeField] protected string localizationId = ""; [SerializeField] protected string localizationId = "";
public string LocalizationId { get { return localizationId; } } public virtual string LocalizationId { get { return localizationId; } }
/// <summary> /// <summary>
/// Display line numbers in the command list in the Block inspector. /// Display line numbers in the command list in the Block inspector.
/// </summary> /// </summary>
[Tooltip("Display line numbers in the command list in the Block inspector.")] [Tooltip("Display line numbers in the command list in the Block inspector.")]
[SerializeField] protected bool showLineNumbers = false; [SerializeField] protected bool showLineNumbers = false;
public bool ShowLineNumbers { get { return showLineNumbers; } } public virtual bool ShowLineNumbers { get { return showLineNumbers; } }
/// <summary> /// <summary>
/// List of commands to hide in the Add Command menu. Use this to restrict the set of commands available when editing a Flowchart. /// List of commands to hide in the Add Command menu. Use this to restrict the set of commands available when editing a Flowchart.
@ -172,19 +172,19 @@ namespace Fungus
/// </summary> /// </summary>
[Tooltip("Lua Environment to be used by default for all Execute Lua commands in this Flowchart")] [Tooltip("Lua Environment to be used by default for all Execute Lua commands in this Flowchart")]
[SerializeField] protected LuaEnvironment luaEnvironment; [SerializeField] protected LuaEnvironment luaEnvironment;
public LuaEnvironment _LuaEnvironment { get { return luaEnvironment; } } public virtual LuaEnvironment _LuaEnvironment { get { return luaEnvironment; } }
/// <summary> /// <summary>
/// The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing. /// The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.
/// </summary> /// </summary>
[Tooltip("The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.")] [Tooltip("The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.")]
[SerializeField] protected string luaBindingName = "flowchart"; [SerializeField] protected string luaBindingName = "flowchart";
public string LuaBindingName { get { return luaBindingName; } } public virtual string LuaBindingName { get { return luaBindingName; } }
/// <summary> /// <summary>
/// Position in the center of all blocks in the flowchart. /// Position in the center of all blocks in the flowchart.
/// </summary> /// </summary>
public Vector2 CenterPosition { set; get; } public virtual Vector2 CenterPosition { set; get; }
/// <summary> /// <summary>
/// Cached list of flowchart objects in the scene for fast lookup. /// Cached list of flowchart objects in the scene for fast lookup.

2
Assets/Fungus/Flowchart/Scripts/FungusState.cs

@ -13,6 +13,6 @@ namespace Fungus
public class FungusState : MonoBehaviour public class FungusState : MonoBehaviour
{ {
[SerializeField] protected Flowchart selectedFlowchart; [SerializeField] protected Flowchart selectedFlowchart;
public Flowchart SelectedFlowchart { get { return selectedFlowchart; } set { selectedFlowchart = value; } } public virtual Flowchart SelectedFlowchart { get { return selectedFlowchart; } set { selectedFlowchart = value; } }
} }
} }

2
Assets/Fungus/Flowchart/Scripts/Node.cs

@ -12,6 +12,6 @@ namespace Fungus
public class Node : MonoBehaviour public class Node : MonoBehaviour
{ {
[SerializeField] protected Rect nodeRect = new Rect(0, 0, 120, 30); [SerializeField] protected Rect nodeRect = new Rect(0, 0, 120, 30);
public Rect _NodeRect { get { return nodeRect; } set { nodeRect = value; } } public virtual Rect _NodeRect { get { return nodeRect; } set { nodeRect = value; } }
} }
} }

8
Assets/Fungus/Flowchart/Scripts/Variable.cs

@ -50,7 +50,7 @@ namespace Fungus
public String defaultText = "<None>"; public String defaultText = "<None>";
public System.Type[] VariableTypes { get; set; } public Type[] VariableTypes { get; set; }
} }
/// <summary> /// <summary>
@ -60,10 +60,10 @@ namespace Fungus
public abstract class Variable : MonoBehaviour public abstract class Variable : MonoBehaviour
{ {
[SerializeField] protected VariableScope scope; [SerializeField] protected VariableScope scope;
public VariableScope Scope { get { return scope; } } public virtual VariableScope Scope { get { return scope; } }
[SerializeField] protected string key = ""; [SerializeField] protected string key = "";
public string Key { get { return key; } set { key = value; } } public virtual string Key { get { return key; } set { key = value; } }
public abstract void OnReset(); public abstract void OnReset();
} }
@ -74,7 +74,7 @@ namespace Fungus
public abstract class VariableBase<T> : Variable public abstract class VariableBase<T> : Variable
{ {
[SerializeField] protected T value; [SerializeField] protected T value;
public T Value { get { return this.value; } set { this.value = value; } } public virtual T Value { get { return this.value; } set { this.value = value; } }
protected T startValue; protected T startValue;

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

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

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

@ -31,14 +31,14 @@ namespace Fungus
{ {
[Tooltip("Stage to display characters on")] [Tooltip("Stage to display characters on")]
[SerializeField] protected Stage stage; [SerializeField] protected Stage stage;
public Stage _Stage { get { return stage; } } public virtual Stage _Stage { get { return stage; } }
[Tooltip("Stage to swap with")] [Tooltip("Stage to swap with")]
[SerializeField] protected Stage replacedStage; [SerializeField] protected Stage replacedStage;
[Tooltip("Use Default Settings")] [Tooltip("Use Default Settings")]
[SerializeField] protected bool useDefaultSettings = true; [SerializeField] protected bool useDefaultSettings = true;
public bool UseDefaultSettings { get { return useDefaultSettings; } } public virtual bool UseDefaultSettings { get { return useDefaultSettings; } }
[Tooltip("Fade Duration")] [Tooltip("Fade Duration")]
[SerializeField] protected float fadeDuration; [SerializeField] protected float fadeDuration;

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

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

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

@ -15,38 +15,38 @@ namespace Fungus
{ {
[Tooltip("Stage to display portrait on")] [Tooltip("Stage to display portrait on")]
[SerializeField] protected Stage stage; [SerializeField] protected Stage stage;
public Stage _Stage { get { return stage; } set { stage = value; } } public virtual Stage _Stage { get { return stage; } set { stage = value; } }
[Tooltip("Character to display")] [Tooltip("Character to display")]
[SerializeField] protected Character character; [SerializeField] protected Character character;
public Character _Character { get { return character; } set { character = value; } } public virtual Character _Character { get { return character; } set { character = value; } }
[Tooltip("Character to swap with")] [Tooltip("Character to swap with")]
[SerializeField] protected Character replacedCharacter; [SerializeField] protected Character replacedCharacter;
[Tooltip("Portrait to display")] [Tooltip("Portrait to display")]
[SerializeField] protected Sprite portrait; [SerializeField] protected Sprite portrait;
public Sprite _Portrait { get { return portrait; } set { portrait = value; } } public virtual Sprite _Portrait { get { return portrait; } set { portrait = value; } }
[Tooltip("Move the portrait from/to this offset position")] [Tooltip("Move the portrait from/to this offset position")]
[SerializeField] protected PositionOffset offset; [SerializeField] protected PositionOffset offset;
public PositionOffset Offset { get { return offset; } set { offset = value; } } public virtual PositionOffset Offset { get { return offset; } set { offset = value; } }
[Tooltip("Move the portrait from this position")] [Tooltip("Move the portrait from this position")]
[SerializeField] protected RectTransform fromPosition; [SerializeField] protected RectTransform fromPosition;
public RectTransform FromPosition { get { return fromPosition; } set { fromPosition = value;} } public virtual RectTransform FromPosition { get { return fromPosition; } set { fromPosition = value;} }
[Tooltip("Move the portrait to this positoin")] [Tooltip("Move the portrait to this positoin")]
[SerializeField] protected RectTransform toPosition; [SerializeField] protected RectTransform toPosition;
public RectTransform ToPosition { get { return toPosition; } set { toPosition = value;} } public virtual RectTransform ToPosition { get { return toPosition; } set { toPosition = value;} }
[Tooltip("Direction character is facing")] [Tooltip("Direction character is facing")]
[SerializeField] protected FacingDirection facing; [SerializeField] protected FacingDirection facing;
public FacingDirection Facing { get { return facing; } set { facing = value; } } public virtual FacingDirection Facing { get { return facing; } set { facing = value; } }
[Tooltip("Use Default Settings")] [Tooltip("Use Default Settings")]
[SerializeField] protected bool useDefaultSettings = true; [SerializeField] protected bool useDefaultSettings = true;
public bool UseDefaultSettings { get { return useDefaultSettings; } set { useDefaultSettings = value; } } public virtual bool UseDefaultSettings { get { return useDefaultSettings; } set { useDefaultSettings = value; } }
[Tooltip("Fade Duration")] [Tooltip("Fade Duration")]
[SerializeField] protected float fadeDuration = 0.5f; [SerializeField] protected float fadeDuration = 0.5f;
@ -59,11 +59,11 @@ namespace Fungus
[Tooltip("Move")] [Tooltip("Move")]
[SerializeField] protected bool move; [SerializeField] protected bool move;
public bool Move { get { return move; } set { move = value; } } public virtual bool Move { get { return move; } set { move = value; } }
[Tooltip("Start from offset")] [Tooltip("Start from offset")]
[SerializeField] protected bool shiftIntoPlace; [SerializeField] protected bool shiftIntoPlace;
public bool ShiftIntoPlace { get { return shiftIntoPlace; } set { shiftIntoPlace = value; } } public virtual bool ShiftIntoPlace { get { return shiftIntoPlace; } set { shiftIntoPlace = value; } }
[Tooltip("Wait until the tween has finished before executing the next command")] [Tooltip("Wait until the tween has finished before executing the next command")]
[SerializeField] protected bool waitUntilFinished = false; [SerializeField] protected bool waitUntilFinished = false;

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

@ -23,11 +23,11 @@ namespace Fungus
[Tooltip("Character that is speaking")] [Tooltip("Character that is speaking")]
[SerializeField] protected Character character; [SerializeField] protected Character character;
public Character _Character { get { return character; } } public virtual Character _Character { get { return character; } }
[Tooltip("Portrait that represents speaking character")] [Tooltip("Portrait that represents speaking character")]
[SerializeField] protected Sprite portrait; [SerializeField] protected Sprite portrait;
public Sprite Portrait { get { return portrait; } set { portrait = value; } } public virtual Sprite Portrait { get { return portrait; } set { portrait = value; } }
[Tooltip("Voiceover audio to play when writing the text")] [Tooltip("Voiceover audio to play when writing the text")]
[SerializeField] protected AudioClip voiceOverClip; [SerializeField] protected AudioClip voiceOverClip;
@ -40,7 +40,7 @@ namespace Fungus
[Tooltip("Type this text in the previous dialog box.")] [Tooltip("Type this text in the previous dialog box.")]
[SerializeField] protected bool extendPrevious = false; [SerializeField] protected bool extendPrevious = false;
public bool ExtendPrevious { get { return extendPrevious; } } public virtual bool ExtendPrevious { get { return extendPrevious; } }
[Tooltip("Fade out the dialog box when writing has finished and not waiting for input.")] [Tooltip("Fade out the dialog box when writing has finished and not waiting for input.")]
[SerializeField] protected bool fadeWhenDone = true; [SerializeField] protected bool fadeWhenDone = true;

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

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

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

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

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

@ -21,10 +21,10 @@ namespace Fungus
[SerializeField] protected bool autoSelectFirstButton = false; [SerializeField] protected bool autoSelectFirstButton = false;
protected Button[] cachedButtons; protected Button[] cachedButtons;
public Button[] CachedButtons { get { return cachedButtons; } } public virtual Button[] CachedButtons { get { return cachedButtons; } }
protected Slider cachedSlider; protected Slider cachedSlider;
public Slider CachedSlider { get { return cachedSlider; } } public virtual Slider CachedSlider { get { return cachedSlider; } }
public static MenuDialog GetMenuDialog() public static MenuDialog GetMenuDialog()
{ {
@ -156,7 +156,7 @@ namespace Fungus
return addedOption; return addedOption;
} }
public int DisplayedOptionsCount public virtual int DisplayedOptionsCount
{ {
get { get {
int count = 0; int count = 0;

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

@ -33,11 +33,11 @@ namespace Fungus
[Tooltip("The story text UI object")] [Tooltip("The story text UI object")]
[SerializeField] protected Text storyText; [SerializeField] protected Text storyText;
public Text StoryText { get { return storyText; } } public virtual Text StoryText { get { return storyText; } }
[Tooltip("The character UI object")] [Tooltip("The character UI object")]
[SerializeField] protected Image characterImage; [SerializeField] protected Image characterImage;
public Image CharacterImage { get { return characterImage; } } public virtual Image CharacterImage { get { return characterImage; } }
[Tooltip("Adjust width of story text when Character Image is displayed (to avoid overlapping)")] [Tooltip("Adjust width of story text when Character Image is displayed (to avoid overlapping)")]
[SerializeField] protected bool fitTextWithImage = true; [SerializeField] protected bool fitTextWithImage = true;

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

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

2
Assets/Fungus/Sprite/Scripts/Draggable2D.cs

@ -19,7 +19,7 @@ namespace Fungus
{ {
[Tooltip("Is object dragging enabled")] [Tooltip("Is object dragging enabled")]
[SerializeField] protected bool dragEnabled = true; [SerializeField] protected bool dragEnabled = true;
public bool DragEnabled { get { return dragEnabled; } set { dragEnabled = value; } } public virtual bool DragEnabled { get { return dragEnabled; } set { dragEnabled = value; } }
[Tooltip("Move object back to its starting position when drag is cancelled")] [Tooltip("Move object back to its starting position when drag is cancelled")]
[FormerlySerializedAs("returnToStartPos")] [FormerlySerializedAs("returnToStartPos")]

3
Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs

@ -16,8 +16,7 @@ namespace Fungus
{ {
[Tooltip("Draggable object to listen for drag events on")] [Tooltip("Draggable object to listen for drag events on")]
[SerializeField] protected Draggable2D draggableObject; [SerializeField] protected Draggable2D draggableObject;
public virtual Draggable2D DraggableObject { get { return draggableObject; } }
public Draggable2D DraggableObject { get { return draggableObject; } }
[Tooltip("Drag target object to listen for drag events on")] [Tooltip("Drag target object to listen for drag events on")]
[SerializeField] protected Collider2D targetObject; [SerializeField] protected Collider2D targetObject;

16
Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs vendored

@ -48,27 +48,25 @@ namespace Fungus
} }
[SerializeField] protected float executeAfterTime = 1f; [SerializeField] protected float executeAfterTime = 1f;
public float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } } public virtual float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } }
[SerializeField] protected bool repeatExecuteTime = true; [SerializeField] protected bool repeatExecuteTime = true;
public bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } } public virtual bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } }
[SerializeField] protected float repeatEveryTime = 1f; [SerializeField] protected float repeatEveryTime = 1f;
public float RepeatEveryTime { get { return repeatEveryTime; } set { repeatEveryTime = value; } } public virtual float RepeatEveryTime { get { return repeatEveryTime; } set { repeatEveryTime = value; } }
[SerializeField] protected int executeAfterFrames = 1; [SerializeField] protected int executeAfterFrames = 1;
public int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } } public virtual int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } }
[SerializeField] protected bool repeatExecuteFrame = true; [SerializeField] protected bool repeatExecuteFrame = true;
public bool RepeatExecuteFrame { get { return repeatExecuteFrame; } set { repeatExecuteFrame = value; } } public virtual bool RepeatExecuteFrame { get { return repeatExecuteFrame; } set { repeatExecuteFrame = value; } }
[SerializeField] protected int repeatEveryFrame = 1; [SerializeField] protected int repeatEveryFrame = 1;
public int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } } public virtual int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } }
[SerializeField] protected bool hasFailed;
[SerializeField] protected ExecuteMethod executeMethods = ExecuteMethod.Start; [SerializeField] protected ExecuteMethod executeMethods = ExecuteMethod.Start;
public ExecuteMethod ExecuteMethods { get { return executeMethods; } set { executeMethods = value; } } public virtual ExecuteMethod ExecuteMethods { get { return executeMethods; } set { executeMethods = value; } }
[Tooltip("Name of the method on a component in this gameobject to call when executing.")] [Tooltip("Name of the method on a component in this gameobject to call when executing.")]
[SerializeField] protected string executeMethodName = "OnExecute"; [SerializeField] protected string executeMethodName = "OnExecute";

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

@ -61,7 +61,7 @@ namespace Fungus
/// </summary> /// </summary>
[Tooltip("The list of Unity objects to be bound to make them accessible in Lua script.")] [Tooltip("The list of Unity objects to be bound to make them accessible in Lua script.")]
[SerializeField] protected List<BoundObject> boundObjects = new List<BoundObject>(); [SerializeField] protected List<BoundObject> boundObjects = new List<BoundObject>();
public List<BoundObject> BoundObjects { get { return boundObjects; } } public virtual List<BoundObject> BoundObjects { get { return boundObjects; } }
[Tooltip("Show inherited public members.")] [Tooltip("Show inherited public members.")]
[SerializeField] protected bool showInherited; [SerializeField] protected bool showInherited;

2
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs vendored

@ -107,7 +107,7 @@ namespace Fungus
/// <summary> /// <summary>
/// The MoonSharp interpreter instance used to run Lua code. /// The MoonSharp interpreter instance used to run Lua code.
/// </summary> /// </summary>
public Script Interpreter { get { return interpreter; } } public virtual Script Interpreter { get { return interpreter; } }
/// <summary> /// <summary>
/// Launches the remote Lua debugger in your browser and breaks execution at the first executed Lua command. /// Launches the remote Lua debugger in your browser and breaks execution at the first executed Lua command.

2
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs vendored

@ -18,7 +18,7 @@ namespace Fungus
/// <summary> /// <summary>
/// A Lua table that can be shared between multiple LuaEnvironments. /// A Lua table that can be shared between multiple LuaEnvironments.
/// </summary> /// </summary>
public Table PrimeTable { get { return primeTable; } } public virtual Table PrimeTable { get { return primeTable; } }
protected bool initialized; protected bool initialized;

2
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs vendored

@ -36,7 +36,7 @@ namespace Fungus
/// </summary> /// </summary>
[Tooltip("The currently selected language in the string table. Affects variable substitution.")] [Tooltip("The currently selected language in the string table. Affects variable substitution.")]
[SerializeField] protected string activeLanguage = "en"; [SerializeField] protected string activeLanguage = "en";
public string ActiveLanguage { get { return activeLanguage; } set { activeLanguage = value; } } public virtual string ActiveLanguage { get { return activeLanguage; } set { activeLanguage = value; } }
/// <summary> /// <summary>
/// Lua script file which defines the global string table used for localisation. /// Lua script file which defines the global string table used for localisation.

2
Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs vendored

@ -34,7 +34,7 @@ namespace Fungus
/// This property is public to support client code optimisations. /// This property is public to support client code optimisations.
/// </summary> /// </summary>
protected StringBuilder stringBuilder; protected StringBuilder stringBuilder;
public StringBuilder _StringBuilder { get { return stringBuilder; } } public virtual StringBuilder _StringBuilder { get { return stringBuilder; } }
private int recursionDepth; private int recursionDepth;

6
Assets/Fungus/UI/Scripts/Writer.cs

@ -70,11 +70,11 @@ namespace Fungus
// This property is true when the writer is waiting for user input to continue // This property is true when the writer is waiting for user input to continue
protected bool isWaitingForInput; protected bool isWaitingForInput;
public bool IsWaitingForInput { get { return isWaitingForInput; } } public virtual bool IsWaitingForInput { get { return isWaitingForInput; } }
// This property is true when the writer is writing text or waiting (i.e. still processing tokens) // This property is true when the writer is writing text or waiting (i.e. still processing tokens)
protected bool isWriting; protected bool isWriting;
public bool IsWriting { get { return isWriting; } } public virtual bool IsWriting { get { return isWriting; } }
protected float currentWritingSpeed; protected float currentWritingSpeed;
protected float currentPunctuationPause; protected float currentPunctuationPause;
@ -104,7 +104,7 @@ namespace Fungus
protected string hiddenColorOpen = ""; protected string hiddenColorOpen = "";
protected string hiddenColorClose = ""; protected string hiddenColorClose = "";
public string text public virtual string text
{ {
get get
{ {

Loading…
Cancel
Save