/// <summary> /// Gets a direction vector relative to the direction this /// formation is facing. /// </summary> public Vector2Int GetDirection(FormationMovement movement) { switch (movement) { case FormationMovement.AdvanceRank: return(Facing); case FormationMovement.RetreatRank: return(-Facing); case FormationMovement.IncrementFile: return(Facing.Perpendicular()); case FormationMovement.DecrementFile: return(-Facing.Perpendicular()); default: return(Vector2Int.zero); } }