Skip to content
Snippets Groups Projects
Commit 523dbf1c authored by Paul-Walcher's avatar Paul-Walcher
Browse files

Merge branch 'Paul_Marius' of https://gl.mathhub.info/FrameIT/frameworld into Paul_Marius

parents 6dae533d 25263a7a
No related branches found
No related tags found
No related merge requests found
......@@ -12,14 +12,14 @@
1. A constructor that calls base(). Constructor can have SomDoc, which is the MMT URI as OMS.
2. define: A method parseFact(List<Fact>, MMTFact fact).
MMTFact is the fact you received from the server.
Then, in this method, you will try to add your fact to the ParsingDictionary in Assets\InteractionEngine\FactHandling\Facts,
then add it to the first argument (the list).
2. define: A method parseFact(List<Fact> ret, MMTFact fact).
convert MMTFact fact to Unity Fact and add it to the List<Fact> ret
hint: use FactRecorder.AllFacts[<uri>] to get the Unity Fact belonging to the <uri>
3. define: public override bool HasDependentFact => [true/false]
4. define: GetDeendentFactIds(), which gives back a string array of the dependent Ids of your facts.
4. define: GetDeendentFactIds(), which gives back a string array of the dependent URIs of your facts.
5. define: GetHashCode()
......@@ -32,24 +32,26 @@
8. define: MakeMMTDecalaration(), which gives back a new MMTFact.
9. define: Defines(), which gives back a SOMDoc(MMTObject) of your class
<br>
2. Add the MMT-fact you Implemented into Assets\Scripts\MMTServer\CommunicationProtocol\MMTConstants.cs
<br>
3. Then, in Assets\Scripts\InteractionEngine\FactHandling\Facts\Fact.cs
<br>
1. add an entry into ParsingDictionary.parseFactDictionary with your MMTConstant as key and the parseFact Method of the Fact class you implemented.
2. Then add a line to the lines that look like [JsonSubtypes,.KnownSubType(typeof(YOUR_FACTCLASS), nameof(YOUR_FACTCLASS))]
<br>
2. Then add a line to the lines that look like
[JsonSubtypes,.KnownSubType(typeof(YOUR_FACTCLASS), nameof(YOUR_FACTCLASS))]
4. In Assets\Scripts\InteractionEngine\FactHandling\FactSpawner.cs
<br>
1. Add a variable of type GameObject for your fact.
2. Create a spawn method for your fact.
3. In SpawnFactRepresentation add your Fact to the switch-case statement
<br>
5. In the Unity Editor in Assets\Ressources\Prefabs\Facts create the prefab for your Fact.
<br>
6. Connect your Prefab to the FactSpawner class
<br>
1. Open Assets\Scenes\Worlds\RiverWorld.
2. In the Unity Project Tab goto folder Assets\Scripts\InteractionEngine\FactHandling
3. Rightclick FactSpawner.cs and select "Find References In Scene".
......
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