diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 431bfeb0..94bb56d9 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -6,16 +6,6 @@ using System.Collections.Generic; namespace Fungus { - /** - * The Sequence class has been renamed to Block to be more descriptive. - */ - [ExecuteInEditMode] - [RequireComponent(typeof(Flowchart))] - [AddComponentMenu("")] - [Obsolete("Use Block class instead")] - public class Sequence : Block - {} - [ExecuteInEditMode] [RequireComponent(typeof(Flowchart))] [AddComponentMenu("")] @@ -107,18 +97,7 @@ namespace Fungus public virtual Flowchart GetFlowchart() { - Flowchart flowchart = GetComponent(); - - if (flowchart == null) - { - // Legacy support for earlier system where Blocks were children of the Flowchart - if (transform.parent != null) - { - flowchart = transform.parent.GetComponent(); - } - } - - return flowchart; + return GetComponent(); } public virtual bool HasError() diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs index 7fee9af5..c140ebf6 100644 --- a/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs +++ b/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs @@ -33,8 +33,7 @@ namespace Fungus if (command.indentLevel == indent) { System.Type type = command.GetType(); - if (type == typeof(EndIf) || // Legacy support for old EndIf command - type == typeof(End)) + if (type == typeof(End)) { // Execute command immediately after the EndIf command Continue(command.commandIndex + 1); diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs b/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs index 1c5205d7..12095328 100644 --- a/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs +++ b/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs @@ -44,9 +44,7 @@ namespace Fungus if (command.indentLevel == indent) { System.Type type = command.GetType(); - if (//type == typeof(Else) || - type == typeof(EndIf) || // Legacy support for old EndIf command - type == typeof(End)) + if (type == typeof(End)) { // Execute command immediately after the Else or End command Continue(command.commandIndex + 1); diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/EndIf.cs b/Assets/Fungus/Flowchart/Scripts/Commands/EndIf.cs deleted file mode 100644 index 84d8c99d..00000000 --- a/Assets/Fungus/Flowchart/Scripts/Commands/EndIf.cs +++ /dev/null @@ -1,30 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - -namespace Fungus -{ - // Note: The End If command is deprecated, use the End command instead. - [CommandInfo("Scripting", - "End", - "Marks the end of a conditional block.", -1)] - [AddComponentMenu("")] - public class EndIf : Command - { - public override void OnEnter() - { - Continue(); - } - - public override bool CloseBlock() - { - return true; - } - - public override Color GetButtonColor() - { - return new Color32(253, 253, 150, 255); - } - } - -} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/EndIf.cs.meta b/Assets/Fungus/Flowchart/Scripts/Commands/EndIf.cs.meta deleted file mode 100644 index 41cfa6b2..00000000 --- a/Assets/Fungus/Flowchart/Scripts/Commands/EndIf.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 00d52e9e9dcf4493c87045f633aefa2e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/If.cs b/Assets/Fungus/Flowchart/Scripts/Commands/If.cs index f610a37b..f0cfe755 100644 --- a/Assets/Fungus/Flowchart/Scripts/Commands/If.cs +++ b/Assets/Fungus/Flowchart/Scripts/Commands/If.cs @@ -117,8 +117,7 @@ namespace Fungus } System.Type type = nextCommand.GetType(); - if (type == typeof(Else) || - type == typeof(EndIf) || // Legacy support for old EndIf command + if (type == typeof(Else) || type == typeof(End)) { if (i >= parentBlock.commandList.Count - 1) diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index 8c2616b4..2fb01873 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -8,14 +8,6 @@ using System.Text.RegularExpressions; namespace Fungus { - /** - * The FungusScript class has been renamed to Flowchart to be more descriptive. - */ - [Obsolete("Use Flowchart class instead")] - [ExecuteInEditMode] - public class FungusScript : Flowchart - {} - /** * Visual scripting controller for the Flowchart programming language. * Flowchart objects may be edited visually using the Flowchart editor window. diff --git a/Assets/Fungus/Narrative/Deprecated.meta b/Assets/Fungus/Narrative/Deprecated.meta deleted file mode 100644 index f3205afb..00000000 --- a/Assets/Fungus/Narrative/Deprecated.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: e28117fbc8861436296315b42526caac -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Deprecated/AddOption.cs b/Assets/Fungus/Narrative/Deprecated/AddOption.cs deleted file mode 100644 index 198a1641..00000000 --- a/Assets/Fungus/Narrative/Deprecated/AddOption.cs +++ /dev/null @@ -1,85 +0,0 @@ -using UnityEngine; -using UnityEngine.Serialization; -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Fungus -{ - [CommandInfo("Deprecated", - "Add Option", - "Obsolete: This command will be removed in a future update. Please use the Option command instead.", - -1)] - [AddComponentMenu("")] - public class AddOption : SetVariable - { - [Tooltip("Option text to display when presenting the option to the player")] - public string optionText; - - [FormerlySerializedAs("targetSequence")] - [Tooltip("Block to execute when the player selects this option")] - public Block targetBlock; - - [Tooltip("Hide this option once it has been selected so that it won't appear again even if executed again")] - public bool hideOnSelected; - - protected bool wasSelected; - - public override void OnEnter() - { - if (hideOnSelected && wasSelected) - { - Continue(); - return; - } - - Choose.Option option = new Choose.Option(); - option.optionText = optionText; // Note: Variable substitution happens in the Choose command (as late as possible) - option.targetBlock = targetBlock; - - option.action = () => { - wasSelected = true; - DoSetOperation(); // Set variable (if one is specified) - }; - - Choose.options.Add(option); - - Continue(); - } - - public override string GetSummary() - { - string summaryText = optionText; - - if (targetBlock == null) - { - summaryText += " ( )"; - } - else - { - summaryText += " (" + targetBlock.blockName + ")"; - } - - return summaryText; - } - - public override void GetConnectedBlocks(ref List connectedBlocks) - { - if (targetBlock != null) - { - connectedBlocks.Add(targetBlock); - } - } - - public override Color GetButtonColor() - { - return new Color32(184, 210, 235, 255); - } - - public override void OnReset() - { - wasSelected = false; - } - } - -} \ No newline at end of file diff --git a/Assets/Fungus/Narrative/Deprecated/AddOption.cs.meta b/Assets/Fungus/Narrative/Deprecated/AddOption.cs.meta deleted file mode 100644 index 73080a03..00000000 --- a/Assets/Fungus/Narrative/Deprecated/AddOption.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9a61ea20fbb744ca2a363c33ad65cd89 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Narrative/Deprecated/Arrow.png b/Assets/Fungus/Narrative/Deprecated/Arrow.png deleted file mode 100644 index 377f174c..00000000 Binary files a/Assets/Fungus/Narrative/Deprecated/Arrow.png and /dev/null differ diff --git a/Assets/Fungus/Narrative/Deprecated/Arrow.png.meta b/Assets/Fungus/Narrative/Deprecated/Arrow.png.meta deleted file mode 100644 index d3d80465..00000000 --- a/Assets/Fungus/Narrative/Deprecated/Arrow.png.meta +++ /dev/null @@ -1,48 +0,0 @@ -fileFormatVersion: 2 -guid: b3426f0a4460547a69fc64b85700a13d -TextureImporter: - fileIDToRecycleName: - 21300000: Arrow - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Assets/Fungus/Narrative/Deprecated/Choose.cs b/Assets/Fungus/Narrative/Deprecated/Choose.cs deleted file mode 100644 index f88a3784..00000000 --- a/Assets/Fungus/Narrative/Deprecated/Choose.cs +++ /dev/null @@ -1,202 +0,0 @@ -using UnityEngine; -using UnityEngine.Serialization; -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Fungus -{ - [CommandInfo("Deprecated", - "Choose", - "Obsolete: This command will be removed in a future update. Please use the Menu command instead.", - -1)] - [AddComponentMenu("")] - public class Choose : Command - { - public class Option - { - public string optionText; - [FormerlySerializedAs("targetSequence")] - public Block targetBlock; - public Action action; - } - - static public List