private void Awake() { factions = FindObjectsOfType <RosemaryFaction>(); selection = GetComponent <RosemarySelection>(); index = Array.IndexOf(factions, selection.faction); if (index < 0) { index = 0; } textElement.text = "Faction: " + selection.faction.name; }
public void OnSelected(RosemarySelection selection) { isSelected = true; if (selection.faction == this.faction) { controllableSelectionIndicator.SetActive(true); uncontrollableSelectionIndicator.SetActive(false); } else { controllableSelectionIndicator.SetActive(false); uncontrollableSelectionIndicator.SetActive(true); } }