/// <summary> /// Swaps to highlighting material. /// </summary> /// <param name="a">The alpha component.</param> /// <param name="highlightIt">If set to <c>true</c> highlight it.</param> private void swapMaterial(shinsaUnit a, bool highlightIt){ if (highlightIt) { a.GetComponent<SpriteRenderer> ().material = UnitHighlightingMaterial; } else { a.GetComponent<SpriteRenderer> ().material = UnitDefaultMaterial; } }
private void swapPicts(shinsaUnit unit, bool toImage) { if(unit.UnitName == "Archflamen" && toImage) { UnitImage.sprite = UnitImagePool[0]; } else if(unit.UnitName == "Throng" && toImage) { UnitImage.sprite = UnitImagePool[1]; } else if (unit.UnitName == "Flamen" && toImage) { UnitImage.sprite = UnitImagePool[2]; } if (!toImage) { UnitImage.sprite = UnitImagePool[UnitImagePool.Length - 1]; } }
private void swapPicts(shinsaUnit unit, bool toImage) { if (unit.UnitName == "Archflamen" && toImage) { UnitImage.sprite = UnitImagePool [0]; } else if (unit.UnitName == "Throng" && toImage) { UnitImage.sprite = UnitImagePool [1]; } else if (unit.UnitName == "Flamen" && toImage) { UnitImage.sprite = UnitImagePool [2]; } else if (unit.UnitName == "Minorite" && toImage) UnitImage.sprite = UnitImagePool [3]; else if (unit.UnitName == "Preceptor" && toImage) UnitImage.sprite = UnitImagePool [4]; else if (unit.UnitName == "HighPerceptor" && toImage) UnitImage.sprite = UnitImagePool [5]; if (!toImage) { UnitImage.sprite = UnitImagePool [6]; } }