void FingerGestures_OnFingerTap(int fingerIndex, Vector2 fingerPos, int tapCount) { GameObject selection = PickObject(fingerPos); if (selection == null) { return; } if (bwButton != null && selection.name.Equals(bwButton.name)) { AGGameState.switchWorlds(AGWorldIndex.k_BeeWorld); } if (jwButton != null && selection.name.Equals(jwButton.name)) { AGGameState.switchWorlds(AGWorldIndex.k_JungleWorld); } if (fwButton != null && selection.name.Equals(fwButton.name)) { AGGameState.switchWorlds(AGWorldIndex.k_FishWorld); } if (iwButton != null && selection.name.Equals(iwButton.name)) { AGGameState.switchWorlds(AGWorldIndex.k_IckyWorld); } if (swButton != null && selection.name.Equals(swButton.name)) { AGGameState.switchWorlds(AGWorldIndex.k_ShapeWorld); } if (cwButton != null && selection.name.Equals(cwButton.name)) { AGGameState.switchWorlds(AGWorldIndex.k_CircusWorld); } if (tvButton != null && selection.name.Equals(tvButton.name)) { AGGameState.switchWorlds(AGWorldIndex.k_VideoWorld); } if (childSwitchButton != null && selection.name.Equals(childSwitchButton.name)) { Debug.Log("switching child"); AGGameState.switchChild(); } }