Ejemplo n.º 1
0
 private void clearHighlights()
 {
     setHighlighted(false);
     sister.setHighlighted(false);
     if (action.Target != null)
     {
         Tooltippable correspondingHighlightable = action.Target.GetComponent <Tooltippable>();
         correspondingHighlightable.setHighlighted(false);
         correspondingHighlightable.hideTargetInfoText();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Called after a selected action is either scheduled or cancelled.
        /// </summary>
        public void clearSelectionState()
        {
            //the other targets should not be highlighted now
            foreach (Targetable noLongerATarget in selected.getPossibleTargets())
            {
                Tooltippable guiObj = noLongerATarget.GetComponent <Tooltippable>();
                guiObj.setHighlighted(false);
                guiObj.OnClicked  -= clickHandlers[noLongerATarget].click;
                guiObj.OnHover    -= clickHandlers[noLongerATarget].hover;
                guiObj.OnEndHover -= clickHandlers[noLongerATarget].endHover;
                guiObj.hideTargetInfoText();
            }

            clickHandlers = new Dictionary <Targetable, EventHandlers>();
            selected.transform.parent.GetComponent <NodeMenu>().clear();

            inSelectionState = false;
            selected         = null;
        }