1using System.Collections.Generic;
11 public List <ResultCanvasHelper>
rowList =
new List <ResultCanvasHelper>();
33 var allTraining = currentUserValue.trainings;
35 var actions = lastTraining.
Actions.OrderByDescending(x => x.timeSpent).ToList();
37 GameObject addColumn =
new GameObject();
39 foreach (var action
in actions)
41 if (!Blacklisted(action.actionType))
52 bool outputIsWaiter =
false;
53 foreach (var c
in connections)
56 if (outputAction.action.Contains(
"Waiter")) outputIsWaiter =
true;
59 if (!outputIsWaiter && actionObject.taktTime > 0)
62 if (counter % 2 == 0 || counter == 0)
68 var addRow = Instantiate(sh.newRow, sh.newRow.transform.parent);
69 addRow.gameObject.SetActive(
true);
73 row.gameObject.SetActive(
true);
74 if (actionObject.comment !=
null) row.actionName.text = actionObject.comment;
75 else row.actionName.text = actionObject.action;
77 for (
int i = 0; i < lastTraining.Actions.Count; i++)
79 if (lastTraining.Actions[i].actionName == actionObject.name)
81 row.takt.text = Mathf.FloorToInt(actionObject.taktTime / 60).ToString(
"D2") +
":" + (actionObject.taktTime % 60).ToString(
"00.00").Replace(
',',
'.');
82 row.timeSpent.text = Mathf.FloorToInt(actionObject.spentTimeOnAction / 60).ToString(
"D2") +
":" + (actionObject.spentTimeOnAction % 60).ToString(
"00.00").Replace(
',',
'.');
83 if (actionObject.timeInUse > 0) row.useful.text = Mathf.FloorToInt(actionObject.timeInUse / 60).ToString(
"D2") +
":" + (actionObject.timeInUse % 60).ToString(
"00.00").Replace(
',',
'.');
84 else row.useful.text =
"-";
90 if (HTA.low) row.progress.text =
"ALACSONY";
91 else if (HTA.high) row.progress.text =
"MAGAS";
92 else row.progress.text =
"OK";
96 if (HTA.low) row.progress.text =
"LOW";
97 else if (HTA.high) row.progress.text =
"HIGH";
98 else row.progress.text =
"OK";
106 if (RTA.low) row.progress.text =
"ALACSONY";
107 else if (RTA.high) row.progress.text =
"MAGAS";
108 else row.progress.text =
"OK";
112 if (RTA.low) row.progress.text =
"LOW";
113 else if (RTA.high) row.progress.text =
"HIGH";
114 else row.progress.text =
"OK";
120 row.progress.text =
"-";
126 if (actionObject.spentTimeOnAction > actionObject.taktTime || HTA && HTA.isPenalty || RTA && RTA.isPenalty)
130 row.succes.text =
"SIKERTELEN";
134 row.succes.text =
"FAILED";
143 row.succes.text =
"SIKERES";
147 row.succes.text =
"SUCCES";
150 row.GetComponent<
Image>().color =
Color.green;
177 if (item && item.gameObject)
179 Destroy(item.gameObject);
184 private bool Blacklisted(
string action)
186 return action.Contains(
"Countdown") || action.Contains(
"GameObject") || action.Contains(
"Weld") ||
187 action.Contains(
"Led") || action.Contains(
"Start") || action.Contains(
"Sound") ||
188 action.Contains(
"Move") || action.Contains(
"Belt") || action.Contains(
"ShowHide") || action.Contains(
"Deactivate") ||
189 action.Contains(
"Script") || action.Contains(
"Voice") || action.Contains(
"Collector") || action.Contains(
"Finish") || action.Contains(
"Trigger");
System.Drawing.Image Image
Connection[] GetConnectionsByEndPointId(string id)
ActionObject GetActionByInOut(string id)
ActionObject GetActionById(string id)
static Controller Instance
static LanguageSelector Instance
void ShowResultCanvas(UserManager.Training lastTraining)
List< ResultCanvasHelper > rowList
static ResultCanvas Instance