Inheritance: UnityEngine.MonoBehaviour
Beispiel #1
0
 public static void PrintLog()
 {
     if (SimulationMetricsLogger.instance.stringBuilder == null)
     {
         SimulationMetricsLogger log = SimulationMetricsLogger.instance;
         Debug.LogError("Print(): Game metrics logger cannot output anything. Please double check.");
         log.outputField.text = "No game metrics report generated.";
     }
     else
     {
         SimulationMetricsLogger.instance.stringBuilder.Length = 0;
         SimulationMetricsLogger.instance.Print();
     }
 }
Beispiel #2
0
        public void Update()
        {
            this.outputField.GetComponentInChildren <Text>().text = this.outputField.text.ToString();

            if (Input.GetKeyUp(this.triggerKey))
            {
                ToggleCanvasGroup();
                SimulationMetricsLogger.PrintLog();
            }

            for (int i = 0; i < this.teamMetrics.Count; i++)
            {
                if (this.simulationMetricsLoggerStart)
                {
                    TeamMetric temp = this.teamMetrics[i];
                    temp.totalGameTimeSinceEpoch += Time.deltaTime;
                    if (this.gameStartFlag)
                    {
                        temp.totalGameTime += Time.deltaTime;
                    }
                    this.teamMetrics[i] = temp;
                }
            }
        }
        public void Start()
        {
            Initialization();

            SimulationMetricsLogger.instance = this;
        }
Beispiel #4
0
        public void Start()
        {
            Initialization();

            SimulationMetricsLogger.instance = this;
        }