diff --git a/Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset b/Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset index 47f369fcedaea5a930f078b359f53fb3d2d2d844..6f20975a712a6ad37f187bb50da54e3ddd281ad9 100644 --- a/Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset +++ b/Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset @@ -2,14 +2,15 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2180264 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: LiberationSans SDF Material m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} - m_ShaderKeywords: + m_ValidKeywords: [] + m_InvalidKeywords: [] m_LightmapFlags: 1 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -67,6 +68,7 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _Ambient: 0.5 - _Bevel: 0.5 diff --git a/Assets/Scripts/GenerateDemoFiles.cs b/Assets/Scripts/GenerateDemoFiles.cs index 51fed2d1a788fee3c723b80dd029f55ab77ad075..09e7b0958acb842855f5546fbe62327246fda9b2 100644 --- a/Assets/Scripts/GenerateDemoFiles.cs +++ b/Assets/Scripts/GenerateDemoFiles.cs @@ -5,8 +5,12 @@ public class GenerateDemoFiles { + static bool firstcall = true; public static void GenerateAll() { + if (!firstcall) return; + firstcall = false; + Debug.LogWarning("Generating and Overwriting Stage Files"); GenerateDemoA(); GenerateDemoB(); diff --git a/Assets/Scripts/GlobalBehaviour.cs b/Assets/Scripts/GlobalBehaviour.cs index 9de3f3b6e8d29ae9fe8f91b53d3c84ad6d81f71a..a356eaa98c1ad2a2e41098f2faf7e90d1c539940 100644 --- a/Assets/Scripts/GlobalBehaviour.cs +++ b/Assets/Scripts/GlobalBehaviour.cs @@ -36,7 +36,7 @@ public class GlobalBehaviour : MonoBehaviour void Awake() { - //GenerateDemoFiles.GenerateAll(); + // GenerateDemoFiles.GenerateAll(); hintAnimationStartColor = _hintAnimationStartColor; hintAnimationEndColor = _hintAnimationEndColor; diff --git a/Assets/Scripts/InteractionEngine/FactHandling/FactOrganizer.cs b/Assets/Scripts/InteractionEngine/FactHandling/FactOrganizer.cs index 1f23ea11439d4969b75b01029afc3e9956c29dd3..0325f584517b47c38317175a1414b5faf08c9f04 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/FactOrganizer.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/FactOrganizer.cs @@ -18,7 +18,7 @@ /// Organizes (insertion/ deletion / etc. operations) and sepperates <see cref="Fact">Fact</see> spaces. /// Keeps track of insertion/ deletion actions for <see cref="undo"/> and <see cref="redo"/>. /// </summary> -public class FactOrganizer +public class FactOrganizer : IJSONsavable<FactOrganizer> { /// <summary> /// - <c>Key</c>: <see cref="Fact.Id"/> @@ -91,9 +91,7 @@ public class FactOrganizer /// @{ <summary> /// For <see cref="store(string, List<Directories>, bool, bool)"/> and <see cref="load(ref FactOrganizer, bool, string, List<Directories>, bool, out Dictionary<string, string>)"/> /// </summary> - protected internal string path = null; - private static List<Directories> - hierState = new List<Directories> { Directories.FactStateMachines }; + public string path { get; set; } = null; /// @} @@ -184,6 +182,12 @@ public meta(int workflow_id, bool active = true) } } + + static FactOrganizer() + { + IJSONsavable<FactOrganizer>.hierarchie = new List<Directories> { Directories.FactStateMachines }; + } + /// <summary> /// Only used by <see cref="JsonConverter"/> to initiate empty instance. /// </summary> @@ -211,17 +215,22 @@ public FactOrganizer(bool invoke = false) /// <param name="source">instance to be parsed</param> /// <param name="invoke">see <see cref="invoke"/></param> /// <param name="old_to_new">generated to map <c>Key</c> <see cref="Fact.Id"/> of <paramref name="source"/> to corresponding <c>Value</c> <see cref="Fact.Id"/> of <paramref name="target"/></param>. - protected static void ReInitializeFactOrganizer(ref FactOrganizer target, FactOrganizer source, bool invoke, out Dictionary<string, string> old_to_new) + protected static T ReInitializeFactOrganizer<T> + (FactOrganizer source, bool invoke, out Dictionary<string, string> old_to_new) + where T : FactOrganizer, new() { // TODO: other strategy needed when MMT save/load supported // map old URIs to new ones old_to_new = new Dictionary<string, string>(); - + // initiate - target.invoke = invoke; - target.MaxLabelId = source.MaxLabelId; - target.UnusedLabelIds = source.UnusedLabelIds; - target.FactDict = new Dictionary<string, Fact>(); + T target = new T() + { + invoke = invoke, + MaxLabelId = source.MaxLabelId, + UnusedLabelIds = source.UnusedLabelIds, + FactDict = new Dictionary<string, Fact>(), + }; // work Workflow foreach (var sn in source.Workflow) @@ -259,6 +268,7 @@ protected static void ReInitializeFactOrganizer(ref FactOrganizer target, FactOr target.undo(); target.soft_resetted = source.soft_resetted; + return target; } /// <summary> @@ -666,65 +676,8 @@ public void fastforward() redo(); } - /// @{ - /// TODO? move to interface? - /// TODO: document - public void store(string name, List<Directories> hierarchie = null, bool use_install_folder = false, bool overwrite = true) - { - hierarchie ??= new List<Directories>(); - hierarchie.AddRange(hierState.AsEnumerable()); - - string path_o = path; - path = CreatePathToFile(out bool exists, name, "JSON", hierarchie, use_install_folder); - - hierarchie.RemoveRange(hierarchie.Count - hierState.Count, hierState.Count); - - if (!exists || overwrite) - JSONManager.WriteToJsonFile(path, this); - - path = path_o; - } - - public static bool load(ref FactOrganizer set, bool draw, string name, List<Directories> hierarchie, bool use_install_folder, out Dictionary<string, string> old_to_new) - { - old_to_new = null; - hierarchie ??= new List<Directories>(); - hierarchie.AddRange(hierState.AsEnumerable()); - - string path = CreatePathToFile(out bool loadable, name, "JSON", hierarchie, use_install_folder); - hierarchie.RemoveRange(hierarchie.Count - hierState.Count, hierState.Count); - if (!loadable) - return false; - - FactOrganizer de_json = JSONManager.ReadFromJsonFile<FactOrganizer>(path); - ReInitializeFactOrganizer(ref set, de_json, draw, out old_to_new); - set.path = path; - - return true; - } - - public static void delete(string name, List<Directories> hierarchie, bool use_install_folder) - { - hierarchie ??= new List<Directories>(); - hierarchie.AddRange(hierState.AsEnumerable()); - - string path = CreatePathToFile(out bool _, name, "JSON", hierarchie, use_install_folder); - hierarchie.RemoveRange(hierarchie.Count - hierState.Count, hierState.Count); - - delete(path); - } - - public static void delete(string path) - { - if (File.Exists(path)) - File.Delete(path); - } - - public void delete() - { - delete(path); - } - /// @} + FactOrganizer IJSONsavable<FactOrganizer>._IJPstProcess(FactOrganizer raw_payload) + => ReInitializeFactOrganizer<FactOrganizer>(raw_payload, false, out _); /// <summary> /// Call this after assigning a stored instance in an empty world, that was not drawn. diff --git a/Assets/Scripts/InteractionEngine/FactHandling/SolutionOrganizer.cs b/Assets/Scripts/InteractionEngine/FactHandling/SolutionOrganizer.cs index f5f4c2e4eed7f410a0e876c1bd8282323ca649f0..d96301fca905727947e5ef8a1da45d6f24feddab 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/SolutionOrganizer.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/SolutionOrganizer.cs @@ -15,17 +15,9 @@ public class SolutionOrganizer : FactOrganizer, IJSONsavable<SolutionOrganizer> /// @{ <summary> adds to the end of the file name of a </summary> private const string /// <summary> SolutionFile (stores <see cref="SolutionOrganizer">this</see>) </summary> - endingSol = "_sol", - /// <summary> ValidationFile (stores <see cref="ValidationSet"/>) </summary> endingVal = "_val"; /// @} - /// <summary> - /// \copydoc FactOrganizer.hierState - /// Additional value for <see cref="ValidationSet"/> - /// </summary> - private static List<Directories> - hierVal = new List<Directories> { Directories.ValidationSets }; /// <summary> /// A collection of constrains of which *all* have to be <see langword="true"/> @@ -125,6 +117,11 @@ public bool IsEmpty() } } + static SolutionOrganizer() + { + IJSONsavable<SolutionOrganizer>.hierarchie = new List<Directories> { Directories.ValidationSets }; + } + /// \copydoc FactOrganizer.FactOrganizer() public SolutionOrganizer(): base() { @@ -144,33 +141,20 @@ public List<Fact> getMasterFactsByIndex (int i) } */ - /// @{ - /// TODO? move to interface? - /// TODO: document - bool IJSONsavable<SolutionOrganizer>.store(List<Directories> hierarchie, string name, bool use_install_folder, bool overwrite) + string IJSONsavable<SolutionOrganizer>._IJGetName(string name) => name + endingVal; + SolutionOrganizer IJSONsavable<SolutionOrganizer>._IJPstProcess(SolutionOrganizer raw_payload) { - return (this as IJSONsavable<SolutionOrganizer>).store(hierarchie, name + endingVal, use_install_folder, overwrite); - } + SolutionOrganizer payload = + ReInitializeFactOrganizer<SolutionOrganizer> + (raw_payload, false, out Dictionary<string, string> old_to_new); - bool IJSONsavable<SolutionOrganizer>.load(List<Directories> hierarchie, string name, out SolutionOrganizer payload, bool use_install_folder) - { - payload = null; - - if (!(this as IJSONsavable<SolutionOrganizer>).load(hierarchie, name, out SolutionOrganizer JsonTmp, use_install_folder)) - return false; - - payload = ReInitializeFactOrganizer(JsonTmp, false, out Dictionary<string, string> old_to_new) - as SolutionOrganizer; - payload.path = path; - - foreach (var element in JsonTmp.ValidationSet) + foreach (var element in raw_payload.ValidationSet) // Parse and add { element.MasterIDs = new HashSet<string>(element.MasterIDs.Select(k => old_to_new[k])); payload.ValidationSet.Add(element); } - return true; + return payload; } - /// @} } diff --git a/Assets/Scripts/JSONManager.cs b/Assets/Scripts/JSONManager.cs index f4e1c7f0d07bfec38169620d31fe6f19332303b5..eddd142a060e4833f5f991a945ddd9b6641cd26f 100644 --- a/Assets/Scripts/JSONManager.cs +++ b/Assets/Scripts/JSONManager.cs @@ -21,51 +21,83 @@ protected static List<Directories> hierarchie = new List<Directories> { Directories.misc }; - public bool store(List<Directories> hierarchie, string name, bool use_install_folder = false, bool overwrite = true) + #region OverridableMethods + + protected virtual string _IJGetName(string name) => name; + protected virtual List<Directories> _IJGetHierarchie(List<Directories> hierarchie_base) { - return store(hierarchie, name, this, use_install_folder, overwrite); + hierarchie_base ??= new List<Directories>(); + return hierarchie_base.Concat(hierarchie).ToList(); } + protected virtual T _IJGetRawObject(string path) => JSONManager.ReadFromJsonFile<T>(path); + protected virtual T _IJPreProcess(T payload) => payload; + protected virtual T _IJPstProcess(T payload) => payload; + + #endregion OverridableMethods + - public virtual bool store(List<Directories> hierarchie, string name, IJSONsavable<T> payload, bool use_install_folder = false, bool overwrite = true) + + #region MethodTemplates + + public bool store(List<Directories> hierarchie, string name, bool use_install_folder = false, bool overwrite = true) { - hierarchie ??= new List<Directories>(); - List<Directories> new_hierarchie = hierarchie.Concat(IJSONsavable<T>.hierarchie) as List<Directories>; + return store(hierarchie, name, (T) this, use_install_folder, overwrite); + } - string path = CreatePathToFile(out bool exists, name, "JSON", new_hierarchie, use_install_folder); + public static bool store(List<Directories> hierarchie, string name, T payload, bool use_install_folder = false, bool overwrite = true) + { + var new_hierarchie = + Instance._IJGetHierarchie(hierarchie); + var new_name = + Instance._IJGetName(name); + string path = CreatePathToFile(out bool exists, new_name, "JSON", new_hierarchie, use_install_folder); if (exists && !overwrite) return false; - JSONManager.WriteToJsonFile(path, payload); + string path_o = payload.path; + payload.path = path; + + var new_payload = + Instance._IJPreProcess(payload); + + payload.path = path_o; + + JSONManager.WriteToJsonFile(path, new_payload); return true; } - public virtual bool load(List<Directories> hierarchie, string name, out T payload, bool use_install_folder = false) + public static bool load(List<Directories> hierarchie, string name, out T payload, bool use_install_folder = false) { payload = default(T); - - hierarchie ??= new List<Directories>(); - List<Directories> new_hierarchie = hierarchie.Concat(IJSONsavable<T>.hierarchie) as List<Directories>; + var new_hierarchie = + Instance._IJGetHierarchie(hierarchie); string path = CreatePathToFile(out bool loadable, name, "JSON", new_hierarchie, use_install_folder); if (!loadable) return false; - payload = JSONManager.ReadFromJsonFile<T>(path); + var raw_payload = + Instance._IJGetRawObject(path); + payload = + Instance._IJPstProcess(raw_payload); + return true; } - public virtual bool delete(List<Directories> hierarchie, string name, bool use_install_folder = false) + public static bool delete(List<Directories> hierarchie, string name, bool use_install_folder = false) { - hierarchie ??= new List<Directories>(); - List<Directories> new_hierarchie = hierarchie.Concat(IJSONsavable<T>.hierarchie) as List<Directories>; + var new_hierarchie = + Instance._IJGetHierarchie(hierarchie); + var new_name = + Instance._IJGetName(name); - string path = CreatePathToFile(out bool _, name, "JSON", new_hierarchie, use_install_folder); + string path = CreatePathToFile(out bool _, new_name, "JSON", new_hierarchie, use_install_folder); return delete(path); } - public virtual bool delete(string path) + public static bool delete(string path) { if (!File.Exists(path)) return false; @@ -74,10 +106,12 @@ public virtual bool delete(string path) return true; } - public virtual bool delete() + public bool delete() { - return this.delete(path); + return delete(path); } + + #endregion MethodTemplates } public class MMTURICollection diff --git a/Assets/Scripts/Loading/Stage.cs b/Assets/Scripts/Loading/Stage.cs index e03ebb76aa65a1d8a64c441a8e445d6818b70e7b..6a324659007245c3b0df2c4f77774d250db49db3 100644 --- a/Assets/Scripts/Loading/Stage.cs +++ b/Assets/Scripts/Loading/Stage.cs @@ -376,7 +376,7 @@ public void delete(bool player_record_list_too) ClearSolution(); ClearPlay(); - solution.delete(); + (solution as IJSONsavable<SolutionOrganizer>).delete(); player_record.delete(hierarchie); foreach (var record in player_record_list.Values.ToList()) @@ -414,7 +414,7 @@ public void store(bool reset_player = false) hierarchie.AddRange(hierStage.AsEnumerable()); if(solution != null) - solution.store(name, hierarchie, use_install_folder, + (solution as IJSONsavable<SolutionOrganizer>).store(hierarchie, name, use_install_folder, overwrite: solution.ValidationSet.Count > 0 && !solution.ValidationSet.Aggregate(true, (last, next) => last && next.IsEmpty())); } @@ -507,8 +507,7 @@ public bool DeepLoad() bool loadable; - solution ??= new SolutionOrganizer(false); - loadable = SolutionOrganizer.load(ref solution, false, name, hierarchie, use_install_folder); + loadable = IJSONsavable<SolutionOrganizer>.load(hierarchie, name, out solution,use_install_folder); if (!loadable) return false; @@ -647,7 +646,7 @@ public void store(List<Directories> hierarchie, bool force_write) hierarchie.AddRange(hierStage.AsEnumerable()); if (factState != null) - factState.store(name, hierarchie, false, force_write); + (factState as IJSONsavable<FactOrganizer>).store(hierarchie, name, false, force_write); hierarchie.RemoveRange(hierarchie.Count - hierStage.Count, hierStage.Count); } @@ -659,7 +658,7 @@ public bool load(List<Directories> hierarchie) hierarchie.AddRange(hierStage.AsEnumerable()); factState = new FactOrganizer(false); - bool loadable = FactOrganizer.load(ref factState, false, name, hierarchie, false, out _); + bool loadable = IJSONsavable<FactOrganizer>.load(hierarchie, name, out factState, false); hierarchie.RemoveRange(hierarchie.Count - hierStage.Count, hierStage.Count); if (!loadable) { return false; @@ -673,7 +672,7 @@ public void delete(List<Directories> hierarchie) hierarchie ??= new List<Directories>(); hierarchie.AddRange(hierStage.AsEnumerable()); - FactOrganizer.delete(name, hierarchie, false); + IJSONsavable<FactOrganizer>.delete(hierarchie, name, false); hierarchie.RemoveRange(hierarchie.Count - hierStage.Count, hierStage.Count); } diff --git a/Assets/Scripts/UI/MainMenue/CollapsableStage/CollapsableStage.cs b/Assets/Scripts/UI/MainMenue/CollapsableStage/CollapsableStage.cs index 1c0e3a31acb6104f97300fb033e4b03aa69142e1..0c63522aff41d184a843f31efeaed48db2d2b3f4 100644 --- a/Assets/Scripts/UI/MainMenue/CollapsableStage/CollapsableStage.cs +++ b/Assets/Scripts/UI/MainMenue/CollapsableStage/CollapsableStage.cs @@ -1,7 +1,7 @@ -using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; +using UnityEngine.Events; using static UIToolBox; public class CollapsableStage : MonoBehaviour @@ -69,17 +69,23 @@ public void DrawChildren() this.Init(); }); - // set clone button - time_entry.GetNthChild(new List<int> { 4, 0 }).GetComponent<UnityEngine.UI.Button>().onClick.AddListener(delegate { - if (!stage.set_record(stage.player_record_list[index])) - { + // button Action to load a record + UnityAction loadRecord = delegate () { + // redraw this, when unable to find record + if (!stage.set_record(stage.player_record_list[index])) { this.Init(); return; } StageStatic.SetMode(StageStatic.Mode.Play); // TODO: handle unable to load Loader.LoadStage(stage.name, !stage.use_install_folder, true); - }); + }; + + // set implicit load button (whole header) + time_entry.GetComponent<UnityEngine.UI.Button>().onClick.AddListener(loadRecord); + + // set clone button + time_entry.GetNthChild(new List<int> { 4, 0 }).GetComponent<UnityEngine.UI.Button>().onClick.AddListener(loadRecord); } } } diff --git a/Assets/Stages/Stages.meta b/Assets/Stages/FactStateMachines.meta similarity index 77% rename from Assets/Stages/Stages.meta rename to Assets/Stages/FactStateMachines.meta index 14ecc71220f57f2ef15c83a94003c48c3add0232..debf5ea4e5e4c133644ea1901cafeceec3d4ecba 100644 --- a/Assets/Stages/Stages.meta +++ b/Assets/Stages/FactStateMachines.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 94e80c57976c35c4ab7456cc01dd7a40 +guid: 7d43c521d7312964cb72014365bd183e folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Stages/FactStateMachines/TechDemo A.JSON b/Assets/Stages/FactStateMachines/TechDemo A.JSON new file mode 100644 index 0000000000000000000000000000000000000000..44fda086c9377bf6388b2b00c979f9b52a24565d --- /dev/null +++ b/Assets/Stages/FactStateMachines/TechDemo A.JSON @@ -0,0 +1 @@ +{"ValidationSet":[{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2844"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineFactHightDirectionComparer"}],"FactDict":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2842":{"s_type":"PointFact","Point":{"x":0.0,"y":0.0,"z":0.0,"magnitude":0.0,"sqrMagnitude":0.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2842","Label":"A","hasCustomLabel":false,"LabelId":1},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2843":{"s_type":"PointFact","Point":{"x":0.0,"y":6.0,"z":0.0,"normalized":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"magnitude":6.0,"sqrMagnitude":36.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2843","Label":"B","hasCustomLabel":false,"LabelId":2},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2844":{"s_type":"LineFact","Distance":6.0,"Pid1":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2842","Pid2":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2843","Dir":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2844","Label":"[AB]","hasCustomLabel":false,"LabelId":0}},"MetaInf":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2842":{"workflow_id":0,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2843":{"workflow_id":1,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2844":{"workflow_id":2,"active":true}},"Workflow":[{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2842","samestep":false,"steplink":3,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2843","samestep":true,"steplink":0,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2844","samestep":true,"steplink":0,"creation":true}],"marker":3,"worksteps":1,"backlog":0,"soft_resetted":false,"invoke":false,"MaxLabelId":2,"UnusedLabelIds":[],"path":null} \ No newline at end of file diff --git a/Assets/Stages/ValidationSets/TechDemo B_val.JSON.meta b/Assets/Stages/FactStateMachines/TechDemo A.JSON.meta similarity index 75% rename from Assets/Stages/ValidationSets/TechDemo B_val.JSON.meta rename to Assets/Stages/FactStateMachines/TechDemo A.JSON.meta index 7f8e7e62582d45f9128d1cf112be4e6c377d6d4f..7a7991a639facce43bdf9d684bd967ade8d15383 100644 --- a/Assets/Stages/ValidationSets/TechDemo B_val.JSON.meta +++ b/Assets/Stages/FactStateMachines/TechDemo A.JSON.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8fe9258a5917e3c4f8935875a478ed20 +guid: b9f66b56bf429ad42a19258696330fa3 TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/Stages/FactStateMachines/TechDemo B.JSON b/Assets/Stages/FactStateMachines/TechDemo B.JSON new file mode 100644 index 0000000000000000000000000000000000000000..41312506fd24bfceb0dcf18c3545b1225e4022ac --- /dev/null +++ b/Assets/Stages/FactStateMachines/TechDemo B.JSON @@ -0,0 +1 @@ +{"ValidationSet":[{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2847"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineFactHightDirectionComparer"},{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2847"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineSpanningOverRiverWorldComparer"},{"MasterIDs":[],"SolutionIndex":[1],"RelationIndex":[0],"ComparerString":"LineFactHightComparer"}],"FactDict":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2845":{"s_type":"PointFact","Point":{"x":0.0,"y":0.0,"z":0.0,"magnitude":0.0,"sqrMagnitude":0.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2845","Label":"A","hasCustomLabel":false,"LabelId":1},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2846":{"s_type":"PointFact","Point":{"x":0.0,"y":6.0,"z":0.0,"normalized":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"magnitude":6.0,"sqrMagnitude":36.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2846","Label":"B","hasCustomLabel":false,"LabelId":2},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2847":{"s_type":"LineFact","Distance":6.0,"Pid1":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2845","Pid2":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2846","Dir":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2847","Label":"[AB]","hasCustomLabel":false,"LabelId":0}},"MetaInf":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2845":{"workflow_id":0,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2846":{"workflow_id":1,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2847":{"workflow_id":2,"active":true}},"Workflow":[{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2845","samestep":false,"steplink":3,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2846","samestep":true,"steplink":0,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2847","samestep":true,"steplink":0,"creation":true}],"marker":3,"worksteps":1,"backlog":0,"soft_resetted":false,"invoke":false,"MaxLabelId":2,"UnusedLabelIds":[],"path":null} \ No newline at end of file diff --git a/Assets/Stages/ValidationSets/TechDemo A_val.JSON.meta b/Assets/Stages/FactStateMachines/TechDemo B.JSON.meta similarity index 75% rename from Assets/Stages/ValidationSets/TechDemo A_val.JSON.meta rename to Assets/Stages/FactStateMachines/TechDemo B.JSON.meta index e82db1a4aafa5502d34c9fc11fbb12060afb7d12..8c36ca7bb7a99b5398b33cb4302eff4b77c8eefe 100644 --- a/Assets/Stages/ValidationSets/TechDemo A_val.JSON.meta +++ b/Assets/Stages/FactStateMachines/TechDemo B.JSON.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c1f88002b210dd4449cbaf8b9bb46003 +guid: 6c3c72bfe0bce2d4dbc7bfa537c6c2bf TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/Stages/TechDemo A.JSON b/Assets/Stages/TechDemo A.JSON index 56b662f2dab91c984d9742e55e8533967f666ae6..ac6246f475c836f183a48e3d7a577e7a77bb3a36 100644 --- a/Assets/Stages/TechDemo A.JSON +++ b/Assets/Stages/TechDemo A.JSON @@ -1 +1 @@ -{"category":"Demo Category","number":0,"name":"TechDemo A","description":"Tree Stage","scene":"RiverWorld","use_install_folder":true,"hierarchie":[],"player_record_list":{},"player_record":{"solved":false,"date":-8585439463646016511,"seconds":0.0,"name":"TechDemo A_save"}} \ No newline at end of file +{"category":"Demo Category","number":0,"name":"TechDemo A","description":"Tree Stage","scene":"RiverWorld","use_install_folder":true,"hierarchie":[],"player_record_list":{},"player_record":{"solved":false,"date":-8585436724597716289,"seconds":0.0,"name":"TechDemo A_save"}} \ No newline at end of file diff --git a/Assets/Stages/TechDemo B.JSON b/Assets/Stages/TechDemo B.JSON index 29f3be06184b1d926d9ed99370977e86776c64a3..c52c06871b52696cb33544ed4b9b16c3353139a2 100644 --- a/Assets/Stages/TechDemo B.JSON +++ b/Assets/Stages/TechDemo B.JSON @@ -1 +1 @@ -{"category":"Demo Category","number":0,"name":"TechDemo B","description":"River Stage","scene":"RiverWorld","use_install_folder":true,"hierarchie":[],"player_record_list":{},"player_record":{"solved":false,"date":-8585439463643952992,"seconds":0.0,"name":"TechDemo B_save"}} \ No newline at end of file +{"category":"Demo Category","number":0,"name":"TechDemo B","description":"River Stage","scene":"RiverWorld","use_install_folder":true,"hierarchie":[],"player_record_list":{},"player_record":{"solved":false,"date":-8585436724595934380,"seconds":0.0,"name":"TechDemo B_save"}} \ No newline at end of file diff --git a/Assets/Stages/ValidationSets.meta b/Assets/Stages/ValidationSets.meta deleted file mode 100644 index ad54ce5b72374f0e9fadfc549f9adb0647c3469e..0000000000000000000000000000000000000000 --- a/Assets/Stages/ValidationSets.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: adcbcdc21be4b2a4a85d96580503e38b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Stages/ValidationSets/TechDemo A_val.JSON b/Assets/Stages/ValidationSets/TechDemo A_val.JSON deleted file mode 100644 index da10b443369fc915b1da4fc6673b2d566a88c1d2..0000000000000000000000000000000000000000 --- a/Assets/Stages/ValidationSets/TechDemo A_val.JSON +++ /dev/null @@ -1 +0,0 @@ -{"ValidationSet":[{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact262"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineFactHightDirectionComparer"}],"FactDict":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact260":{"s_type":"PointFact","Point":{"x":0.0,"y":0.0,"z":0.0,"magnitude":0.0,"sqrMagnitude":0.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact260","Label":"A","hasCustomLabel":false,"LabelId":1},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact261":{"s_type":"PointFact","Point":{"x":0.0,"y":6.0,"z":0.0,"normalized":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"magnitude":6.0,"sqrMagnitude":36.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact261","Label":"B","hasCustomLabel":false,"LabelId":2},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact262":{"s_type":"LineFact","Distance":6.0,"Pid1":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact260","Pid2":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact261","Dir":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact262","Label":"[AB]","hasCustomLabel":false,"LabelId":0}},"MetaInf":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact260":{"workflow_id":0,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact261":{"workflow_id":1,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact262":{"workflow_id":2,"active":true}},"Workflow":[{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact260","samestep":false,"steplink":3,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact261","samestep":true,"steplink":0,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact262","samestep":true,"steplink":0,"creation":true}],"marker":3,"worksteps":1,"backlog":0,"soft_resetted":false,"invoke":false,"MaxLabelId":2,"UnusedLabelIds":[]} \ No newline at end of file diff --git a/Assets/Stages/ValidationSets/TechDemo B_val.JSON b/Assets/Stages/ValidationSets/TechDemo B_val.JSON deleted file mode 100644 index 53d4c077d4fec323afe506b82d48e1f2d2c99245..0000000000000000000000000000000000000000 --- a/Assets/Stages/ValidationSets/TechDemo B_val.JSON +++ /dev/null @@ -1 +0,0 @@ -{"ValidationSet":[{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact265"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineFactHightDirectionComparer"},{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact265"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineSpanningOverRiverWorldComparer"},{"MasterIDs":[],"SolutionIndex":[1],"RelationIndex":[0],"ComparerString":"LineFactHightComparer"}],"FactDict":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact263":{"s_type":"PointFact","Point":{"x":0.0,"y":0.0,"z":0.0,"magnitude":0.0,"sqrMagnitude":0.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact263","Label":"A","hasCustomLabel":false,"LabelId":1},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact264":{"s_type":"PointFact","Point":{"x":0.0,"y":6.0,"z":0.0,"normalized":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"magnitude":6.0,"sqrMagnitude":36.0},"Normal":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact264","Label":"B","hasCustomLabel":false,"LabelId":2},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact265":{"s_type":"LineFact","Distance":6.0,"Pid1":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact263","Pid2":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact264","Dir":{"x":0.0,"y":1.0,"z":0.0,"magnitude":1.0,"sqrMagnitude":1.0},"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact265","Label":"[AB]","hasCustomLabel":false,"LabelId":0}},"MetaInf":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact263":{"workflow_id":0,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact264":{"workflow_id":1,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact265":{"workflow_id":2,"active":true}},"Workflow":[{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact263","samestep":false,"steplink":3,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact264","samestep":true,"steplink":0,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact265","samestep":true,"steplink":0,"creation":true}],"marker":3,"worksteps":1,"backlog":0,"soft_resetted":false,"invoke":false,"MaxLabelId":2,"UnusedLabelIds":[]} \ No newline at end of file diff --git a/Assets/Standard Assets/Utility/EventSystemChecker.cs b/Assets/Standard Assets/Utility/EventSystemChecker.cs index a384db6338519060fcba753cb2bfe9fe3dc339ee..2a2b600c482a7ab19a5aa36098a219d77f46be76 100644 --- a/Assets/Standard Assets/Utility/EventSystemChecker.cs +++ b/Assets/Standard Assets/Utility/EventSystemChecker.cs @@ -13,7 +13,7 @@ void Awake() //Instantiate(eventSystem); GameObject obj = new GameObject("EventSystem"); obj.AddComponent<EventSystem>(); - obj.AddComponent<StandaloneInputModule>().forceModuleActive = true; + // obsolete?: obj.AddComponent<StandaloneInputModule>().forceModuleActive = true; } } }