public bool Deselect( )
 {
     if (sourceSquad)
     {
         sourceSquad = null;
         return(true);
     }
     return(false);
 }
 public void SurfaceClicked(CombatControlSurface clickedSurface)
 {
     Debug.Log("Surface Clicked");
     if (sourceSquad != null)
     {
         Debug.Log("Assigning Surface As Target", clickedSurface);
         sourceSquad.setTarget(clickedSurface.Targetable);
         sourceSquad = null;
     }
 }
 public void MapClicked(Vector3 targetVec)
 {
     //Debug.Log("Map Clicked");
     if (sourceSquad == null)
     {
         return;
     }
     else
     {
         sourceSquad.setTargetVec(targetVec);
         sourceSquad = null;
     }
 }
        public void ControlFlagClicked(UnitControlFlag clickedFlag)
        {
            if (sourceSquad == null)
            {
                var targetSquad = clickedFlag.Targetable as SquadGroup;
                if (targetSquad && targetSquad.owner == PlayerType.Player)
                {
                    //Debug.Log("Selecting Player Unit For Orders", targetSquad);
                    sourceSquad = targetSquad;
                    return;
                }
            }
            //else
            //{

            //    Debug.Log($"Assigning Flag As Target for {sourceSquad.name}", clickedFlag);
            //    sourceSquad.setTarget(clickedFlag.Targetable);
            //    sourceSquad = null;
            //}
        }
 // Use this for initialization
 void Start()
 {
     sourceSquad = null;
 }