public void OnIndicatorClick() { /* * //isn't there a better way to do this? it seems crazy * //reject enum: * Menu * NoWorld * Locked * OutOfBounds * Deselect * InvalidSwap * * // 1) check if we have clicked a button * // 2) check if the world has been created * // 3) check if the controller is locked * // 4) check if we have selected a valid position * // 5) check if we already have a selected piece * // 6) check if we have reselected the same piece (deselect) * // 7) check if the selected piece is a valid swap * */ if (!ButtonManager.CheckForMenuButtonClick()) { if (sm.ThereIsAWorld) { HandleWorldClick(); } else { Debug.LogWarning("we don't have a world but we are clicking!"); } } else { //this is the "we clicked on a button" case which overrides world clicks } }