Skip to content

Commit

Permalink
Bugfixes with timeSpheres and visualization loading / unloading
Browse files Browse the repository at this point in the history
  • Loading branch information
FHomps committed Jul 23, 2019
1 parent c76d260 commit 9ee5200
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
8 changes: 8 additions & 0 deletions ReViVD/Assets/ControlPanel/ControlPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,21 @@ void LoadViz() {

Visualization.Instance.Load();

spheres.animate.interactable = spheres.display.isOn;
spheres.drop.interactable = spheres.display.isOn;

export_results.interactable = true;

}

void UnloadViz() {
Visualization.Instance.Unload();

spheres.animate.isOn = false;
Visualization.Instance.doTimeSphereAnimation = false;
spheres.animate.interactable = false;
spheres.drop.interactable = false;

export_results.interactable = false;
}

Expand Down
10 changes: 5 additions & 5 deletions ReViVD/Assets/Scenes/Scene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -16977,7 +16977,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.0000012516975, y: 16.999994}
m_AnchoredPosition: {x: 0.0000012516975, y: 16.999992}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1465808815
Expand Down Expand Up @@ -19296,7 +19296,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1625316222
RectTransform:
m_ObjectHideFlags: 0
Expand All @@ -19319,9 +19319,9 @@ RectTransform:
m_Father: {fileID: 1465808814}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 325, y: -165}
m_SizeDelta: {x: 650, y: 140}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1625316223
Expand Down
5 changes: 2 additions & 3 deletions ReViVD/Assets/Visualization/Visualization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ public void Unload() {
districts.Clear();
clearDistrictsToHighlight = true;

useGlobalTime = false;
doTimeSphereAnimation = false;

_loaded = false;
}

Expand Down Expand Up @@ -323,6 +320,8 @@ void Update() {
old_traceTimeSpheres = true;
}

Debug.Log("anim: " + doTimeSphereAnimation + "; gtime: " + useGlobalTime + ", " + globalTime);

if (useGlobalTime && doTimeSphereAnimation) {
globalTime += timeSphereAnimationSpeed * Time.deltaTime;
ControlPanel.Instance.spheres.globalTime.text = globalTime.ToString();
Expand Down

0 comments on commit 9ee5200

Please sign in to comment.