Skip to content

Commit

Permalink
Ignoring summaries with less than one minute
Browse files Browse the repository at this point in the history
  • Loading branch information
bionicl committed Apr 10, 2019
1 parent fdbc3a4 commit 0b5b893
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Assets/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -129.79, y: 27}
m_AnchoredPosition: {x: -132, y: 27}
m_SizeDelta: {x: 251, y: 40.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &23128034
Expand Down Expand Up @@ -3002,7 +3002,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: <b>Improve this map</b>
m_Text: ' <b>Improve this map</b>'
--- !u!222 &227121913
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -22973,7 +22973,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 130.99051, y: 60}
m_AnchoredPosition: {x: 130.99039, y: 60}
m_SizeDelta: {x: 0, y: 150}
m_Pivot: {x: 1, y: 1}
--- !u!114 &1433522477
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/ReadJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ IEnumerator RenderAfterTime(MovesJson m, bool canChangeWeight) {
ValidateIfNoReapeted();
}
void SpawnSummary(MovesJson.SummaryInfo summary, bool canChangeWeight) {
if (summary.group == "transport")
if (summary.group == "transport" || summary.duration < 60)
return;
GameObject summaryObject = Instantiate(summaryPrefab, historySpawn.transform.position, historySpawn.transform.rotation);
RectTransform summaryObjectRect = summaryObject.GetComponent<RectTransform>();
Expand Down
6 changes: 3 additions & 3 deletions Assets/Scripts/SummaryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ void SetupIcon() {
}
}
void SetupTexts(bool canChangeWeight) {
if (summary.calories > 1) {
calories.gameObject.SetActive(true);
if (summary.calories > 1) {
double caloriesNumber = summary.calories;
if (canChangeWeight) {
caloriesNumber *= SettingsBox.instance.weight;
}
calories.text = caloriesNumber.ToString() + "cal";
}
} else
calories.text = "- cal";
if (summary.distance > 1) {
distance.gameObject.SetActive(true);
if (SettingsBox.instance.isMetric)
Expand Down

0 comments on commit 0b5b893

Please sign in to comment.