public override void ButtonClicked(int buttonIndex) { switch (buttonIndex) { case 0: RestartPicking(); menu.CloseMenu(); break; case 1: EnableTestTracking(); menu.CloseMenu(); break; case 2: DisableTestTracking(); menu.CloseMenu(); break; case 3: if (!menu.IsOpenDetail()) { menu.OpenDetailMenu(); } else { menu.CloseDetailMenu(); } break; } }
private void HandleTap(GameObject tappedObject) { if (tappedObject == null) { Debug.Log("Tapped on NOTHING"); if (!menu.IsOpen()) { menu.OpenMenu(); } else { menu.CloseMenu(); } return; } else { Debug.Log("Tapped on: " + tappedObject.name); } }
private void HandleTap(GameObject tappedObject) { if (tappedObject == null) { if (!menu.IsOpen()) { menu.OpenMenu(); } else { menu.CloseMenu(); } return; } Debug.Log("tapped on: " + tappedObject.name + " - current object to pick: " + targets[pickList[itemIndex].item].transform.GetChild(0).name + " - equal: " + (tappedObject == targets[pickList[itemIndex].item].transform.GetChild(0))); if (tappedObject == restartObject) { Start(); } else if (tappedObject.name == targets[pickList[itemIndex].item].transform.GetChild(0).name) { NextItem(); } else { if (!menu.IsOpen()) { menu.OpenMenu(); } else { menu.OnClick(tappedObject); } } }