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); } }
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); } }
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); } }