Skip to content
Snippets Groups Projects
Commit bd6fc83e authored by Marco Zimmer's avatar Marco Zimmer
Browse files

+ completed IJSONsavable<> & integration into Stage/Fact/Organizer-classes\n+...

+ completed IJSONsavable<> & integration into Stage/Fact/Organizer-classes\n+ No error if no savegame found\n+ some bug fixes (create/load/save/edit)
parent 2a99a904
No related branches found
No related tags found
No related merge requests found
Showing
with 314 additions and 483 deletions
......@@ -25,13 +25,13 @@ public static void GenerateDemoA()
// TODO? use constructor
Stage demo = new Stage
{
number = 0,
number = 1,
category = "Demo Category",
name = "TechDemo A",
scene = "RiverWorld",
description = "Tree Stage",
use_install_folder = true,
hierarchie = new List<Directories> { /*Directories.Stages*/ }
//hierarchie = new List<Directories> { /*Directories.Stages*/ }
};
// needed to generate facts
......@@ -58,6 +58,7 @@ public static void GenerateDemoA()
{ new SolutionOrganizer.SubSolution(new HashSet<string> { target_Id }, null, null, new LineFactHightDirectionComparer()) };
// Save
StageStatic.SetMode(StageStatic.Mode.Create);
StageStatic.stage.store();
}
......@@ -70,13 +71,13 @@ public static void GenerateDemoB()
// TODO? use constructor
Stage demo = new Stage
{
number = 0,
number = 2,
category = "Demo Category",
name = "TechDemo B",
scene = "RiverWorld",
description = "River Stage",
use_install_folder = true,
hierarchie = new List<Directories> { /*Directories.Stages*/ }
//hierarchie = new List<Directories> { /*Directories.Stages*/ }
};
// needed to generate facts
......@@ -106,6 +107,7 @@ public static void GenerateDemoB()
};
// Save
StageStatic.SetMode(StageStatic.Mode.Create);
StageStatic.stage.store();
}
}
......@@ -36,7 +36,7 @@ public class GlobalBehaviour : MonoBehaviour
void Awake()
{
// GenerateDemoFiles.GenerateAll();
GenerateDemoFiles.GenerateAll();
hintAnimationStartColor = _hintAnimationStartColor;
hintAnimationEndColor = _hintAnimationEndColor;
......
......@@ -108,6 +108,7 @@ public enum Directories
{
misc,
Stages,
SaveGames,
ValidationSets,
FactStateMachines,
}
......
......@@ -104,7 +104,7 @@ public abstract class Fact
/// Also add JsonSubtypes.KnownSubType decorator for deserialization to Fact!
/// </value>
[JsonProperty]
protected static readonly /*new*/ string s_type = "ERROR: set s_type in T:Fact"; // In the subtype! NOT here!
protected static /*new*/ string s_type = "ERROR: set s_type in T:Fact"; // In the subtype! NOT here!
/// <value>
/// Unique Id. e.g.: MMT URI
......@@ -125,9 +125,10 @@ public string Id {
/// </value>
public string Label {
get { // in case of renamed dependables
return hasCustomLabel && _CustomLabel != null ?
_CustomLabel :
generateLabel();
return _Facts.FactDict.Count == 0
|| (hasCustomLabel && _CustomLabel != null)
? _CustomLabel
: generateLabel();
}
set { rename(value); }
}
......@@ -486,7 +487,7 @@ public class PointFact : FactWrappedCRTP<PointFact>
{
/// \copydoc Fact.s_type
[JsonProperty]
protected static readonly new string s_type = "PointFact";
protected static new string s_type = "PointFact";
/// <summary> Position </summary>
public Vector3 Point;
......@@ -620,7 +621,7 @@ public class LineFact : AbstractLineFactWrappedCRTP<LineFact>
{
/// \copydoc Fact.s_type
[JsonProperty]
protected static readonly new string s_type = "LineFact";
protected static new string s_type = "LineFact";
/// <summary> Distance between <see cref="AbstractLineFact.Pid1"/> and <see cref="AbstractLineFact.Pid2"/></summary>
public float Distance;
......@@ -746,7 +747,7 @@ public class RayFact : AbstractLineFactWrappedCRTP<RayFact>
{
/// \copydoc Fact.s_type
[JsonProperty]
protected static readonly new string s_type = "RayFact";
protected static new string s_type = "RayFact";
/// <summary> \copydoc Fact.Fact </summary>
public RayFact() : base() { }
......@@ -850,7 +851,7 @@ public class OnLineFact : FactWrappedCRTP<OnLineFact>
{
/// \copydoc Fact.s_type
[JsonProperty]
protected static readonly new string s_type = "OnLineFact";
protected static new string s_type = "OnLineFact";
public string
/// <summary> <see cref="PointFact"/>.<see cref="Fact.Id">Id</see> </summary>
......@@ -1008,7 +1009,7 @@ public class AngleFact : FactWrappedCRTP<AngleFact>
{
/// \copydoc Fact.s_type
[JsonProperty]
protected static readonly new string s_type = "AngleFact";
protected static new string s_type = "AngleFact";
/// @{ <summary>
/// One <see cref="Fact.Id">Id</see> of three <see cref="PointFact">PointFacts</see> defining Angle [<see cref="Pid1"/>, <see cref="Pid2"/>, <see cref="Pid3"/>].
......
......@@ -91,6 +91,7 @@ public class FactOrganizer : IJSONsavable<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>
public string name { get; set; } = null;
public string path { get; set; } = null;
/// @}
......@@ -215,7 +216,7 @@ 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 T ReInitializeFactOrganizer<T>
public static T ReInitializeFactOrganizer<T>
(FactOrganizer source, bool invoke, out Dictionary<string, string> old_to_new)
where T : FactOrganizer, new()
{
......
......@@ -14,35 +14,50 @@
// static methods cannot be overwritten -> virtual
public interface IJSONsavable<T> where T : IJSONsavable<T>, new()
{
// stand in for non static methods
public static readonly IJSONsavable<T> Instance = new T();
// stand-in for non static methods
public static readonly IJSONsavable<T> Instance = new T();
public static readonly FieldInfo[] JsonSeperateFields =
typeof(T)
.GetFields(
BindingFlags.Instance |
BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.Static )
.Where((field)
=> field.GetCustomAttributes().Any((attribute)
=> attribute.GetType() == typeof(JSONManager.JsonSeparateAttribute))
&& field.FieldType.GetInterfaces().Any((inter)
=> inter.IsGenericType && inter.GetGenericTypeDefinition() == typeof(IJSONsavable<>)))
.ToArray();
// TODO: this?
public string name { get; set; }
public string path { get; set; }
protected static List<Directories>
hierarchie = new List<Directories> { Directories.misc };
#region OverridableMethods
protected virtual string _IJGetName(string name) => name;
protected virtual List<Directories> _IJGetHierarchie(List<Directories> hierarchie_base)
public virtual string _IJGetName(string name) => name;
public virtual List<Directories> _IJGetHierarchie(List<Directories> hierarchie_base)
{
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 _IJPostProcess(T payload) => payload;
public virtual bool _IJGetRawObject(out T payload, string path) => JSONManager.ReadFromJsonFile<T>(out payload, path);
public virtual T _IJPreProcess(T payload) => payload;
public virtual T _IJPostProcess(T payload) => payload;
#endregion OverridableMethods
#region MethodTemplates
public bool store(List<Directories> hierarchie, string name, bool use_install_folder = false, bool overwrite = true)
{
return store(hierarchie, name, (T) this, use_install_folder, overwrite);
}
public bool store(List<Directories> hierarchie, string name, bool use_install_folder = false, bool overwrite = true, bool deep_store = true)
=> store(hierarchie, name, (T) this, use_install_folder, overwrite, deep_store);
public static bool store(List<Directories> hierarchie, string name, T payload, bool use_install_folder = false, bool overwrite = true)
public static bool store(List<Directories> hierarchie, string name, T payload, bool use_install_folder = false, bool overwrite = true, bool deep_store = true)
{
var new_hierarchie =
Instance._IJGetHierarchie(hierarchie);
......@@ -53,6 +68,12 @@ public static bool store(List<Directories> hierarchie, string name, T payload, b
if (exists && !overwrite)
return false;
// store fields decorated with JsonSeparateAttribute and implementing IJSONsavable<> separately
if (deep_store
&& !store_children(hierarchie, name, payload, use_install_folder: false, overwrite, deep_store: true))
return false;
// store this
string path_o = payload.path;
payload.path = path;
......@@ -64,23 +85,114 @@ public static bool store(List<Directories> hierarchie, string name, T payload, b
JSONManager.WriteToJsonFile(path, new_payload);
return true;
}
public bool store_children(List<Directories> hierarchie, string name, bool use_install_folder = false, bool overwrite = true, bool deep_store = true)
=> store_children(hierarchie, name, (T) this, use_install_folder, overwrite, deep_store);
public static bool store_children(List<Directories> hierarchie, string name, T payload, bool use_install_folder = false, bool overwrite = true, bool deep_store = true)
{
var new_hierarchie =
Instance._IJGetHierarchie(hierarchie);
var new_name =
Instance._IJGetName(name);
for ((int max_i, bool success) = (0, true); max_i < JsonSeperateFields.Count(); max_i++)
{
var field = JsonSeperateFields[max_i];
dynamic save_me = field.GetValue(payload); // is S:IJSONsavable<S>
Type interface_type = typeof(IJSONsavable<>).MakeGenericType(field.FieldType);
Type[] store_args_type = new Type[] { typeof(List<Directories>), typeof(string), field.FieldType, typeof(bool), typeof(bool), typeof(bool) };
object[] store_args = new object[] { new_hierarchie, new_name, save_me, use_install_folder, overwrite, deep_store };
var method = interface_type.GetMethod("store", store_args_type);
success &= (bool)method.Invoke(null, store_args);
// in case of no success: delete it again
if (!success)
{
delete_children(hierarchie, name, use_install_folder, JsonSeperateFields.Count() - max_i);
return false;
}
}
return true;
}
public static bool load_children(List<Directories> hierarchie, string name, ref T raw_payload, bool use_install_folder = false, bool deep_load = true, bool post_process = true)
{
var new_hierarchie =
Instance._IJGetHierarchie(hierarchie);
var new_name =
Instance._IJGetName(name);
bool success = true;
for (int max_i = 0; max_i < JsonSeperateFields.Count(); max_i++)
{
var field = JsonSeperateFields[max_i];
Type interface_type = typeof(IJSONsavable<>).MakeGenericType(field.FieldType);
Type[] load_args_type = new Type[] { typeof(List<Directories>), typeof(string), field.FieldType.MakeByRefType(), typeof(bool), typeof(bool), typeof(bool) };
object[] load_args = new object[] { new_hierarchie, new_name, null, use_install_folder, deep_load, post_process };
var method = interface_type.GetMethod("load", BindingFlags.Public | BindingFlags.Static, null, load_args_type, null);
bool success_i = (bool)method.Invoke(null, load_args);
field.SetValue(raw_payload, success_i ? load_args[2] : Activator.CreateInstance(field.FieldType));
success &= success_i;
}
return success;
}
public static 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, bool deep_load = true, bool post_process = true)
{
payload = default(T);
bool success = true;
var new_hierarchie =
Instance._IJGetHierarchie(hierarchie);
var new_name =
Instance._IJGetName(name);
string path = CreatePathToFile(out bool loadable, name, "JSON", new_hierarchie, use_install_folder);
string path = CreatePathToFile(out bool loadable, new_name, "JSON", new_hierarchie, use_install_folder);
if (!loadable)
return false;
var raw_payload =
Instance._IJGetRawObject(path);
payload =
Instance._IJPostProcess(raw_payload);
if (!Instance._IJGetRawObject(out T raw_payload, path))
return false;
raw_payload.name = new_name;
return true;
// load fields decorated with JsonSeparateAttribute and implementing IJSONsavable<> separately
if (deep_load
&& !load_children(hierarchie, name, ref raw_payload, false /*use_install_folder*/))
success = false;
payload = post_process
? Instance._IJPostProcess(raw_payload)
: raw_payload;
return success;
}
public static void delete_children(List<Directories> hierarchie, string name, bool use_install_folder = false, int skip_last_children = 0)
{
var new_hierarchie =
Instance._IJGetHierarchie(hierarchie);
var new_name =
Instance._IJGetName(name);
for(int i = 0; i < JsonSeperateFields.Count() - skip_last_children; i++)
{
var field = JsonSeperateFields[i];
Type interface_type = typeof(IJSONsavable<>).MakeGenericType(field.FieldType);
Type[] delete_args_type = new Type[] { typeof(List<Directories>), typeof(string), typeof(bool) };
object[] delete_args = new object[] { new_hierarchie, new_name, use_install_folder };
var method = interface_type.GetMethod("delete", delete_args_type);
method.Invoke(null, delete_args);
}
}
public static bool delete(List<Directories> hierarchie, string name, bool use_install_folder = false)
......@@ -91,11 +203,15 @@ public static bool delete(List<Directories> hierarchie, string name, bool use_in
Instance._IJGetName(name);
string path = CreatePathToFile(out bool _, new_name, "JSON", new_hierarchie, use_install_folder);
if (!delete(path))
return false;
return delete(path);
delete_children(hierarchie, name, use_install_folder);
return true;
}
public static bool delete(string path)
// does not delete children!
private static bool delete(string path)
{
if (!File.Exists(path))
return false;
......@@ -104,10 +220,7 @@ public static bool delete(string path)
return true;
}
public bool delete()
{
return delete(path);
}
// public bool delete() => delete(hierarchie, name);
#endregion MethodTemplates
......@@ -259,6 +372,11 @@ public MMTValueDeclaration(string label, MMTTerm lhs, MMTTerm valueTp, MMTTerm v
}
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class JsonSeparateAttribute : Attribute
{
public JsonSeparateAttribute() { }
}
// TODO? /// <para>If there are public properties/variables that you do not want written to the file, decorate them with the [JsonIgnore] attribute.</para>
......@@ -270,104 +388,32 @@ public MMTValueDeclaration(string label, MMTTerm lhs, MMTTerm valueTp, MMTTerm v
/// <param name="filePath">The file path to write the object instance to.</param>
/// <param name="objectToWrite">The object instance to write to the file.</param>
/// <param name="max_depth">The depth recursion will occur. Default = 0.</param>
public static void WriteToJsonFile(string filePath, object objectToWrite, int max_depth = 0)
public static bool WriteToJsonFile(string filePath, object objectToWrite, int max_depth = 0)
{
int current_depth = 0;
// This tells your serializer that multiple references are okay.
var settings = new JsonSerializerSettings
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
};
BindingFlags bindFlags =
BindingFlags.Instance |
BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.Static;
TextWriter writer = null;
try
{
string payload = RecursiveStep(objectToWrite);
string payload = JsonConvert.SerializeObject(objectToWrite, settings);
writer = new StreamWriter(filePath);
writer.Write(payload);
return true;
}
catch (Exception e)
{
Debug.LogError(e);
return false;
}
finally
{
if (writer != null)
writer.Close();
}
// ======= local methods =======
// TODO? more stable depths (see next todo)
// TODO? respect IgnoreJson tags
string RecursiveStep<S>(S objectToWrite) where S : new()
{
string json;
if (current_depth >= max_depth
|| Type.GetTypeCode(objectToWrite.GetType()) != TypeCode.Object
|| objectToWrite == null)
json = JsonConvert.SerializeObject(objectToWrite, settings/*, new JsonInheritenceConverter<object>()*/);
else
{
current_depth++;
json = IntrusiveRecursiveJsonGenerator(objectToWrite);
current_depth--;
}
return json;
}
string IntrusiveRecursiveJsonGenerator<S>(S objectToWrite) where S : new()
// private convention? more like private suggestion!
{
bool is_enum = IsEnumerableType(objectToWrite.GetType());
string json = is_enum ? "[" : "{";
foreach (object field in is_enum ? (objectToWrite as IEnumerable) : objectToWrite.GetType().GetFields(bindFlags))
{
object not_so_private;
if (is_enum)
{
not_so_private = field;
}
else
{
not_so_private = ((FieldInfo)field).GetValue(objectToWrite);
json += ((FieldInfo)field).Name + ":";
}
json += RecursiveStep(not_so_private);
json += ",";
}
json = json.TrimEnd(',') + (is_enum ? "]" : "}");
return json;
// ======= local methods =======
bool IsEnumerableType(Type type)
{
if (type.IsInterface && type.GetGenericTypeDefinition() == typeof(IEnumerable<>))
return true;
foreach (Type intType in type.GetInterfaces())
{
if (intType.IsGenericType
&& intType.GetGenericTypeDefinition() == typeof(IEnumerable<>))
{
return true;
}
}
return false;
}
}
}
/// <summary>
......@@ -377,14 +423,22 @@ bool IsEnumerableType(Type type)
/// <typeparam name="T">The type of object to read from the file.</typeparam>
/// <param name="filePath">The file path to read the object instance from.</param>
/// <returns>Returns a new instance of the object read from the Json file.</returns>
public static T ReadFromJsonFile<T>(string filePath) where T : new()
public static bool ReadFromJsonFile<T>(out T payload, string filePath) where T : new()
{
payload = default(T);
TextReader reader = null;
try
{
reader = new StreamReader(filePath);
var fileContents = reader.ReadToEnd();
return JsonConvert.DeserializeObject<T>(fileContents/*, new JsonInheritenceConverter<object>()*/);
payload = JsonConvert.DeserializeObject<T>(fileContents);
return true;
}
catch (Exception e)
{
Debug.LogError(e);
return false;
}
finally
{
......@@ -392,37 +446,4 @@ bool IsEnumerableType(Type type)
reader.Close();
}
}
// tutorial @https://www.codeproject.com/Articles/1201466/Working-with-JSON-in-Csharp-VB#data_structure_types
// unused
// TODO: check for actual type in ReadJson
// TODO: avoid self-referencing-loop-error in WriteJson
public sealed class JsonInheritenceConverter<T> : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return typeof(T).IsAssignableFrom(objectType);
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
JObject jo = JObject.Load(reader);
var element = jo.Properties().First();
return element.Value.ToObject(Type.GetType(element.Name));
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value == null)
{
serializer.Serialize(writer, null);
return;
}
writer.WriteStartObject();
writer.WritePropertyName(value.GetType().FullName);
serializer.Serialize(writer, value);
writer.WriteEndObject();
}
}
}
This diff is collapsed.
......@@ -22,8 +22,8 @@ void Start()
private void OnDestroy()
{
StageStatic.SetMode(Mode.Play); // no Mode.Create
StageStatic.stage.solution.hardreset();
StageStatic.stage.factState.hardreset();
StageStatic.stage.solution.hardreset(invoke_event: false);
StageStatic.stage.factState.hardreset(invoke_event: false);
}
/// <summary>
......
......@@ -64,8 +64,6 @@ public static Stage stage {
(local_stage ? StageLocal : StageOfficial).Remove(current_name);
(local_stage ? StageLocal : StageOfficial).Add(current_name, value);
value.store();
}
}
......@@ -234,11 +232,8 @@ public static StageErrorStruct LoadNewStage(string category, int id, string name
if (!ret.pass)
return ret;
stage = new Stage(category, id, name, description, scene, true)
{
creatorMode = true
};
stage.store();
stage = new Stage(category, id, name, description, scene, true);
stage.store(force_stage_file: true);
LoadCreate();
return ret;
......@@ -294,7 +289,7 @@ public static bool ContainsNumber(string category, int i, bool local)
}
/// <summary>
/// Looks for and initial loads (see <see cref="Stage.ShallowLoad(ref Stage, string)"/>) <see cref="Stage">Stages</see> in <see cref="local_stage"/> and !<see cref="local_stage"/>.
/// Looks for and initial loads (see <see cref="Stage.ShallowLoad(out Stage, string)"/>) <see cref="Stage">Stages</see> in <see cref="local_stage"/> and !<see cref="local_stage"/>.
/// </summary>
public static void ShallowLoadStages()
{
......@@ -326,12 +321,12 @@ public static Stage GetStage(string name, bool local)
/// <summary>
/// Deletes a <see cref="Stage"/> and all its associated files (including save games).
/// <seealso cref="Stage.delete(bool)"/>
/// <seealso cref="Stage.delete()"/>
/// </summary>
/// <param name="stage">to be deleted</param>
public static void Delete(Stage stage)
{
GetStage(stage.name, !stage.use_install_folder).delete(true);
GetStage(stage.name, !stage.use_install_folder).delete();
(!stage.use_install_folder ? StageLocal : StageOfficial).Remove(stage.name);
}
......@@ -379,13 +374,13 @@ public static bool LoadInitStage(bool restore_session, GameObject gameObject = n
else
{
stage.ResetPlay();
if(mode == Mode.Create) // block saving "player" progress
stage.player_record.seconds = -1;
//if(mode == Mode.Create) // block saving "player" progress
// stage.player_record.seconds = -1;
}
if(gameObject != null)
gameObject.UpdateTagActive("DevelopingMode", mode == Mode.Create);
SetMode(stage.creatorMode ? Mode.Create : Mode.Play);
SetMode(mode);
return true;
}
......
......@@ -72,7 +72,7 @@ public void DrawChildren()
// 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])) {
if (!stage.set_record(index)) {
this.Init();
return;
}
......
......@@ -63,11 +63,15 @@ private bool _Clone(bool overwrite)
return false;
}
Stage new_stage = new Stage(original_stage, category, id, name, description, scene, true);
IJSONsavable<Stage>.load(null /*original_stage.hierarchie*/, original_stage.name, out Stage new_stage, original_stage.use_install_folder, true);
new_stage.InitFields(category, id, name, description, scene, true);
if (!overwrite)
new_stage.ResetSaves();
StageStatic.stage = new_stage;
new_stage.store(force_stage_file: true );
new_stage.store(force_stage_file: false);
return true;
}
......
fileFormatVersion: 2
guid: 7d43c521d7312964cb72014365bd183e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
{"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
fileFormatVersion: 2
guid: b9f66b56bf429ad42a19258696330fa3
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
{"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
fileFormatVersion: 2
guid: 6c3c72bfe0bce2d4dbc7bfa537c6c2bf
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
{"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
{"category":"Demo Category","number":1,"description":"Tree Stage","scene":"RiverWorld","use_install_folder":true,"solution":{"ValidationSet":[{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2885"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineFactHightDirectionComparer"}],"FactDict":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2883":{"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?fact2883","Label":"A","hasCustomLabel":false,"LabelId":1},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2884":{"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?fact2884","Label":"B","hasCustomLabel":false,"LabelId":2},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2885":{"s_type":"LineFact","Distance":6.0,"Pid1":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2883","Pid2":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2884","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?fact2885","Label":"[AB]","hasCustomLabel":false,"LabelId":0}},"MetaInf":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2883":{"workflow_id":0,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2884":{"workflow_id":1,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2885":{"workflow_id":2,"active":true}},"Workflow":[{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2883","samestep":false,"steplink":3,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2884","samestep":true,"steplink":0,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2885","samestep":true,"steplink":0,"creation":true}],"marker":3,"worksteps":1,"backlog":0,"soft_resetted":false,"invoke":true,"MaxLabelId":2,"UnusedLabelIds":[],"name":null,"path":null},"name":"TechDemo A","path":null}
\ 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
{"category":"Demo Category","number":2,"description":"River Stage","scene":"RiverWorld","use_install_folder":true,"solution":{"ValidationSet":[{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2888"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineFactHightDirectionComparer"},{"MasterIDs":["http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2888"],"SolutionIndex":[],"RelationIndex":[],"ComparerString":"LineSpanningOverRiverWorldComparer"},{"MasterIDs":[],"SolutionIndex":[1],"RelationIndex":[0],"ComparerString":"LineFactHightComparer"}],"FactDict":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2886":{"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?fact2886","Label":"A","hasCustomLabel":false,"LabelId":1},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2887":{"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?fact2887","Label":"B","hasCustomLabel":false,"LabelId":2},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2888":{"s_type":"LineFact","Distance":6.0,"Pid1":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2886","Pid2":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2887","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?fact2888","Label":"[AB]","hasCustomLabel":false,"LabelId":0}},"MetaInf":{"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2886":{"workflow_id":0,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2887":{"workflow_id":1,"active":true},"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2888":{"workflow_id":2,"active":true}},"Workflow":[{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2886","samestep":false,"steplink":3,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2887","samestep":true,"steplink":0,"creation":true},{"Id":"http://mathhub.info/FrameIT/frameworld/integrationtests?SampleSituationSpace/Root?fact2888","samestep":true,"steplink":0,"creation":true}],"marker":3,"worksteps":1,"backlog":0,"soft_resetted":false,"invoke":true,"MaxLabelId":2,"UnusedLabelIds":[],"name":null,"path":null},"name":"TechDemo B","path":null}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment