Пример #1
0
 void SelectDivide()
 {
     //if (Input.GetKey(KeyCode.O) && IsAllOfCacheInPool(runePool, runeOCache))
     if (Input.GetKey(KeyCode.O))
     {
         obutton.Select();
         try
         {
             NodeScript ns = parserScript.FindFirstNodeWithOnlyLeaves("/");
             if (ns.AreAllColorValuesZeroOrLessOfMyChildren())
             {
                 ns.Solve();
             }
             //Shoot(bulletPoolWhite);
         }
         catch (Exception e)
         {
             Debug.Log("No / with just leaves found. Error: " + e);
         }
     }
     else if (Input.GetKeyUp(KeyCode.O))
     {
         EventSystem.current.GetComponent <EventSystem>().SetSelectedGameObject(null);
     }
 }
Пример #2
0
 void SelectAdd()
 {
     if (Input.GetKey(KeyCode.Y))
     {
         ybutton.Select();
         try
         {
             NodeScript ns = parserScript.FindFirstNodeWithOnlyLeaves("+");
             if (ns != null)
             {
                 if (ns.AreAllColorValuesZeroOrLessOfMyChildren())
                 {
                     Debug.Log("ns.Solve()");
                     ns.Solve();
                 }
             }
         }
         catch (Exception e)
         {
             Debug.Log("No + with just leaves found. Error: " + e);
         }
     }
     else if (Input.GetKeyUp(KeyCode.Y))
     {
         EventSystem.current.GetComponent <EventSystem>().SetSelectedGameObject(null);
     }
 }
Пример #3
0
 void SelectExponent()
 {
     //if (Input.GetKeyDown(KeyCode.Y) && IsAllOfCacheInPool(runePool, runeYCache))
     if (Input.GetKeyDown(KeyCode.P))
     {
         pbutton.Select();
         try
         {
             NodeScript ns = parserScript.FindFirstNodeWithOnlyLeaves("^");
             if (ns.AreAllColorValuesZeroOrLessOfMyChildren())
             {
                 ns.Solve();
             }
         }
         catch (Exception e)
         {
             Debug.Log("No ^ with just leaves found. Error: " + e);
         }
     }
     else if (Input.GetKeyUp(KeyCode.P))
     {
         EventSystem.current.GetComponent <EventSystem>().SetSelectedGameObject(null);
     }
 }