public void Execute(GameObject selectedGameObject) { GameUtility.DisableHexInteractable(selectedGameObject); GameUtility.EnableInsideText(selectedGameObject); GameUtility.SetHexColorGreen(selectedGameObject); HexManager.RemoveHexFromList(selectedGameObject); }
public void Execute(GameObject selectedGameObject) { List <GameObject> hexInRange = HexManager.GetRangeObjects(selectedGameObject, Range); if (HexManager.IsFilledHexInRange(selectedGameObject, Range)) { hexInRange.ForEach(el => GameUtility.SetHexColorGreen(el)); GameUtility.DisableHexInteractable(selectedGameObject); GameUtility.SetHexColorRed(selectedGameObject); HexManager.RemoveHexFromList(selectedGameObject); } else { hexInRange.ForEach(el => { GameUtility.SetHexColorRed(el); GameUtility.DisableHexInteractable(el); HexManager.RemoveHexFromList(el); }); } }