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")]
[SerializeField] protected controlType control;
public controlType Control { get { return control; } }
public virtual controlType Control { get { return control; } }
[Tooltip("Audio clip to play")]
[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")]
[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")]
[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")]
[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")]
[SerializeField] protected bool waitUntilFinished = true;

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

@ -17,21 +17,21 @@ namespace Fungus
/// </summary>
[Tooltip("Orthographic size of the camera view in world units.")]
[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>
/// Aspect ratio of the primary view rectangle. e.g. a 4:3 aspect ratio = 1.333.
/// </summary>
[Tooltip("Aspect ratio of the primary view rectangle. (e.g. 4:3 aspect ratio = 1.333)")]
[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>
/// Aspect ratio of the secondary view rectangle. e.g. a 2:1 aspect ratio = 2/1 = 2.0.
/// </summary>
[Tooltip("Aspect ratio of the secondary view rectangle. (e.g. 2:1 aspect ratio = 2.0)")]
[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()
{

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

@ -27,13 +27,13 @@ namespace Fungus
/// The execution state of the Block.
/// </summary>
protected ExecutionState executionState;
public ExecutionState State { get { return executionState; } }
public virtual ExecutionState State { get { return executionState; } }
/// <summary>
/// Unique identifier for the Block.
/// </summary>
[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>
/// The name of the block node as displayed in the Flowchart window.
@ -41,7 +41,7 @@ namespace Fungus
[FormerlySerializedAs("sequenceName")]
[Tooltip("The name of the block node as displayed in the Flowchart window")]
[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>
/// Description text to display under the block node
@ -49,33 +49,33 @@ namespace Fungus
[TextArea(2, 5)]
[Tooltip("Description text to display under the block node")]
[SerializeField] protected string description = "";
public string Description { get { return description; } }
public virtual string Description { get { return description; } }
/// <summary>
/// An optional Event Handler which can execute the block when an event occurs.
/// </summary>
[Tooltip("An optional Event Handler which can execute the block when an event occurs")]
[SerializeField] protected EventHandler eventHandler;
public EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } }
public virtual EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } }
/// <summary>
/// The currently executing command.
/// </summary>
protected Command activeCommand;
public Command ActiveCommand { get { return activeCommand; } }
public virtual Command ActiveCommand { get { return activeCommand; } }
/// <summary>
// Index of last command executed before the current one.
// -1 indicates no previous command.
/// </summary>
protected int previousActiveCommandIndex = -1;
public float ExecutingIconTimer { get; set; }
public virtual float ExecutingIconTimer { get; set; }
/// <summary>
/// The list of commands in the sequence.
/// </summary>
[SerializeField] protected List<Command> commandList = new List<Command>();
public List<Command> CommandList { get { return commandList; } }
public virtual List<Command> CommandList { get { return commandList; } }
/// <summary>
/// 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")]
[HideInInspector]
[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>
/// Error message to display in the command inspector.
/// </summary>
protected string errorMessage = "";
public string ErrorMessage { get { return errorMessage; } }
public virtual string ErrorMessage { get { return errorMessage; } }
/// <summary>
/// Indent depth of the current commands.
@ -60,29 +60,29 @@ namespace Fungus
/// </summary>
[HideInInspector]
[SerializeField] protected int indentLevel;
public int IndentLevel { get { return indentLevel; } set { indentLevel = value; } }
public virtual int IndentLevel { get { return indentLevel; } set { indentLevel = value; } }
/// <summary>
/// Index of the command in the parent block's command list.
/// </summary>
public int CommandIndex { get; set; }
public virtual int CommandIndex { get; set; }
/// <summary>
/// Set to true by the parent block while the command is executing.
/// </summary>
public bool IsExecuting { get; set; }
public virtual bool IsExecuting { get; set; }
/// <summary>
/// Timer used to control appearance of executing icon in inspector.
/// </summary>
public float ExecutingIconTimer { get; set; }
public virtual float ExecutingIconTimer { get; set; }
/// <summary>
/// Reference to the Block object that this command belongs to.
/// This reference is only populated at runtime and in the editor when the
/// block is selected.
/// </summary>
public Block ParentBlock { get; set; }
public virtual Block ParentBlock { get; set; }
/// <summary>
/// Returns the Flowchart that this command belongs to.

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

@ -14,7 +14,7 @@ namespace Fungus
[AddComponentMenu("")]
public class End : Command
{
public bool Loop { get; set; }
public virtual bool Loop { get; set; }
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")]
[SerializeField] protected GameObject targetObject;
public GameObject TargetObject { get { return targetObject; } }
public virtual GameObject TargetObject { get { return targetObject; } }
[HideInInspector]
[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")]
[SerializeField] protected string key = "";
public string Key { get { return key; } }
public virtual string Key { get { return key; } }
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")]
[SerializeField] protected SetOperator setOperator;
public SetOperator _SetOperator { get { return setOperator; } }
public virtual SetOperator _SetOperator { get { return setOperator; } }
[Tooltip("Boolean value to set with")]
[SerializeField] protected BooleanData booleanData;

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

@ -44,7 +44,7 @@ namespace Fungus
[HideInInspector]
[FormerlySerializedAs("parentSequence")]
[SerializeField] protected Block parentBlock;
public Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } }
public virtual Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } }
/// <summary>
/// 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>
[HideInInspector]
[SerializeField] protected Vector2 scrollPos;
public Vector2 ScrollPos { get { return scrollPos; } set { scrollPos = value; } }
public virtual Vector2 ScrollPos { get { return scrollPos; } set { scrollPos = value; } }
/// <summary>
/// Scroll position of Flowchart variables window.
/// </summary>
[HideInInspector]
[SerializeField] protected Vector2 variablesScrollPos;
public Vector2 VariablesScrollPos { get { return variablesScrollPos; } set { variablesScrollPos = value; } }
public virtual Vector2 VariablesScrollPos { get { return variablesScrollPos; } set { variablesScrollPos = value; } }
/// <summary>
/// Show the variables pane.
/// </summary>
[HideInInspector]
[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>
/// Height of command block view in inspector.
/// </summary>
[HideInInspector]
[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>
/// Zoom level of Flowchart editor window.
/// </summary>
[HideInInspector]
[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>
/// Scrollable area for Flowchart editor window.
/// </summary>
[HideInInspector]
[SerializeField] protected Rect scrollViewRect;
public Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } }
public virtual Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } }
/// <summary>
/// Currently selected block in the Flowchart editor.
@ -94,21 +94,21 @@ namespace Fungus
[HideInInspector]
[FormerlySerializedAs("selectedSequence")]
[SerializeField] protected Block selectedBlock;
public Block SelectedBlock { get { return selectedBlock; } set { selectedBlock = value; } }
public virtual Block SelectedBlock { get { return selectedBlock; } set { selectedBlock = value; } }
/// <summary>
/// Currently selected command in the Flowchart editor.
/// </summary>
[HideInInspector]
[SerializeField] protected List<Command> selectedCommands = new List<Command>();
public List<Command> SelectedCommands { get { return selectedCommands; } }
public virtual List<Command> SelectedCommands { get { return selectedCommands; } }
/// <summary>
/// The list of variables that can be accessed by the Flowchart.
/// </summary>
[HideInInspector]
[SerializeField] protected List<Variable> variables = new List<Variable>();
public List<Variable> Variables { get { return variables; } }
public virtual List<Variable> Variables { get { return variables; } }
/// <summary>
/// Description text displayed in the Flowchart editor window
@ -116,7 +116,7 @@ namespace Fungus
[TextArea(3, 5)]
[Tooltip("Description text displayed in the Flowchart editor window")]
[SerializeField] protected string description = "";
public string Description { get { return description; } }
public virtual string Description { get { return description; } }
/// <summary>
/// Slow down execution in the editor to make it easier to visualise program flow.
@ -124,14 +124,14 @@ namespace Fungus
[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.")]
[SerializeField] protected float stepPause = 0f;
public float StepPause { get { return stepPause; } }
public virtual float StepPause { get { return stepPause; } }
/// <summary>
/// Use command color when displaying the command list in the inspector.
/// </summary>
[Tooltip("Use command color when displaying the command list in the Fungus Editor window")]
[SerializeField] protected bool colorCommands = true;
public bool ColorCommands { get { return colorCommands; } }
public virtual bool ColorCommands { get { return colorCommands; } }
/// <summary>
/// Hides the Flowchart block and command components in the inspector.
@ -145,21 +145,21 @@ namespace Fungus
/// </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.")]
[SerializeField] protected bool saveSelection = true;
public bool SaveSelection { get { return saveSelection; } }
public virtual bool SaveSelection { get { return saveSelection; } }
/// <summary>
/// Unique identifier for identifying this flowchart in localized string keys.
/// </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.")]
[SerializeField] protected string localizationId = "";
public string LocalizationId { get { return localizationId; } }
public virtual string LocalizationId { get { return localizationId; } }
/// <summary>
/// Display line numbers in the command list in the Block inspector.
/// </summary>
[Tooltip("Display line numbers in the command list in the Block inspector.")]
[SerializeField] protected bool showLineNumbers = false;
public bool ShowLineNumbers { get { return showLineNumbers; } }
public virtual bool ShowLineNumbers { get { return showLineNumbers; } }
/// <summary>
/// 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>
[Tooltip("Lua Environment to be used by default for all Execute Lua commands in this Flowchart")]
[SerializeField] protected LuaEnvironment luaEnvironment;
public LuaEnvironment _LuaEnvironment { get { return luaEnvironment; } }
public virtual LuaEnvironment _LuaEnvironment { get { return luaEnvironment; } }
/// <summary>
/// The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.
/// </summary>
[Tooltip("The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.")]
[SerializeField] protected string luaBindingName = "flowchart";
public string LuaBindingName { get { return luaBindingName; } }
public virtual string LuaBindingName { get { return luaBindingName; } }
/// <summary>
/// Position in the center of all blocks in the flowchart.
/// </summary>
public Vector2 CenterPosition { set; get; }
public virtual Vector2 CenterPosition { set; get; }
/// <summary>
/// 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
{
[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
{
[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 System.Type[] VariableTypes { get; set; }
public Type[] VariableTypes { get; set; }
}
/// <summary>
@ -60,10 +60,10 @@ namespace Fungus
public abstract class Variable : MonoBehaviour
{
[SerializeField] protected VariableScope scope;
public VariableScope Scope { get { return scope; } }
public virtual VariableScope Scope { get { return scope; } }
[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();
}
@ -74,7 +74,7 @@ namespace Fungus
public abstract class VariableBase<T> : Variable
{
[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;

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

@ -16,29 +16,29 @@ namespace Fungus
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")
public string NameText { get { return nameText; } }
public virtual string NameText { get { return nameText; } }
[SerializeField] protected Color nameColor = Color.white;
public Color NameColor { get { return nameColor; } }
public virtual Color NameColor { get { return nameColor; } }
[SerializeField] protected AudioClip soundEffect;
public AudioClip SoundEffect { get { return soundEffect; } }
public virtual AudioClip SoundEffect { get { return soundEffect; } }
[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;
public List<Sprite> Portraits { get { return portraits; } }
public virtual List<Sprite> Portraits { get { return portraits; } }
[SerializeField] protected FacingDirection portraitsFace;
public FacingDirection PortraitsFace { get { return portraitsFace; } }
public virtual FacingDirection PortraitsFace { get { return portraitsFace; } }
[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.")]
[SerializeField] protected SayDialog setSayDialog;
public SayDialog SetSayDialog { get { return setSayDialog; } }
public virtual SayDialog SetSayDialog { get { return setSayDialog; } }
[FormerlySerializedAs("notes")]
[TextArea(5,10)]

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

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

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

@ -11,7 +11,7 @@ namespace Fungus
[Tooltip("Display type")]
[SerializeField] protected TDisplayEnum display;
public TDisplayEnum Display { get { return display; } }
public virtual TDisplayEnum Display { get { return display; } }
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")]
[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")]
[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")]
[SerializeField] protected Character replacedCharacter;
[Tooltip("Portrait to display")]
[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")]
[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")]
[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")]
[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")]
[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")]
[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")]
[SerializeField] protected float fadeDuration = 0.5f;
@ -59,11 +59,11 @@ namespace Fungus
[Tooltip("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")]
[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")]
[SerializeField] protected bool waitUntilFinished = false;

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

@ -23,11 +23,11 @@ namespace Fungus
[Tooltip("Character that is speaking")]
[SerializeField] protected Character character;
public Character _Character { get { return character; } }
public virtual Character _Character { get { return character; } }
[Tooltip("Portrait that represents speaking character")]
[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")]
[SerializeField] protected AudioClip voiceOverClip;
@ -40,7 +40,7 @@ namespace Fungus
[Tooltip("Type this text in the previous dialog box.")]
[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.")]
[SerializeField] protected bool fadeWhenDone = true;

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

@ -13,16 +13,16 @@ namespace Fungus
public class CustomTag : MonoBehaviour
{
[SerializeField] protected string tagStartSymbol;
public string TagStartSymbol { get { return tagStartSymbol; } }
public virtual string TagStartSymbol { get { return tagStartSymbol; } }
[SerializeField] protected string tagEndSymbol;
public string TagEndSymbol { get { return tagEndSymbol; } }
public virtual string TagEndSymbol { get { return tagEndSymbol; } }
[SerializeField] protected string replaceTagStartWith;
public string ReplaceTagStartWith { get { return replaceTagStartWith; } }
public virtual string ReplaceTagStartWith { get { return replaceTagStartWith; } }
[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>();

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

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

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

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

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

@ -33,11 +33,11 @@ namespace Fungus
[Tooltip("The story text UI object")]
[SerializeField] protected Text storyText;
public Text StoryText { get { return storyText; } }
public virtual Text StoryText { get { return storyText; } }
[Tooltip("The character UI object")]
[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)")]
[SerializeField] protected bool fitTextWithImage = true;

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

@ -15,33 +15,33 @@ namespace Fungus
public class Stage : PortraitController
{
[SerializeField] protected Canvas portraitCanvas;
public Canvas PortraitCanvas { get { return portraitCanvas; } }
public virtual Canvas PortraitCanvas { get { return portraitCanvas; } }
[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;
public float FadeDuration { get { return fadeDuration; } set { fadeDuration = value; } }
public virtual float FadeDuration { get { return fadeDuration; } set { fadeDuration = value; } }
[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;
public LeanTweenType FadeEaseType { get { return fadeEaseType; } }
public virtual LeanTweenType FadeEaseType { get { return fadeEaseType; } }
[SerializeField] protected Vector2 shiftOffset;
public Vector2 ShiftOffset { get { return shiftOffset; } }
public virtual Vector2 ShiftOffset { get { return shiftOffset; } }
[SerializeField] protected Image defaultPosition;
public Image DefaultPosition { get { return defaultPosition; } }
public virtual Image DefaultPosition { get { return defaultPosition; } }
[SerializeField] protected List<RectTransform> positions;
public List<RectTransform> Positions { get { return positions; } }
public virtual List<RectTransform> Positions { get { return positions; } }
[SerializeField] protected RectTransform[] cachedPositions;
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>();

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

@ -19,7 +19,7 @@ namespace Fungus
{
[Tooltip("Is object dragging enabled")]
[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")]
[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")]
[SerializeField] protected Draggable2D draggableObject;
public Draggable2D DraggableObject { get { return draggableObject; } }
public virtual Draggable2D DraggableObject { get { return draggableObject; } }
[Tooltip("Drag target object to listen for drag events on")]
[SerializeField] protected Collider2D targetObject;

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

@ -48,27 +48,25 @@ namespace Fungus
}
[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;
public bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } }
public virtual bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } }
[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;
public int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } }
public virtual int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } }
[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;
public int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } }
[SerializeField] protected bool hasFailed;
public virtual int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } }
[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.")]
[SerializeField] protected string executeMethodName = "OnExecute";

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

@ -61,7 +61,7 @@ namespace Fungus
/// </summary>
[Tooltip("The list of Unity objects to be bound to make them accessible in Lua script.")]
[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.")]
[SerializeField] protected bool showInherited;

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

@ -107,7 +107,7 @@ namespace Fungus
/// <summary>
/// The MoonSharp interpreter instance used to run Lua code.
/// </summary>
public Script Interpreter { get { return interpreter; } }
public virtual Script Interpreter { get { return interpreter; } }
/// <summary>
/// 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>
/// A Lua table that can be shared between multiple LuaEnvironments.
/// </summary>
public Table PrimeTable { get { return primeTable; } }
public virtual Table PrimeTable { get { return primeTable; } }
protected bool initialized;

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

@ -36,7 +36,7 @@ namespace Fungus
/// </summary>
[Tooltip("The currently selected language in the string table. Affects variable substitution.")]
[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>
/// 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.
/// </summary>
protected StringBuilder stringBuilder;
public StringBuilder _StringBuilder { get { return stringBuilder; } }
public virtual StringBuilder _StringBuilder { get { return stringBuilder; } }
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
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)
protected bool isWriting;
public bool IsWriting { get { return isWriting; } }
public virtual bool IsWriting { get { return isWriting; } }
protected float currentWritingSpeed;
protected float currentPunctuationPause;
@ -104,7 +104,7 @@ namespace Fungus
protected string hiddenColorOpen = "";
protected string hiddenColorClose = "";
public string text
public virtual string text
{
get
{

Loading…
Cancel
Save