Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
            }
        }