/// <summary> /// Initialization. /// </summary> void Start() { // Add references Parameters = GetComponent<UnitParameters>(); Pathfinding = GetComponent<NavMeshAgent>(); MissionGUI = Parameters.ParametersOfMission.GetComponent<InterfaceManager>(); // Moving gestion TargetPosition = transform.position; isMoving = false; // Create dot in minimap MissionGUI.CreateDot(this); // Fix to verify that DC is not under 0 Parameters.ParametersOfMission.DC -= Parameters.ConsumedDC; }