Skip to content
Snippets Groups Projects
Commit 6ad5caa4 authored by John Schihada's avatar John Schihada
Browse files

Fixed bug + Adjusted prefab

parent 141e95bd
No related branches found
No related tags found
No related merge requests found
......@@ -125,9 +125,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
meshRendererToChange: {fileID: 323004521892560777}
animationStartColor: {r: 0.98039216, g: 0.99215686, b: 0.03137255, a: 1}
animationEndColor: {r: 1, g: 0.52156866, b: 0.007843138, a: 1}
animateDuration: 5
--- !u!1 &4853696702160906218
GameObject:
m_ObjectHideFlags: 0
......@@ -186,7 +183,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: dc000ff84823e7045bac15e87d6da9b2, type: 2}
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
......
......@@ -34,7 +34,6 @@ public int Id
}
public GameObject Representation;
public string backendURI;
public string backendValueURI; // supposed to be null, for Facts without values eg. Points, OpenLines, OnLineFacts...
public string format(float t)
{
......@@ -325,18 +324,24 @@ public RayFact(int pid1, int pid2, string uri)
public static RayFact parseFact(Scroll.ScrollFact fact)
{
String uri = fact.@ref.uri;
String pointAUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[0]).uri;
String pointBUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[1]).uri;
if (CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointAUri)) &&
CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointBUri)))
if ((OMA)((Scroll.ScrollSymbolFact)fact).df != null)
{
int pid1 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointAUri)).Id;
int pid2 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointBUri)).Id;
return new RayFact(pid1, pid2, uri);
String pointAUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[0]).uri;
String pointBUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[1]).uri;
if (CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointAUri)) &&
CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointBUri)))
{
int pid1 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointAUri)).Id;
int pid2 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointBUri)).Id;
return new RayFact(pid1, pid2, uri);
}
//If dependent facts do not exist return null
else
{
return null;
}
}
//If dependent facts do not exist return null
else
{
else {
return null;
}
}
......
......@@ -259,8 +259,9 @@ public void animateHint(GameObject scrollParameter, string scrollParameterUri) {
scrollParameter.GetComponentInChildren<ImageHintAnimation>().AnimationTrigger();
//Animate Fact in FactPanel
AnimateExistingFactEvent.Invoke(existingFact);
//Animate factRepresentation in game
existingFact.Representation.GetComponentInChildren<MeshRendererHintAnimation>().AnimationTrigger();
//Animate factRepresentation in game if Fact has a Representation
if(existingFact.Representation != null)
existingFact.Representation.GetComponentInChildren<MeshRendererHintAnimation>().AnimationTrigger();
}
//If not -> Generate a Fact-Representation with such dependent facts
else
......
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