Exemplo n.º 1
0
 void Start()
 {
     // Set the default selected element, and hide the others
     _element = _fire;
     SetElement(Element.Fire);
     _ice.ToggleElement(false);
     _bolt.ToggleElement(false);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Set the currently selected element, and set it in the Hand position.
 /// </summary>
 /// <param name="element">The newly selected element.</param>
 public void SetElement(Element element)
 {
     _element.ToggleElement(false);
     _enchant.SetElement(element);
     switch (element)
     {
         case Element.Fire:
             _element = _fire;
             _element.ToggleElement(true);
             break;
         case Element.Ice:
             _element = _ice;
             _element.ToggleElement(true);
             break;
         case Element.Bolt:
             _element = _bolt;
             _element.ToggleElement(true);
             break;
         default:
             _element = _fire;
             _element.ToggleElement(true);
             break;
     }
 }