Beispiel #1
0
 /**
  * Will run everytime toggle in group is clicked.
  */
 public void NotifyToggleClick(GemToggle toggle)
 {
     if (ActiveToggles().Count() == 1)
     {
         for (var i = 0; i < m_Toggles.Count; i++)
         {
             if (m_Toggles [i].isOn)
             {
                 gm.SetGemOne(m_Toggles [i].AssociatedGem);
                 gm.SetGemTwo(m_Toggles [i].AssociatedGem);
             }
         }
     }
     if (!toggle.isOn)
     {
         if (gm.GetGemOne() == toggle.AssociatedGem)
         {
             gm.ClearGemOne();
         }
         else if (gm.GetGemTwo() == toggle.AssociatedGem)
         {
             gm.ClearGemTwo();
         }
     }
     Debug.Log("***********************");
     Debug.Log(gm.GetGemOne().ToString());
     Debug.Log(gm.GetGemTwo().ToString());
 }