/// <summary> /// Unassigns a drone from being grounded. /// </summary> /// <param name="bodyName">CharacterBody name of the drone.</param> /// <returns>True if the drone name is removed. False if the name did not exist.</returns> public bool UnassignEnemyDroneAsGrounded(string bodyName) { return(GroundedDrones.ConditionalRemove(bodyName)); }
/// <summary> /// Assigns a drone as grounded. This will be used to determine if the drone should be repositioned to the ground to avoid floating stationary drones. /// </summary> /// <param name="bodyName">CharacterBody name of the drone.</param> /// <returns>True if the drone name is assigned. False if the name already exists.</returns> public bool AssignEnemyDroneAsGrounded(string bodyName) { return(GroundedDrones.ConditionalAdd(bodyName, item => item == bodyName)); }