Skip to content
Snippets Groups Projects
Commit e1327ec5 authored by CUNIN Clemence's avatar CUNIN Clemence
Browse files

Fix ShipCanva, Add some logs

parent fa885dfc
No related branches found
No related tags found
No related merge requests found
......@@ -775,7 +775,7 @@ RectTransform:
m_GameObject: {fileID: 5310696331602227863}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 4.430831, z: 1}
m_LocalScale: {x: 0.75, y: 3.3, z: 1}
m_Children:
- {fileID: 1660014579764727760}
- {fileID: 4431692757261758794}
......@@ -877,7 +877,7 @@ Canvas:
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 5
m_PixelPerfect: 0
m_PixelPerfect: 1
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
......@@ -992,7 +992,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.15686275, g: 0.15686275, b: 0.15686275, a: 0.392}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
......
......@@ -65,6 +65,16 @@ public class Log : MonoBehaviour
/// </summary>
private static int failedDrones = 0;
/// <summary>
/// The missedAlerts variable, storing the number of missed alerts.
/// </summary>
private static int missedAlerts = 0;
/// <summary>
/// The trackedAlerts variable, storing the number of tracked alerts.
/// </summary>
private static int trackedAlerts = 0;
/// <summary>
/// Create a new log file, given the scenario and entering the initial time with the details inside of the log file.
/// </summary>
......@@ -85,10 +95,10 @@ public class Log : MonoBehaviour
string logFilePath = Path.Combine(userFolderPath, ficName);
File.WriteAllText(logFilePath, "timestamp, temps en seconde, type, temps de réaction, temps total event, nbPoints, nbDronesActifs, nbDronesTracked, nbDronesMissed, nbDronesFailed, alarmeActive\n");
File.WriteAllText(logFilePath, "timestamp, temps en seconde, type, temps de réaction, temps total event, nbPoints, nbAlarmesMissed, nbAlarmesTracked, nbDronesActifs, nbDronesTracked, nbDronesMissed, nbDronesFailed, alarmeActive\n");
Points.setPoints(0);
File.AppendAllText(logFilePath, System.DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString() + ", 0, -1, 0, 0, 0, 0, 0, 0, 0, false\n");
File.AppendAllText(logFilePath, System.DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString() + ", 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, false\n");
isLog = true;
}
......@@ -116,6 +126,12 @@ public class Log : MonoBehaviour
} else if (type == 2)
{
failedDrones++;
} else if (type == 1)
{
trackedAlerts++;
} else if (type == 3)
{
missedAlerts++;
}
long timeCurrent = System.DateTimeOffset.UtcNow.ToUnixTimeSeconds() - timeInit;
......@@ -128,6 +144,8 @@ public class Log : MonoBehaviour
timeReaction + ", " +
timeEventTotal + ", " +
Points.getPoints() + ", " +
missedAlerts + ", " +
trackedAlerts + ", " +
nbDrones + ", " +
trackedDrones + ", " +
missedDrones + ", " +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment