public static _CoverType GetCoverType(Tile attackingTile, Tile targetTile)
        {
            Vector3 dir = attackingTile.GetPos() - targetTile.GetPos();

            //float angle=0;
            //if(GridManager.GetTileType()==_TileType.Square) angle=Utilities.VectorToAngle90(new Vector2(dir.x, dir.z));
            //else if(GridManager.GetTileType()==_TileType.Hex) angle=Utilities.VectorToAngle60(new Vector2(dir.x, dir.z));	//round to nearest

            float angle = Utilities.Vector2ToAngle(new Vector2(dir.x, dir.z));

            _CoverType cover = _CoverType.None;

            for (int i = 0; i < targetTile.coverList.Count; i++)
            {
                if (!targetTile.coverList[i].enabled)
                {
                    continue;
                }

                float diff = Mathf.Abs(targetTile.coverList[i].angle - angle);
                if (diff > 180)
                {
                    diff = 360 - diff;
                }

                if (diff < GameControl.GetEffectiveCoverAngle())
                {
                    cover = targetTile.coverList[i].type;
                    if (targetTile.coverList[i].type == _CoverType.Full)
                    {
                        break;
                    }
                }
            }

            return(cover);
        }